PROBABILITY & STATISTICS / 9. HYPOTHESIS TESTING
Confidence Intervals & Hypothesis Testing
z-test, t-test — making decisions from data with quantified uncertainty
EXPLANATION
Hypothesis testing is a framework for making decisions from data. Steps: 1. State H₀ (null hypothesis) and H₁ (alternative) 2. Choose significance level α (usually 0.05) 3. Compute test statistic 4. Compute p-value = P(seeing this result or more extreme | H₀ is true) 5. If p-value < α → reject H₀ p-value: NOT the probability H₀ is true. It's the probability of observing data this extreme IF H₀ were true. z-test: use when n is large (≥30) OR population variance σ² is known. z = (x̄ - μ₀) / (σ/√n) t-test: use when n is small AND variance is unknown (most real cases). t = (x̄ - μ₀) / (s/√n) with ν = n-1 degrees of freedom Confidence Interval: range of plausible values for the true parameter. 95% CI = x̄ ± t(0.025, n-1) × s/√n "95% of CIs constructed this way will contain the true mean." Type I error (α): reject H₀ when it's true (false positive) Type II error (β): fail to reject H₀ when it's false (false negative) Power = 1 - β: probability of correctly detecting an effect
DIAGRAM
Two-tailed t-test (α=0.05):
Reject H₀ Accept H₀ Reject H₀
──────────┬─────────────┬──────────
│ │
-t* t*
│ 95% │
│ of area │
2.5% 2.5%
t* = t(0.025, df) ← critical value
p-value interpretation:
p=0.001 → very strong evidence against H₀
p=0.04 → reject H₀ at α=0.05
p=0.06 → fail to reject at α=0.05 (borderline)
p=0.80 → no evidence against H₀CODE