๐ Hypothesis Testing โ Introduction
It provides a scientific framework for testing claims, validating assumptions, and making evidence-based conclusions under uncertainty.
๐ฏ Why Hypothesis Testing is Needed
In real-world situations, we often encounter claims such as:
- A new medicine is more effective than the old one
- A teaching method improves student performance
- A manufacturing process reduces defects
- An AI model performs better than previous models
Since studying entire populations is impractical, we use sample data to evaluate whether such claims are supported by evidence.
โ๏ธ Decision-Making Under Uncertainty
Sample results naturally vary due to randomness.
Hypothesis testing helps answer:
๐ง Key Terminology
1๏ธโฃ Statistical Hypothesis
A statement or claim about a population parameter.
Examples:
- The average height is 170 cm
- The defect rate is less than 2%
- The model accuracy exceeds 90%
2๏ธโฃ Null Hypothesis (Hโ)
The default assumption that there is no effect, no difference, or no change.
Examples:
- The medicine has no effect
- The average score has not changed
- The model accuracy is equal to previous performance
3๏ธโฃ Alternative Hypothesis (Hโ or Hโ)
The competing claim that suggests a real effect or difference exists.
Examples:
- The medicine improves recovery
- The average score has increased
- The model performs better than before
โ๏ธ Null vs Alternative Hypothesis
| Null Hypothesis (Hโ) | Alternative Hypothesis (Hโ) |
|---|---|
| No change / No effect | There is change / Effect exists |
| Conservative assumption | Research claim |
| Assumed true initially | Accepted if evidence supports |
๐ Example 1: Exam Performance
A school claims that a new teaching method increases average exam scores.
Step 1: Define Hypotheses
- Hโ: The new method does not improve scores
- Hโ: The new method improves scores
We collect sample data and evaluate whether evidence supports rejecting Hโ.
๐ Example 2: AI Model Accuracy
An AI company claims that a new model has higher accuracy than the previous version.
- Hโ: New model accuracy = Old model accuracy
- Hโ: New model accuracy > Old model accuracy
Testing determines whether the observed improvement is statistically significant.
๐งช Hypothesis Testing as a Legal Trial (Analogy)
- Null Hypothesis โ Defendant is innocent
- Alternative Hypothesis โ Defendant is guilty
- Evidence โ Sample data
- Decision โ Reject or fail to reject innocence
๐ฏ Outcomes of Hypothesis Testing
| Decision | Meaning |
|---|---|
| Reject Hโ | Strong evidence supports alternative hypothesis |
| Fail to Reject Hโ | Insufficient evidence to support alternative |
๐ Relationship with Confidence Intervals
Confidence intervals estimate plausible ranges for population parameters.
Hypothesis tests check whether a specific claimed value is plausible.
๐ค Importance in Machine Learning
- Comparing model performances
- A/B testing algorithms
- Validating feature importance
- Testing improvement claims
- Experimental design
๐ง Key Insights
- Hypothesis testing evaluates population claims using samples
- Null hypothesis assumes no effect
- Alternative hypothesis suggests real effect
- Evidence determines statistical decisions
- It is a framework for scientific validation