🧪 ANOVA (F-Test)

Last Updated: Jan 2026


ANOVA (Analysis of Variance) is a statistical test used to determine whether there is a significant difference between the means of three or more groups.

Instead of comparing means one by one, ANOVA compares variance between groups vs variance within groups.

🗣 Hinglish Tip: ANOVA = 3 ya zyada groups ke mean ek saath compare karna


Why ANOVA is Needed?

If we compare:

  • Group A vs B
  • Group B vs C
  • Group A vs C

using multiple t-tests ❌ → error probability badh jaati hai

ANOVA solves this using one single test


When to Use ANOVA?

Use ANOVA when:

  • Comparing 3 or more groups
  • Data is numerical
  • Samples are independent
  • Data is approximately normal
  • Variances are roughly equal

Types of ANOVA

  1. One-Way ANOVA → One factor (most common)
  2. Two-Way ANOVA → Two factors
  3. Repeated Measures ANOVA

👉 In this tutorial, we cover One-Way ANOVA


ANOVA Notation (Math Standard)

  • Group means → x̄₁, x̄₂, x̄₃
  • Overall mean → x̄
  • Number of groups → k
  • Total observations → N
  • F statistic → F

ANOVA Core Idea

F = Variance Between Groups / Variance Within Groups

If:

  • F is large → group means differ significantly
  • F is small → group means are similar

Example

Three teaching methods are used, and students’ scores are recorded.

GroupScores
A50, 55, 60
B65, 70, 75
C80, 85, 90

Test whether the mean scores differ significantly at 5% significance level.


Step 1: State the Hypotheses

H₀: μ₁ = μ₂ = μ₃  (All group means are equal)
H₁: At least one group mean is different

Step 2: Calculate Group Means

GroupScoresGroup Mean (x̄)
A50, 55, 6055
B65, 70, 7570
C80, 85, 9085

Step 3: Calculate Overall Mean

Overall Mean (x̄) = (50+55+60+65+70+75+80+85+90) / 9
x̄ = 630 / 9 = 70

Step 4: Calculate Sum of Squares Between Groups (SSB)

Formula:

SSB = Σ n(x̄ᵢ − x̄)²
Groupx̄ᵢ(x̄ᵢ − x̄)²n(x̄ᵢ − x̄)²
A55225675
B7000
C85225675
SSB = 1350

Step 5: Calculate Sum of Squares Within Groups (SSW)

Formula:

SSW = Σ (x − x̄ᵢ)²
GroupSSW
A50
B50
C50
SSW = 150

Step 6: Degrees of Freedom

df_between = k − 1 = 3 − 1 = 2
df_within = N − k = 9 − 3 = 6

Step 7: Mean Squares

MSB = SSB / df_between = 1350 / 2 = 675
MSW = SSW / df_within = 150 / 6 = 25

Step 8: Calculate F-Statistic

F = MSB / MSW
F = 675 / 25
F = 27

Step 9: Critical Value

At:

  • α = 0.05
  • df₁ = 2
  • df₂ = 6

From F-table:

F₀.₀₅,(2,6) ≈ 5.14

Step 10: Decision

  • Calculated F = 27
  • Critical F = 5.14

Since:

27 > 5.14

👉 Reject H₀


Step 11: Conclusion

There is significant evidence that at least one teaching method has a different mean score.

🗣 Hinglish Tip: F value bahut bada → groups alag-alag behave kar rahe hain