1 Definition and purpose
A test statistic is a numerical summary computed from sample data for use in hypothesis testing. It condenses the observed evidence into a single quantity that can be compared with what would be expected if a null hypothesis were true. In practice, the statistic is chosen so that unusually large or small values provide evidence against the null model.
Test statistics are used across many branches of statistics because they make it possible to apply a common decision framework to different kinds of data and assumptions. Depending on the problem, the statistic may measure a difference in means, a discrepancy between observed and expected counts, a ratio of variances, or another feature of the sample.
1.1 Hypothesis testing context
In hypothesis testing, a researcher begins with a null hypothesis, often representing no effect, no difference, or a default parameter value. The test statistic summarizes how far the sample departs from that baseline. By placing the observed value in the context of a reference distribution, the analyst assesses whether the departure is plausibly due to random sampling variation.
1.2 Role in decision-making
The test statistic supports formal decisions such as rejecting or failing to reject the null hypothesis. It is paired with a rule based on a critical value, a p-value, or both. This transforms raw data into a standardized quantity that can be evaluated consistently, even when different studies use different measurements or sample sizes.
1.3 Relationship to the null hypothesis
The construction of a test statistic is usually tied directly to the null hypothesis. Many statistics are centered or scaled so that, under the null, their behavior is known or approximately known. If the observed value falls in a region that would be rare under the null, the statistic indicates that the sample is not well explained by that hypothesis.
2 Construction of a test statistic
A test statistic is built from the observed data in a way that reflects the feature being tested. The chosen formula depends on the design of the study, the parameter of interest, and the assumptions about the population or stochastic process. Some statistics are simple, while others combine several sample quantities into a single standardized value.
2.1 Sample data and summary measures
The starting point is usually a sample drawn from a population or generated by an experiment. From the sample, one computes summary measures such as a mean, proportion, variance, contingency-table count, or regression coefficient. These summaries capture the information relevant to the hypothesis and form the raw material from which the test statistic is derived.
2.2 Standardization and scaling
Many test statistics are standardized by subtracting a hypothesized value and dividing by an estimate of variability. This creates a dimensionless measure that can be compared across settings. Standardization is especially useful because it accounts for the size of the sample and the natural spread of the data.
2.3 Parameter estimation under the null
Some statistics require parameter estimates computed under the null hypothesis. This approach ensures that the reference distribution matches the model being tested. In more elaborate methods, nuisance parameters may also be estimated, so that the final statistic depends only on the aspect of the model relevant to the hypothesis.
2.4 Dependence on sampling distribution
The usefulness of a test statistic depends on how it behaves across repeated samples. Its sampling distribution under the null hypothesis determines the probability of observing various values. A well-designed statistic has a distribution that is known exactly in some cases or can be approximated accurately in others.
3 Common types of test statistics
Different statistical problems call for different forms of test statistics. Some are designed for continuous data, others for counts or categorical data, and still others for likelihood-based models. Despite their differences, they serve the same general purpose: to measure the strength of evidence against a null hypothesis.
3.1 Z statistic
The z statistic is typically used when the sampling distribution of a standardized mean or proportion is approximately normal. It compares the observed estimate with the null value in units of standard error. In large samples, the z statistic often provides a convenient approximation even when exact normality is not present.
3.2 T statistic
The t statistic is similar to the z statistic but includes an estimated standard deviation, making it especially useful when the population variance is unknown. It appears prominently in tests about means and regression coefficients. Under suitable assumptions, it follows a t distribution with an associated number of degrees of freedom.
3.3 Chi-square statistic
The chi-square statistic is widely used for categorical data, especially in goodness-of-fit tests and tests of independence. It measures the discrepancy between observed and expected frequencies. Large values indicate that the observed counts differ more than would be expected under the null model.
3.4 F statistic
The F statistic is a ratio of two variance-related quantities. It is central to analysis of variance and to tests comparing nested regression models. Because it compares explained variation to unexplained variation, it is useful when assessing whether a group of predictors or treatment levels contributes meaningfully to a model.
3.5 Likelihood-ratio statistic
The likelihood-ratio statistic compares the likelihood of the data under two nested hypotheses, usually a null model and a more general alternative. It is formed from the ratio of maximized likelihoods or, equivalently, from a difference in log-likelihoods. This statistic is valued for its general applicability in parametric modeling.
3.6 Score statistic
The score statistic, also called the Lagrange multiplier statistic in some contexts, evaluates the slope of the log-likelihood function at the null hypothesis. It uses information available without fitting the full alternative model. This can make it computationally convenient, especially in complex models.
4 Reference distributions
Once a test statistic is computed, it must be interpreted relative to a reference distribution. This distribution describes what values would typically occur if the null hypothesis were true. The comparison between the observed statistic and this distribution underlies the formal test.
4.1 Sampling distribution under the null
The key reference is the sampling distribution of the statistic under the null hypothesis. It answers the question: if the null were correct and the study were repeated many times, how would the statistic vary? The answer may be exact for some models or approximate for others.
4.2 Exact distributions
In certain settings, the null distribution is known exactly. Classic examples include the t, chi-square, and F distributions in standard parametric problems. Exact results depend on assumptions such as normality, independence, and correct model specification.
4.3 Asymptotic distributions
When exact distributions are difficult to obtain, asymptotic theory provides approximate distributions for large samples. Under regularity conditions, many test statistics converge to familiar forms, such as normal, chi-square, or related distributions. These approximations are widely used because they simplify inference and often perform well in practice.
4.4 Critical values and p-values
The reference distribution is used to obtain critical values and p-values. A critical value marks the boundary of a rejection region, while a p-value measures how extreme the observed statistic is under the null hypothesis. Both approaches rely on the same distributional comparison and express the evidence in standardized form.
5 Interpretation
Interpreting a test statistic requires attention to its direction, magnitude, and associated hypothesis. A value that is extreme in one direction may support the alternative hypothesis, while a value near the center of the reference distribution suggests little evidence against the null. The meaning of “extreme” depends on the test.
5.1 Large versus small values
For many test statistics, large positive values indicate evidence against the null, though some tests use absolute values or squared values so that extremeness can occur in either direction. A small value may also be important when the statistic is designed so that both unusually low and unusually high values matter. The interpretation depends on the construction of the test.
5.2 One-sided and two-sided tests
In a one-sided test, only departures in a specified direction are considered evidence against the null. In a two-sided test, deviations in either direction are relevant. The same test statistic can serve both purposes, but the rejection region and p-value calculation differ.
5.3 Direction of evidence
The sign of a statistic often carries directional information. For example, a positive standardized mean difference may indicate that a sample mean exceeds a hypothesized value, while a negative value suggests the opposite. In symmetric tests, the sign helps identify the direction of the effect even when the final decision depends on absolute magnitude.
5.4 Statistical significance
A test statistic contributes to the determination of statistical significance through its p-value or position relative to a critical threshold. Statistical significance does not by itself measure practical importance; it only indicates that the observed data are unlikely under the null model. The statistic is therefore an inferential tool rather than a direct measure of real-world impact.
6 Examples of use
Test statistics appear in a wide range of standard procedures. They are used whenever data must be compared with a theoretical expectation, whether the question concerns a mean, a variance, a table of counts, or the fit of a model. Their specific formulas vary, but the logic of comparison remains the same.
6.1 Mean comparison tests
In tests comparing one mean or two means, the test statistic often measures the difference between observed and hypothesized averages in standard-error units. Such tests are common in experimental studies and survey analysis. The statistic helps determine whether an observed difference is likely to reflect a genuine population effect.
6.2 Variance tests
Variance tests use statistics based on sample spread, often by comparing a sample variance with a hypothesized population variance or with another variance. These tests are sensitive to the dispersion of the data and are useful in quality control and model checking. Their reference distributions depend strongly on distributional assumptions.
6.3 Independence tests
For categorical variables, a chi-square test statistic is commonly used to assess independence in contingency tables. The statistic compares observed cell frequencies with those expected if the variables were unrelated. Larger discrepancies suggest that the variables may be associated.
6.4 Goodness-of-fit tests
Goodness-of-fit tests evaluate whether observed data conform to a specified distribution or model. The test statistic measures how far the observed pattern departs from the expected pattern under the null. This approach is used for counts, probabilities, and model diagnostics in many applied contexts.
7 Properties and assumptions
The quality of a test statistic depends on mathematical properties such as its behavior under repeated sampling and its sensitivity to violations of assumptions. A statistic is usually chosen not only for convenience but also for desirable inferential performance. These properties influence reliability, interpretability, and practical usefulness.
7.1 Unbiasedness and consistency
Some test statistics are constructed so that, under the null, their expected behavior matches the reference model. Others are valued for consistency, meaning that they become more decisive as sample size grows when the alternative hypothesis is true. These properties help ensure that the statistic reflects the underlying pattern rather than random fluctuation alone.
7.2 Power and efficiency
Power refers to the probability that a test statistic leads to rejection when the alternative hypothesis is true. Efficiency concerns how effectively the statistic uses the available data to detect departures from the null. A statistic with higher power or efficiency is generally preferred, provided it also meets the assumptions of the model.
7.3 Robustness to assumption violations
Real data may deviate from idealized assumptions such as normality, independence, or equal variance. Some test statistics remain reasonably reliable under mild departures, while others are highly sensitive. Robust methods aim to preserve interpretability and performance even when conditions are imperfect.
7.4 Degrees of freedom
Many test statistics are associated with degrees of freedom, which reflect the amount of information available after estimating parameters or imposing constraints. Degrees of freedom affect the shape of the reference distribution and therefore the resulting p-value. They are especially important in t, chi-square, and F procedures.
8 Related concepts
Test statistics are closely connected to several other ideas in statistical inference, but they are not the same as those ideas. Distinguishing among them helps prevent confusion when interpreting results. Each concept plays a different role in the workflow of analysis.
8.1 Test statistic versus estimator
An estimator is a rule for estimating an unknown parameter, whereas a test statistic is a quantity used to evaluate a hypothesis. The two may be numerically related; for example, an estimator may be standardized to form a test statistic. Still, the estimator’s goal is estimation, while the statistic’s goal is hypothesis assessment.
8.2 Test statistic versus p-value
A test statistic is the observed numerical value derived from the data. A p-value is computed from that statistic and its reference distribution. The statistic comes first in the inferential process, and the p-value translates it into a probability-based summary of extremeness.
8.3 Test statistic versus confidence interval
A confidence interval gives a range of plausible values for a parameter, whereas a test statistic provides a basis for deciding whether to reject a particular hypothesis. The two are linked mathematically in many standard settings. For some tests, a null value is rejected at a given significance level if and only if it lies outside the corresponding confidence interval.
8.4 Composite hypotheses
A composite hypothesis specifies a set of possible parameter values rather than a single value. Test statistics for composite hypotheses often require nuisance parameter handling or likelihood-based methods. Because the null is broader, the statistic must account for more than one possible configuration under the hypothesis.