🧪 Hypothesis Testing
Last Updated: Jan 2026
Hypothesis Testing is a statistical method used to make decisions about a population using sample data.
We test an assumption (hypothesis) and decide whether there is enough evidence to:
- Accept it, or
- Reject it
🗣 Hinglish Tip: Hypothesis testing = ek claim ko data ke through prove ya disprove karna
Used when we want to:
- Compare values
- Check claims
- Validate assumptions
- Make decisions with confidence
Real-World Use Cases
- Medicine → Is new drug effective?
- Manufacturing → Is defect rate acceptable?
- Business → Did sales increase after campaign?
- ML / Data Science → Model performance comparison
Basic Terminology
- Population → Entire data
- Sample → Part of population
- Test Statistic → Value calculated from sample
- Significance Level (α) → Probability of rejecting true hypothesis (Common: 0.05)
Symbols Use in Hypothesis Testing:
- H0 = Null Hypothesis/default assumption
- H1 = Alternative Hypothesis
- α = Significance Level
- p-value/critical value = Probability of rejecting true hypothesis
Types of Hypothesis
Every hypothesis test has two hypotheses:
Null Hypothesis (H₀)
- Default assumption
- States no effect or no difference
Examples:
H₀: μ = 50
H₀: p = 0.4
🗣 Hinglish Tip: Null hypothesis = kuch bhi change nahi hua
Alternative Hypothesis (H₁ or Hₐ)
- Opposite of null hypothesis
- Indicates effect or difference
Examples:
H₁: μ ≠ 50
H₁: μ > 50
H₁: μ < 50
Types of Alternative Hypothesis (Based on Direction)
Two-Tailed Test
- Tests both sides
- Checks for any difference
H₀: μ = μ₀
H₁: μ ≠ μ₀
Use case:
- Quality control
- Equality check
Right-Tailed Test
- Tests greater than
- Focus on right side
H₀: μ ≤ μ₀
H₁: μ > μ₀
Use case:
- Performance improvement
- Sales increase
Left-Tailed Test
- Tests less than
- Focus on left side
H₀: μ ≥ μ₀
H₁: μ < μ₀
Use case:
- Defect reduction
- Cost decrease
Types of Hypothesis Testing (Based on Data & Condition)
Z-Test
Used when:
- Sample size n ≥ 30
- Population standard deviation (σ) known
- Data is normal or CLT applies
Use case:
- Large sample testing
t-Test
Used when:
- Sample size n < 30
- Population standard deviation unknown
Types:
- One-sample t-test
- Two-sample t-test
- Paired t-test
Use case:
- Small samples
Chi-Square Test (χ²)
Used for:
- Categorical data
- Independence testing
- Goodness of fit
Use case:
- Gender vs preference
- Survey analysis
ANOVA (F-Test)
Used to:
- Compare more than two means
Use case:
- Multiple group comparison
Hypothesis Testing Workflow
- State hypotheses (H₀ & H₁)
- Choose significance level (α)
- Select appropriate test
- Compute test statistic
- Find p-value or critical value
- Make decision (Reject or Fail to Reject H₀)
Decision Rule
- If p-value ≤ α → Reject H₀
- If p-value > α → Fail to reject H₀
🗣 Hinglish Tip: Chhota p-value = strong evidence against H₀