Test statistic
Intermediate
What you need first. Nothing else on this path comes first. This page is part of Statistical inference.
In statistical inference, a test statistic is a function of the sample used to decide whether a stated hypothesis is rejected. A hypothesis test ends in a comparison. Some function of the sample is set beside a reference distribution that was fixed with the hypothesis. That function is the test statistic. The reference distribution says which of its values are surprising if the hypothesis is true. The statistic itself is only the number the sample produced. [1] [2]
Test statistic
| Fact | Value |
|---|---|
| Topic | Statistical inference |
| Listed on | Statistical inference |
| Worked example | 1 |
Motivating example
A simple random sample of 1,028 US adults in March 2013 found that 56 percent supported nuclear arms reduction. The question is whether that is convincing evidence, at the 5 percent level, that a majority of Americans supported the policy. The null hypothesis takes the population proportion to be . The sample proportion is . The gap is not yet a test. It becomes one when it is divided by the standard error computed from the null value, the sample size, and the normal approximation. The resulting is the test statistic. [2]
Intuition
Dodge’s account of a test has a fixed order. State the null and the alternative. Choose a significance level. Name the distribution of the statistic under the null. Compute the critical value and the rejection region. Then see whether the statistic computed from the sample lands in that region. The statistic is the piece that the sample is allowed to change. The rejection region is chosen before the data, from the null distribution. A large value is evidence against the null only because the region was drawn in the tail of that distribution. A small value, for a statistic that rejects only when it is large, is what the null tends to produce. [1]
The same idea appears in a rank test and in a proportion test. The Kruskal–Wallis statistic is large when the rank sums are uneven, and the test rejects for large only. The normal for a proportion is large when the sample proportion is far from the null value on the standard-error scale. In both cases the statistic is a reduction of the sample to one number, and the test is a rule for that number. [3] [2]
Definition
A test statistic is a function of the sample used to decide a hypothesis. For a single proportion, with null value , sample proportion , and sample size , the normal approximation uses
The standard error is computed from , not from , because the reference distribution is the distribution of when the null is true. Under that null, and when and are both at least 10, is referred to a standard normal curve. The -value is a tail area of that curve beyond the observed . The test statistic and the -value are different objects. One is the observed number. The other is a probability computed from it under the null. [2]
Neyman and Pearson’s formulation makes the statistic the quantity whose null distribution determines the critical value. The decision rule rejects the null when the observed statistic falls in the rejection region, and does not reject it when the statistic falls in the acceptance region. The level is the null probability of the rejection region. It is set with the region, not read off after the sample has chosen a convenient threshold. [1]
Statistical use
OpenIntro’s four steps for a one-proportion test put the statistic in the calculation step, after the hypotheses and the conditions. Prepare: name the parameter, the hypotheses, the level, , and . Check: the observations are independent, and the success-failure counts and are large enough for the normal approximation. Calculate: the standard error from , then , then the tail probability. Conclude by comparing that probability with . If the -value is below , reject the null. If it is not, the sample has not met the pre-set standard. In either case the conclusion is about the population claim, in the language of the study, and it reports the statistic that was compared. [2]
A different testing problem uses a different statistic and the same logic. A chi-squared comparison of several groups, or a rank comparison, reduces the sample to one number and refers that number to a distribution fixed by the null. Reporting “significant” without the statistic, the degrees of freedom or the table, and the level, leaves out the comparison the test consisted of. [1] [3]
Worked example
For the arms-reduction poll, , , and . The null success-failure counts are , well above 10. The standard error is
The test statistic is
The upper tail beyond on a standard normal curve is about . Doubling it for a two-sided test gives a -value of about , which is below , so the test rejects . The poll is evidence that a majority supported arms reduction in that sample’s population. The number is the test statistic. The number is the tail probability. [2]
Your turn. A sample of size has , and the null value is again . Compute the standard error from the null and the test statistic .
The standard error is . Then .
Common misconceptions
The test statistic is not the -value, and it is not the estimate. In the poll, is the estimate, is the statistic, and is the -value. Quoting only the estimate leaves out the standardisation. Quoting only the -value leaves out the direction and the size of the departure. [2]
The standard error in the denominator is not the standard error of a confidence interval for . A confidence interval usually plugs in . The test plugs in , because the curve being used is the null curve. Using in the test’s standard error refers to a different distribution from the one the critical value was taken from. [2]
A statistic that was chosen after looking at several candidates is not the statistic whose null distribution was tabulated for one pre-specified comparison. The rejection region belongs to the procedure that was declared. Searching and then treating the winner as if it had been declared moves the test into a different procedure, with a different null probability of rejection. [1]
Connections
A p-value is the null tail probability of the test statistic, or of values at least as extreme. A significance level is the null probability of the rejection region, fixed before the statistic is compared with it. A confidence interval standardises the same estimate with a standard error that does not lock the parameter at the null value. The Kruskal–Wallis test is the rank version of the same pattern: one statistic, a one-sided rejection region, a reference distribution determined by the null. Neyman and Pearson’s separation of the null from the alternative is what gives the rejection region a type I error to control. The test statistic is the sample’s input to that region. [1] [2] [3]
Check yourself
Try these questions before opening an answer.
Null standard error
In a test of a single proportion, why is the standard error computed from the null value rather than from the sample proportion?
The reference distribution is the distribution of the statistic when the null is true, so the standardisation uses that null value.
Three different numbers
A proportion test reports a sample proportion, a Z statistic, and a p-value. What does each one measure?
The sample proportion is the estimate. The Z statistic is the estimate minus the null value, divided by the null standard error. The p-value is a tail probability of that statistic under the null.
After the fact
Several comparisons are examined and the most extreme statistic is then treated as the pre-specified test. What has changed about the null probability of rejection?
The rejection probability is now the probability for the search, not the probability tabulated for one pre-specified statistic.
See also
Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability
References
- ^ a b c d e f a. (pp. 250–251) b. (pp. 250–251) c. (pp. 250–251) d. (p. 251) e. (pp. 250–251) f. (pp. 250–251) Dodge, Yadolah (2008). The Concise Encyclopedia of Statistics. Springer. https://doi.org/10.1007/978-0-387-32833-1
- ^ a b c d e f g h i a. (Ch. 5, §5.3) b. (Ch. 5, §5.3) c. (Ch. 5, §5.3) d. (Ch. 5, §5.3) e. (Ch. 5, §5.3) f. (Ch. 5, §5.3) g. (Ch. 5, §5.3) h. (Ch. 5, §5.3) i. (Ch. 5, §5.3) Diez, D. M., Çetinkaya-Rundel, M. & Barr, C. D. (2019). OpenIntro Statistics (4th ed.). OpenIntro. https://www.openintro.org/book/os/
- ^ a b c a. (§7.4.1) b. (§7.4.1) c. (§7.4.1) Heckert, N. A., Filliben, J. J., Croarkin, C. M., Hembree, B., Guthrie, W. F., Tobias, P. & Prinz, J. (2002). NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.1: The Kruskal-Wallis test. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/prc/section4/prc41.htm
Cite this page
StatWiki (2026). "Test statistic." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/test-statistic.html
@misc{statwiki_test_statistic,
author = {{StatWiki}},
title = {{Test statistic}},
year = {2026},
url = {https://www.statwiki.io/articles/test-statistic.html},
urldate = {2026-12-02},
note = {StatWiki, last updated 2 December 2026}
}