Hypothesis Testing
Hypothesis testing is a framework for evaluating how compatible an observed result is with a specified null hypothesis. It formalizes a question that arises constantly in quantitative research: is a pattern in the data more plausible as a genuine signal or as ordinary sampling noise?
Hypotheses
A test compares two competing statements about a population parameter, such as a proportion or a mean .
- The null hypothesis specifies a default state of affairs — typically “no effect” or “no difference” — that fixes the parameter at a value used for all subsequent probability calculations, e.g. .
- The alternative hypothesis contradicts the null and is what a significant result is taken as evidence for, e.g. .
The hypotheses are stated before data collection, in terms of population parameters rather than sample statistics.
Directional and nondirectional alternatives
- A nondirected (two-tailed) alternative such as does not specify a direction; extreme results in either tail count against the null.
- A directed (one-tailed) alternative such as names a direction in advance and concentrates the whole rejection region in one tail.
The choice between them must be made a priori, on substantive grounds. Choosing a one-tailed test after observing the direction of the result inflates the Type I error rate: whichever direction the data show then receives a full- one-tailed test, giving two -sized chances to reject. See P-Values for how each choice defines a different tail probability.
Significance level and critical regions
The significance level is a cutoff for compatibility chosen before data collection; conventional values are , , and . It defines the critical region (rejection region): a set of extreme outcomes whose total probability under the null is at most , together with the critical value that marks where the region begins. Formally, with test statistic and critical value , the region is chosen so that
in a one-tailed test. Two equivalent decision routes follow: compute the p-value and reject when (the p-value approach), or reject when the observed statistic falls in the critical region (the critical-value approach). They always agree.
For a two-tailed test at , the critical-value route splits across the tails ( in each), but the p-value route compares the observed p-value to the full : the two-tailed p-value already sums the evidence from both tails, so nothing is halved or doubled. An observed therefore rejects at even though each tail’s rejection area is — the two routes are two computations of the same decision, not two different significance levels.
For discrete test statistics, no cutoff may achieve exactly , so the first cutoff whose tail probability does not exceed is used. The actual level is then at or below the nominal , often strictly below it. The Sign Test shows the construction in full; continuous statistics such as and admit cutoffs at exactly .
A four-step procedure
The same sequence of steps underlies every test in this collection, from exact binomial tests to tests:
- State the hypotheses. Define and in terms of a population parameter, and decide whether the test is one- or two-tailed.
- Set the criteria for a decision. Choose before seeing the data; if using the critical-value route, determine the critical region implied by under .
- Compute the test statistic and p-value. Reduce the data to a statistic whose null distribution is known, and evaluate how extreme the observed value is under that distribution.
- Make a decision and interpret it. Reject when (or when the statistic falls in the critical region); otherwise fail to reject.
Decision language
The vocabulary of step 4 is load-bearing:
- A nonsignificant result is “fail to reject ”, never “accept ”. The test evaluates evidence against the null, not evidence for it.
- Failing to reject does not establish that the null is true. A test with small sample size may fail to detect effects that exist; see Statistical Power.
- Rejecting does not prove in any logical sense; it flags the data as improbable under the null model.
Decisions versus reality: Type I and Type II errors
Every test outcome can be classified against the unobservable state of nature. Writing for the Type I error rate and for the Type II error rate:
| true | false | |
|---|---|---|
| Fail to reject | Correct decision () | Type II error () |
| Reject | Type I error () | Correct decision (power ) |
Each entry is a conditional probability of a decision given reality:
Two consequences matter in practice:
- can be false in many ways — any parameter value other than the null qualifies. The probabilities in the ” false” column therefore depend on which alternative is actually true; and power are not single numbers until an alternative is specified. Computing them is the business of Statistical Power.
- Whether a particular study’s decision was an error can never be known from that study alone, because the state of nature is unknown. Error rates are long-run properties of the procedure, not diagnosable properties of one outcome.
Error trade-offs
At a fixed sample size, and trade against each other: shrinking (demanding stronger evidence before rejection) enlarges (missing real effects), and vice versa. Reducing both simultaneously requires more or better data — a larger sample, a stronger design, or a less variable measurement. Power analysis, covered under Statistical Power, is the prospective tool for choosing sample size so that is acceptably small for an effect worth detecting.
Illustration
A coin is tossed times and lands heads times. Is this evidence of bias towards heads? Under the number of heads is , and the observed tail probability is
With set in advance, , so is not rejected: these data do not constitute sufficient evidence of bias towards heads. Because the binomial is discrete, the critical region begins at , where ; the test’s actual level is about , well below the nominal . The conclusion does not show the coin is fair — only that ten tosses with eight heads are not, by this criterion, unusual enough to convict it. The paired-data counterpart of this computation is the Sign Test.
Connections
- P-Values develops the tail-probability definition, its misreadings, and the reporting standards that keep the procedure honest.
- Probability, especially the asymmetry of conditional probability , underlies the correct reading of and of p-values.
- Sampling Distributions supplies the null distributions for statistics such as and .
- The four-step procedure is instantiated for paired binary data in the Sign Test and for means in t Tests.