🧪 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 Used in Hypothesis Testing:
- = Null Hypothesis/default assumption
- = Alternative Hypothesis
- = Significance Level
- p-value/critical value = Probability of rejecting true hypothesis
Types of Hypothesis
Every hypothesis test has two hypotheses:
Null Hypothesis ()
- Default assumption
- States no effect or no difference
Examples:
🗣 Hinglish Tip: Null hypothesis = kuch bhi change nahi hua
Alternative Hypothesis ( or )
- Opposite of null hypothesis
- Indicates effect or difference
Examples:
Types of Alternative Hypothesis (Based on Direction)
Two-Tailed Test
- Tests both sides
- Checks for any difference
Use case:
- Quality control
- Equality check
Right-Tailed Test
- Tests greater than
- Focus on right side
Use case:
- Performance improvement
- Sales increase
Left-Tailed Test
- Tests less than
- Focus on left side
Use case:
- Defect reduction
- Cost decrease
Types of Hypothesis Testing (Based on Data & Condition)
Z-Test
Used when:
- Sample size
- Population standard deviation () known
- Data is normal or CLT applies
Use case:
- Large sample testing
t-Test
Used when:
- Sample size
- 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 ( & )
- Choose significance level ()
- Select appropriate test
- Compute test statistic
- Find p-value or critical value
- Make decision (Reject or Fail to Reject )
Decision Rule
- If p-value → Reject
- If p-value → Fail to reject
🗣 Hinglish Tip: Chhota p-value = strong evidence against
