Overview
Hypothesis testing is a formal procedure for using sample data to evaluate claims about population parameters.
The Process
- State hypotheses (H0 and H1)
- Choose significance level (α)
- Collect data and calculate test statistic
- Find p-value or critical value
- Make decision and state conclusion
Hypotheses
Null Hypothesis (H0)
The default assumption, typically:
- No effect
- No difference
- Status quo
Alternative Hypothesis (H1 or Ha)
What we're trying to find evidence for:
- There is an effect
- There is a difference
- Something has changed
Types of Tests
| Test Type | H0 | H1 | Rejection Region |
|---|
| Two-tailed | μ=μ0 | μ=μ0 | Both tails |
| Left-tailed | μ≥μ0 | μ<μ0 | Left tail |
| Right-tailed | μ≤μ0 | μ>μ0 | Right tail |
Significance Level (α)
The probability of rejecting H0 when it's actually true (Type I error rate).
Common values: α=0.05, 0.01, 0.10
Test Statistic
For Means (σ known or large n)
Z=σ/nxˉ−μ0
For Means (σ unknown, small n)
t=s/nxˉ−μ0
For Proportions
Z=p0(1−p0)/np^−p0
P-Value
The probability of observing a test statistic as extreme or more extreme than the one calculated, assuming H0 is true.
Decision Rule
If p-value≤α⇒Reject H0
If p-value>α⇒Fail to reject H0
Critical Value Approach
Compare test statistic to critical value(s):
If ∣test stat∣>critical value⇒Reject H0
Decision Outcomes
| H0 True | H0 False |
|---|
| Reject H0 | Type I Error (α) | Correct |
| Fail to Reject | Correct | Type II Error (β) |
Steps Illustrated
State H₀, H₁
↓
Choose α
↓
Collect data
↓
Calculate test statistic
↓
Find p-value
↓
┌────────┴────────┐
↓ ↓
p ≤ α p > α
Reject H₀ Fail to reject H₀
Examples
Example 1: Two-Tailed Test
Claim: μ=100. Sample: n=36, xˉ=103, σ=12, α=0.05
H0:μ=100
H1:μ=100
Z=12/36103−100=23=1.5
p-value=2×P(Z>1.5)=2×0.0668=0.1336
0.1336>0.05⇒Fail to reject H0
Example 2: One-Tailed Test
Claim: μ>50. Sample: n=25, xˉ=53, s=8, α=0.05
H0:μ≤50,H1:μ>50
t=8/2553−50=1.63=1.875
df=24,tcrit=1.711
1.875>1.711⇒Reject H0
Example 3: Proportion Test
Claim: p>0.5. Sample: n=200, p^=0.56, α=0.05
H0:p≤0.5,H1:p>0.5
Z=0.5×0.5/2000.56−0.5=0.03540.06=1.69
p-value=P(Z>1.69)=0.0455
0.0455<0.05⇒Reject H0
Key Points
- We never "prove" H0 or "accept" H0
- Failing to reject ≠ proving true
- Statistical significance ≠ practical significance
- Choose α before analyzing data