🧪 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 (α\alpha) → Probability of rejecting true hypothesis (Common: 0.05)

Symbols Used in Hypothesis Testing:

  • H0H_0 = Null Hypothesis/default assumption
  • H1H_1 = Alternative Hypothesis
  • α\alpha = Significance Level
  • p-value/critical value = Probability of rejecting true hypothesis

Types of Hypothesis

Every hypothesis test has two hypotheses:

Null Hypothesis (H0H_0)

  • Default assumption
  • States no effect or no difference

Examples:

H0:μ=50H0:p=0.4H_0: \mu = 50 H_0: p = 0.4

🗣 Hinglish Tip: Null hypothesis = kuch bhi change nahi hua


Alternative Hypothesis (H1H_1 or HaH_a)

  • Opposite of null hypothesis
  • Indicates effect or difference

Examples:

H1:μ50H1:μ>50H1:μ<50H_1: \mu \ne 50 \\[0.5em] H_1: \mu > 50 \\[0.5em] H_1: \mu < 50

Types of Alternative Hypothesis (Based on Direction)

Two-Tailed Test

  • Tests both sides
  • Checks for any difference
H0:μ=μ0H1:μμ0H_0: \mu = \mu_0 \\[0.5em] H_1: \mu \ne \mu_0

Use case:

  • Quality control
  • Equality check

Right-Tailed Test

  • Tests greater than
  • Focus on right side
H0:μμ0H1:μ>μ0H_0: \mu \le \mu_0 \\[0.5em] H_1: \mu > \mu_0

Use case:

  • Performance improvement
  • Sales increase

Left-Tailed Test

  • Tests less than
  • Focus on left side
H0:μμ0H1:μ<μ0H_0: \mu \ge \mu_0 \\[0.5em] H_1: \mu < \mu_0

Use case:

  • Defect reduction
  • Cost decrease

Types of Hypothesis Testing (Based on Data & Condition)

Z-Test

Used when:

  • Sample size n30n \ge 30
  • Population standard deviation (σ\sigma) known
  • Data is normal or CLT applies

Use case:

  • Large sample testing

t-Test

Used when:

  • Sample size n<30n < 30
  • Population standard deviation unknown

Types:

  • One-sample t-test
  • Two-sample t-test
  • Paired t-test

Use case:

  • Small samples

Chi-Square Test (χ2\chi^2)

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

  1. State hypotheses (H0H_0 & H1H_1)
  2. Choose significance level (α\alpha)
  3. Select appropriate test
  4. Compute test statistic
  5. Find p-value or critical value
  6. Make decision (Reject or Fail to Reject H0H_0)

Decision Rule

  • If p-value α\le \alpha → Reject H0H_0
  • If p-value >α> \alpha → Fail to reject H0H_0

🗣 Hinglish Tip: Chhota p-value = strong evidence against H0H_0


Liked This Tutorial

Scan QR Code To Leave A Review Or

Click Here To Leave A Review
Scan QR