Hypothesis testing

Hypothesis testing is a statistical method for deciding whether data give enough evidence to reject a default assumption, such as the assumption that two AI models perform equally well.

Suppose a new AI model scores 2 points higher than an old one on a benchmark. Is it better, or did it get lucky with these particular questions? Hypothesis testing is the standard way to answer. It starts from a default assumption, the null hypothesis, that there is no real difference. It then asks how surprising the observed result would be if that were true.

The surprise is summarised as a p-value: the probability of seeing a result at least as extreme as the one observed, assuming the null hypothesis holds. If the p-value falls below a threshold chosen in advance, often 0.05, the null hypothesis is rejected and the result is called statistically significant. Two errors are possible. Rejecting a null hypothesis that is true is a Type I error, a false positive; failing to reject one that is false is a Type II error, a false negative. At a 0.05 threshold, when there is no real difference, about one test in 20 will still flag one.

The ideas are old. In 1710 John Arbuthnot examined London birth records and argued that more boys than girls were born every year too consistently to be chance. Karl Pearson developed the chi-squared test in 1900. In the 1920s and 1930s Ronald Fisher popularised significance testing with p-values, while Jerzy Neyman and Egon Pearson added alternative hypotheses and the two types of error. Textbooks later merged the rival approaches into what is now called null hypothesis significance testing.

AI evaluation often skips this step. Benchmarks are samples of questions, so scores carry sampling error, and small leads on small tests can vanish on a different sample. In November 2024 Evan Miller published Adding Error Bars to Evals, which treats evaluation questions as a sample from a larger population and gives formulas for comparing two models and planning how many questions an evaluation needs. Product teams use the same logic in A/B tests, deciding whether a change really improved user outcomes.

The method is easy to misuse. In March 2016 the American Statistical Association issued a statement setting out six principles, including that a p-value does not measure the probability that a hypothesis is true, that decisions should not rest only on whether a threshold is passed, and that significance does not measure the size or importance of an effect. Running many comparisons and reporting only the significant ones inflates false positives. In practice, a claim that one model beats another means more when it comes with confidence intervals and an effect size, not just a ranking.

Common questions

What is a null hypothesis?

It is the default assumption a test tries to find evidence against, usually that there is no effect or no difference. When comparing two AI models, the null hypothesis would be that they perform equally well on the underlying population of tasks.

What does p less than 0.05 mean?

It means that if the null hypothesis were true, a result at least as extreme as the one observed would occur less than 5 per cent of the time. It does not mean there is a 95 per cent chance the finding is real, and it says nothing about how large or important the effect is.

How is hypothesis testing used in AI evaluation?

It is used to judge whether differences between models on benchmarks are larger than sampling noise, and in A/B tests of AI products to decide whether a change genuinely improved results. Good practice reports standard errors or confidence intervals alongside scores.

Is statistical significance the same as practical importance?

No. With enough data, a tiny and useless difference can be statistically significant, and with too little data an important difference can fail to reach significance. Effect sizes and confidence intervals show how large a difference is.

Finding more

Search for "null hypothesis significance testing", "ASA statement on p-values" or "statistical analysis of LLM evaluations" to learn the method and its pitfalls. Reliable sources include statistics textbooks and university course notes, the American Statistical Association's guidance, and research papers on evaluation methodology. Be sceptical of benchmark comparisons that rank models by small margins without any measure of uncertainty.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.