Two-sided test
By Jude Wallis · Updated
A two-sided test has an alternative hypothesis using a not-equal sign, so a departure from the null in either direction counts as evidence.
A two-sided test states with a not-equal sign, so the p-value collects probability from both tails: it is the chance, under , of a statistic at least as far from the null value as yours in either direction. The null still carries an equals sign and the test is still run at that boundary. Use it whenever the question is only whether something changed.
Take from a test of . The upper tail area is , and the two-sided p-value is 0.0801. At (alpha) that fails to reject, while the matching upper-tailed one-sided test gives 0.0401 and rejects. Identical data, opposite verdicts, which is why is written before the data are seen.
Here is the sentence to stop writing: "a two-sided p-value is always twice the one-sided p-value." The doubling needs two conditions, that the null distribution is symmetric about the null value and that the one-sided alternative points the way the data actually fell. Keep and set . That one-sided p-value is 0.9599, and twice it is 1.92, which is not a probability. The safe statement is that the two-sided p-value is twice the tail area beyond the observed statistic on the side where it landed.
Symmetry is a real condition. Test with 10 successes in 20 trials against the exact binomial null instead of a normal model. The upper tail is 0.0480, so doubling would report 0.0959, but the outcomes at least as far from the null mean of 6 are and , which total . The and models this course uses are symmetric, so doubling is safe there; the reason is the model, not the word two-sided.
A two-sided test at usually matches the 95% confidence interval, though for proportions the two can disagree in close cases, because the test builds its standard error from the null value and the interval from the sample.
Where this comes up
- What if a two-proportion confidence interval has 0?Guide
- When a Confidence Interval and P-Value DisagreeGuide
- Inference for means: 8 mixed t procedure problemsPractice
- One-sample t interval practice: 8 problemsPractice
- One-tailed vs two-tailed tests explainedComparison
- AP Stats 3.6: p-ValuesAP topic
- Two-sample t test practice problems and intervalsPractice
More hypothesis testing terms, or browse the full statistics glossary.