Test statistic

By Jude Wallis · Updated

A test statistic is a single number computed from sample data that measures how far the sample falls from what the null hypothesis predicts.

A test statistic is one number computed from the sample whose behavior under H0H_0 is known in advance. That second half is what makes it worth computing: without a named reference distribution, and its degrees of freedom where it has them, a test statistic converts into nothing. The common ones in an introductory course are zz, tt, and χ2\chi^2 (chi-square), and the first two share the single recipe in standardized test statistic.

A sample of n=16n = 16 has xˉ\bar{x} (x-bar) equal to 52.4 and s=6s = 6, tested against H0:μ=50H_0: \mu = 50. The standard error is 6/16=1.56/\sqrt{16} = 1.5, so t=52.4501.5=1.60t = \frac{52.4 - 50}{1.5} = 1.60, meaning the sample mean sits 1.60 standard errors above the value the null claims. On 15 degrees of freedom the one-sided p-value is 0.0652. Read that same 1.60 against the standard normal curve and you get 0.0548, so the statistic on its own does not settle the answer.

The misreading: "z=4.1z = 4.1, so the effect is huge." The magnitude counts standard errors, not units of the variable, and the standard error shrinks as n\sqrt{n} grows. A difference far too small to act on produces a large statistic once the sample is large enough. Read the size of an effect from the estimate and its confidence interval, and read surprise from the test statistic.

Not every test statistic is signed. χ2\chi^2 squares its terms, so it is never negative, carries no direction, and is read in one tail only: a χ2\chi^2 of 4.11 and a zz of 4.11 have nothing to do with each other. Whether one tail or two get counted also belongs to the alternative hypothesis rather than the statistic. Here t=1.60t = 1.60 gives 0.0652 one-sided and 0.1304 two-sided.

Computing the statistic is the carrying-out half of each inference topic, for instance AP Statistics topic 3.7, Carrying Out a Test for a Population Proportion.

Where this comes up

28 pages on the site use this term.

More hypothesis testing terms, or browse the full statistics glossary.