Confidence Intervals & Hypothesis Testing
Build and interpret confidence intervals, set up hypotheses, compute test statistics and p-values, and conclude without overclaiming.
1 Confidence intervals: estimate with a margin
A confidence interval is a range of plausible values for a parameter, built as estimate ± margin of error. The confidence level (90%, 95%, 99%) picks the critical value z*.
Bigger n → smaller margin. Higher confidence → wider interval (same n).
- x̄ = 50, σ = 12, n = 36, z* = 1.96.
- Margin = 1.96 × 12/√36 = 1.96 × 2 = 3.92.
- CI: 50 ± 3.92 = (46.08, 53.92).
- 40 of 100 voters favor a measure: p̂ = 0.40, z* = 1.96.
- SE = √(0.4×0.6/100) = 0.049; margin = 1.96 × 0.049 ≈ 0.096.
- CI: 0.40 ± 0.096 = (0.304, 0.496).
2 What “95% confident” really means
The 95% describes the method, not this one interval. If you repeated the sampling endlessly, about 95% of the intervals built this way would capture the true parameter.
Wrong: “There is a 95% chance μ is in (46.1, 53.9).” μ is fixed — the interval either caught it or missed. Also wrong: “95% of the data is in the interval.” The interval is about the parameter, not the data.
3 Hypotheses: H0 vs Ha
A hypothesis test weighs evidence against a default claim. H0 (null) is the status quo with equality; Ha (alternative) is what you suspect, with <, >, or ≠.
The direction in Ha (<, >, ≠) decides whether the p-value uses one tail or two.
- Claim: batteries last 100 hours. Suspicion: they last less.
- H0: μ = 100; Ha: μ < 100 (one-sided).
4 Test statistic and p-value
The z-statistic measures how many SEs the sample is from H0. The p-value is the probability of data this extreme if H0 were true — small p argues against H0.
Reject H0 when p < α (often 0.05). Then: “convincing evidence for Ha” — never “proof”. The threshold α is called the significance level.
- x̄ = 105, μ0 = 100, σ = 15, n = 25: z = (105−100)/(15/5) = 1.67.
- Two-sided p ≈ 0.096 > 0.05: fail to reject H0 — not convincing evidence the mean differs.
5 Common mistakes
6 Key vocabulary
- Confidence interval
- Estimate ± margin; a range of plausible parameter values.
- Margin of error
- z* × SE; shrinks with √n.
- Critical value z*
- 1.645 (90%), 1.96 (95%), 2.576 (99%).
- Null / alternative
- H0: status quo (=); Ha: suspicion (<, >, ≠).
- p-value
- P(data this extreme | H0 true). Small p → reject H0.
- Significance level α
- Threshold (often 0.05) for rejecting H0.