What ANOVA can and cannot tell you
Analysis of variance tests whether the means of several conditions differ more than chance variation would predict. In computer science it is used to compare algorithms, configurations or system settings on a performance measure such as accuracy, runtime or energy use. With two conditions it reduces to a t test; its value lies in handling several conditions and several factors at once.
A significant F statistic says that not all means are equal. It does not say which algorithm is best, how large the differences are, or whether they matter in practice. Those answers come from contrasts, post hoc tests and effect sizes (Lakens, 2013), and from a design that makes the comparison fair.
ANOVA is also one option among several. When the design is unbalanced, when some algorithms fail to finish on some datasets, or when both datasets and seeds vary, a linear mixed model with dataset and seed as random effects handles the structure more flexibly. The principles below apply to either approach.

Design first: the unit of replication
The most common error in algorithm comparisons is to misidentify what counts as an independent observation. If three algorithms are each run on the same ten datasets, the thirty scores are not three independent groups of ten. Each dataset contributes a score to every algorithm, and some datasets are simply harder than others. The dataset is a block, and the analysis must account for it.
The same applies to random seeds and cross-validation folds. Folds overlap heavily in their training data, so fold scores are correlated and do not count as independent replicates. Random seeds matter too: in deep reinforcement learning, Henderson et al. (2018) ran one algorithm with ten seeds, split the runs into two groups of five and obtained performance curves that differed significantly. Decide in advance what the replicates are (datasets, seeds or both), fix the number before running experiments, and give every algorithm the same tuning budget (Lindauer & Hutter, 2020).
Choosing the right ANOVA
| Design | Example | Analysis |
|---|---|---|
| Independent groups | Different, randomly assigned user groups test three interfaces | One-way ANOVA, or Welch's F if variances differ |
| Two or more crossed factors | Algorithm by data size, each combination run on separate random instances | Factorial ANOVA with interaction |
| Same units under every condition | Each algorithm run on the same set of datasets or seeds | Repeated-measures or randomised block ANOVA; Friedman test if assumptions fail |
| Comparisons against one baseline | New method compared with each existing method | Dunnett's procedure for comparisons with a control |
| Measurements over time | Throughput at several load levels on the same system | Repeated-measures ANOVA with sphericity correction, or a mixed model |
When each algorithm is run on the same datasets, a repeated-measures (or randomised block) ANOVA removes the variation due to dataset difficulty and tests the algorithm effect against the right error term. If residuals are far from normal or the scores are ranks, the Friedman test, a non-parametric test for repeated measures, compares algorithms by their ranks within each dataset.
Checking assumptions properly
- Independence. Settled by design, not by a test: identify blocks and repeated factors as above.
- Normality. Examine the residuals, not the raw scores, with a Q-Q plot. Moderate departures matter little with balanced designs; bounded measures such as accuracy near 1 may need transformation or a non-parametric test.
- Equal variances. Algorithms often differ in stability as well as in mean. For one-way designs, Delacre et al. (2019) recommend Welch's F test by default, because it loses little when variances are equal and protects error rates when they are not.
- Sphericity. For repeated measures with more than two conditions, apply a correction such as Greenhouse-Geisser and say so.
Also check for leakage before trusting any comparison. Information from the test data entering training or tuning inflates results and has affected many machine-learning-based studies (Kapoor & Narayanan, 2023).
After the F test: comparisons, effect sizes and power
Decide which comparisons matter before seeing the results. If the claim is that a new method beats each existing method, compare it with each baseline using a procedure designed for comparisons with a control (Dunnett, 1955), rather than testing every pair. If all pairs matter, use an adjusted procedure and report adjusted p values.
Report an effect size with every test. Eta squared and partial eta squared are common, but their values depend on the design; generalised eta squared allows comparison across designs (Olejnik & Algina, 2003; Lakens, 2013). Give the mean difference in the original units (for example, accuracy points or milliseconds) with a confidence interval, because that is what readers can interpret.
Finally, justify the number of datasets or seeds. Power analysis tools such as G*Power can estimate the number needed to detect a given effect (Faul et al., 2007), and Lakens (2022) sets out other legitimate justifications, such as resource limits stated openly.
Linking the analysis to your research questions
The statistical test belongs to the methodology, not only to the results chapter. Each research question or hypothesis should map to a stated comparison: which algorithms, on which benchmarks, measured how, and tested with which procedure. Writing this mapping before the experiments are run protects against choosing the analysis that happens to give a significant result, and it lets examiners see that the test answers the question asked.
Justify the benchmarks as carefully as the test. A comparison on datasets chosen because the new method does well on them says little about performance elsewhere. State how benchmarks were selected, whether any were excluded and why, and whether the conclusions are meant to generalise to a wider class of problems. Then make sure the discussion chapter claims no more than the design supports: a difference found on twelve benchmark graphs is evidence about those graphs and similar ones, not about every graph.
Worked example (illustrative)
A hypothetical thesis proposes a new graph-partitioning heuristic and compares it with three published heuristics on twelve benchmark graphs, with five random seeds per graph. The outcome is solution quality. The researcher averages the five seeds for each graph and algorithm, giving one score per cell, and fits a repeated-measures ANOVA with algorithm as the within-graph factor. Because the claim concerns the new method against each baseline, three planned comparisons with the new method as the control are tested (Dunnett, 1955). Residual plots show skew from two very easy graphs, so the Friedman test is reported as a sensitivity analysis.
The write-up reports the mean difference and confidence interval for each comparison, generalised eta squared for the algorithm effect (Olejnik & Algina, 2003), the spread across seeds, the tuning budget given to each method, and code and data availability, in line with current reproducibility expectations (Pineau et al., 2021).

Common mistakes
- Treating scores on shared datasets, folds or seeds as independent groups.
- Testing normality on raw scores instead of residuals.
- Running many unadjusted pairwise tests and highlighting the significant ones.
- Reporting p values without effect sizes or variability across seeds (Henderson et al., 2018).
- Tuning the proposed method more thoroughly than the baselines (Lindauer & Hutter, 2020).
- Explaining a performance gain with a story the experiment did not test (Lipton & Steinhardt, 2019).
Report the design, the replicates, the test and its assumptions, effect sizes and any deviations from plan, following general reporting standards for quantitative research (Appelbaum et al., 2018). Your university's thesis regulations set the format; the statistical reasoning is the same in Singapore as anywhere else. For more on reporting, see reporting ANOVA and ANCOVA and reporting hypothesis tests.
Key takeaways
- Identify the unit of replication first; results on shared datasets or seeds are paired, not independent (Henderson et al., 2018).
- Use repeated-measures or blocked ANOVA for paired designs and Welch's F for unequal variances (Delacre et al., 2019).
- Test planned comparisons, such as each baseline against the new method, with appropriate control of error (Dunnett, 1955).
- Report effect sizes and intervals, not only p values (Lakens, 2013; Olejnik & Algina, 2003).
- Equal tuning, leakage checks and open code make comparisons credible (Lindauer & Hutter, 2020; Kapoor & Narayanan, 2023; Pineau et al., 2021).
