Hypothesis testing helps you decide whether data gives enough evidence against a default assumption.
The steps
- State the null hypothesis (H₀), the “no effect” claim, and the alternative (H₁).
- Choose a significance level, usually α = 0.05.
- Calculate a test statistic from your sample.
- Find the p-value and compare it with α.
- Reject H₀ if p < α. Otherwise, fail to reject H₀.
Worked example: one-sample t-test
A supplier claims its bags weigh 50 g on average. You weigh 25 bags: the sample mean is 52 g and the sample standard deviation is 5 g. Is the true mean different from 50 g?
- H₀: μ = 50 and H₁: μ ≠ 50 (two-tailed).
- Standard error = s ÷ √n = 5 ÷ 5 = 1.
- t = (52 − 50) ÷ 1 = 2.0, with 24 degrees of freedom.
- The two-tailed p-value is about 0.057.
Because 0.057 is greater than 0.05, we fail to reject H₀ at the 5% level. The evidence is suggestive but not strong enough.
Reading p-values correctly
- A p-value is the probability of seeing data at least this extreme if H₀ were true.
- It is not the probability that H₀ is true.
- “Fail to reject” isn’t the same as proving H₀. You may simply need more data.
Practice
With the same data but n = 100, what changes?
The standard error becomes 5 ÷ 10 = 0.5, so t = 4.0 and p is far below 0.05: you would reject H₀. Larger samples detect smaller differences.