I. Introduction

If you do research in software engineering, you have probably submitted, or are preparing to submit, a paper reporting an empirical study. Reviewers do not merely read such studies (in fact, any type of study); they scrutinise their methodological and statistical rigor, looking for weaknesses that could undermine your findings, because the conclusions rest directly on the analyses. If, like me, you find rejection hard to digest, this post is for you. I walk you through a few statistical pitfalls most worth checking before you submit your paper. Your paper can still be rejected for other reasons (Reviewer 2 is always available to make sure of that), but once you watch for the points covered here, your conclusions will be harder to challenge, and you can reasonably expect a major revision in the first round.

II. What makes Statistical rigor a big deal?

You spent months on your study, suffering through getting people to participate in your experiment, analysing the responses, writing carefully, and addressing your supervisor's 200 comments per pass. Then the reviews arrive:
"The authors apply a t-test to Lickert data. Interrater agreement is not discussed; no sensitivity analysis is reported for the potential outliers. The sample size is not large enough to support conclusions"
Reject.
In SE, data are often nominal (e.g., bug type, pass/fail), or ordinal (e.g., Lickert ratings, vulnerability severity), frequently collected from human participants. Their responses to our experiment/survey answer the research questions, raising methodological questions like: which statistical test is appropriate for your data? Are the labels reliable? Would the conclusions hold under alternative analytical choices? Therefore, the first natural aspect for your research is to make sure you know your data structure.

My experience analysing a small dataset of ordinal data involving human judgements and rankings highlighted four lessons:
1. Understand your data before choosing a statistical test.
2. Measuring agreement between rankers matters, because a test might tell you whether conditions differ, not whether the rankers agree; that's where inter-rater agreement comes into play.
3. The sensitivity of every design decision (e.g., tie handling, item inclusion) must be evaluated because these decisions can change the results, and therefore alter your conclusions.
4. Control the risk of false positives when running multiple tests

Let's look at each one.

II.1. Lesson 1: Understand your data before choosing a test
Before choosing a test, write down exactly what one observation represents. This is very important, and surprisingly easy to overlook, especially when you are used to applying a particular test to a particular type of data.

Ask yourself:
- What am I measuring? Is the outcome numerical, ordinal, or nominal?
- How were the observations collected? For my specific case, did the experts rank items, classify them, or provide scores?
- How was the collection designed? Are observations independent, paired, or repeated?
- How much data do I have? Small samples require extra care and may need exact tests or more conservative interpretations.

In my case, several developers evaluated the same code snippets. That meant I had multiple repeated ordinal rankings: the same snippets were examined by more than one person. The code snippets were therefore the blocks, while the developers’ rankings were repeated measurements within each block. This matters because treating every ranking as an independent observation can overstate the amount of evidence in your data.
A quick way to match your design to an appropriate test is given in Table 1.

Table 1: A quick reference for selecting statistical tests

In my study, the Friedman test was useful for comparing rankings across sources, while the Chi-square test of independence helped investigate associations between categories. While these choices were fine for the data, they led to another important question: can we trust the rankings themselves?

II.2. Lesson 2: Measure Agreement Between Rankers
A significant Friedman tells you that conditions differ, but it doesn't tell whether rankers agree. Human judgement are measurements, not necessarily ground truth. In programming, different developers may interpret the same code differently, even when given identical instructions. Therefore, quantifying inter-rater agreement before drawing conclusions, i.e., answering our research questions, becomes crucial.

Some commonly used coefficients of inter-rater agreement are given in Table 2.

Table 2: Common agreement measures for different rating situations

The coefficient, usually referred to as "alpha", measures concordance between raters ranging from 0 (no concordance, or agreement) to 1 (perfect agreement). A few practical recommendations are:
- Report the raw percentage agreement alongside the coefficient; i.e., alpha = 0.34, Agreement: 34%
- Report confidence intervals where possible.
- Identify items or categories with poor agreement and discuss them explicitly. Consider a systematic sensitivity analysis of your results without those items to see whether your main conclusions still hold.
- Explain how disagreements were handled, for example through discussions.

Remember: if agreement is poor, running additional tests will not fix it. Your conclusions can only be as strong as the measurements and analytical decisions behind them. Be transparent about both.

II.3. Lesson 3: Perform Sensitivity Analyses
When making design decisions, ask whether your conclusions will still hold if you had made a different choice during your study design. For example, a reviewer might ask (and one will surely do!): "Would you obtain the same conclusion if you made a different analytical choice?"

That is precisely what the sensitivity analysis investigates. In my experience, a seemingly small decision can influence the results, especially when you are dealing with small sample sizes. Table 3 shows some questions that you might want to consider based on a decision you make before concluding your work.

Table 3: Some key decisions to examine in sensitivity analyses

The point here is to establish your primary analysis first, then examine reasonable alternatives. Don't limit your study to reporting only the versions that produce significant results. If, for instance, excluding a few items changes your conclusions, that is a finding worth discussing. The goal is to understand how solid your conclusions are and to be transparent about their limitations.

II.4. Lesson 4: Control Multiple Testing
Let's imagine you ran 30 independent statistical tests, each with a significance threshold of 0.05. Even if all null hypotheses are true, the probability of obtaining at least one false positive is 79% (P(≥ 1 false positive) = 1 - (0.95^30)), which is non-negligible. This is why multiple testing matters.

In my study, I ran three Chi-square tests for the same research question, along with 36 Pairwise post hoc comparisons. Your study may seemingly include several Friedman tests, Pairwise post hoc comparisons, or Chi-square tests.

Before interpreting the results, check the following:
- Define your test family: a correction applied to one set of chi-square tests does not automatically cover all the other tests in your study.
- Choose an appropriate correction method: for example, use Holm's method to control the family-wise error rate, or Benjamini-Hochberg to control the false discovery rate.
- Report adjusted p-values: interpret them in the context of the correction method you used.
- Distinguish exploratory from confirmatory analyses: keep in mind that not every interesting result was part of your original hypothesis.

III. Last check!

Before submitting, these are a few things you can check in your analyses:
1. Have I correctly identified my data, with respect to my research questions?
2. Are my statistical tests appropriate for my data?
3. Have I accounted for dependencies?
4. Have I measured the agreement between raters, and discuss them if any?
5. Have I checked whether my conclusions are sensitive to my analytical choices?
6. Have I controlled for multiple testing?
7. Have I reported effect sizes, not just p-values? (not addressed above, but very important)

If you can answer “yes” to all of these questions, you are ready to submit. Otherwise, it may be painful, but it is better to address them now than to have Reviewer 2 request them in a less-than-friendly review comment.

IV. Conclusion

Voilà! I've walked through the key points to address in an empirical study, sharing practical lessons I learned the hard way.

Make sure you answer these questions in this post before reviewer 2 does.

If you find this useful, feel free to share it or leave a comment with anything important you think I missed.