Null and Alternative Hypothesis
Hypothesis Testing
The Starting Point of Every Test
Every hypothesis test begins with two competing claims: the null hypothesis (status quo) and the alternative (what you want to prove). Getting this setup right determines the validity of your entire analysis.
- Clinical Trials — Formulating hypotheses about drug efficacy versus placebo
- Quality Control — Testing whether a process meets specifications
- Social Science — Investigating whether interventions produce measurable effects
The hypothesis you choose shapes the conclusions you can draw.
Every hypothesis test pits two competing claims against each other. Getting the setup right is crucial — the rest of the test follows mechanically from here.
The Two Hypotheses
Null Hypothesis (H₀)
- Example: μ = 500 (mean equals 500)
Alternative Hypothesis (H₁ or Hₐ)
- Example: μ ≠ 500 (mean differs from 500)
One-Tailed vs Two-Tailed Tests
Two-tailed (non-directional)
Used when you are looking for a difference in either direction.
Left-tailed (lower one-tailed)
Used when you predict the parameter is less than the null value.
Right-tailed (upper one-tailed)
Used when you predict the parameter is greater than the null value.
Python Demonstration
Formulating Hypotheses: A Framework
Step 1: Identify the parameter of interest (μ, p, σ², etc.)
Step 2: State H₀ — always includes equality, reflects current assumption
Step 3: State H₁ — reflects what you're testing for
Step 4: Determine one-tailed vs two-tailed based on the research question:
- "Is there a difference?" -> Two-tailed
- "Is it larger than?" -> Right-tailed
- "Is it less than?" -> Left-tailed
| Research Question | H₀ | H₁ | Tail |
|---|---|---|---|
| Is treatment different? | μ₁ = μ₂ | μ₁ ≠ μ₂ | Two |
| Does drug reduce BP? | μ ≥ μ₀ | μ < μ₀ | Left |
| Does method increase yield? | μ ≤ μ₀ | μ > μ₀ | Right |