Two-Tailed Test — Definition, Formula & Example
A two-tailed test is a hypothesis test that checks whether a parameter is different from a claimed value in either direction, higher or lower. You use it when you have no reason in advance to expect the change to go one particular way.
A two-tailed (two-sided) test has alternative hypothesis . Its rejection region lies in both tails of the test statistic's sampling distribution under . At significance level , each tail holds probability . The p-value is the probability, assuming is true, of getting a test statistic at least as far from the null value as the observed one, in either direction.
Key Formula
Where:
- = the observed value of the test statistic
- = a standard normal random variable (use a t-distribution with the correct degrees of freedom for a t-test)
- = the critical value that cuts off area in the upper tail
- = the significance level, split equally between the two tails
Worked Example
Problem: A machine is supposed to fill cereal boxes with a mean of 16 oz. The fill weights have known standard deviation oz. A random sample of 100 boxes has mean oz. At , is there evidence that the true mean differs from 16 oz?
Step 1: State the hypotheses. Overfilling and underfilling both matter, so the alternative is two-sided.
Step 2: Compute the standard error, then the test statistic.
Step 3: Find the p-value by doubling the upper-tail area. A result as extreme in the lower tail would count too.
Step 4: Compare the results. With , each tail holds 0.025, so the critical values are . Both checks agree.
Answer: Reject . The p-value is about 0.0455, which is below 0.05. There is convincing evidence that the true mean fill weight differs from 16 oz.
Why It Matters
A two-tailed test at level always matches a confidence interval. In the example, the 95% interval is , or . It excludes 16, just as the test rejected . Two-sided tests are the default in AP Statistics free-response questions and in published research, unless a direction is justified before the data are collected.
Common Mistakes
Mistake: Reporting the one-tail area as the p-value. In the example this would give 0.02275 instead of 0.0455. Another version of this error is using the one-sided critical value 1.645 instead of 1.96.
Correction: In a two-sided test, extreme results in either direction count as evidence against . Double the tail area. Put in each tail when you find the critical value.
