Lesson 5.5: ANOVA & Chi-square Test
🔹 1) ANOVA (Analysis of Variance)
-
Purpose: Compares the means of 3 or more groups to check if they are significantly different.
-
Example: Comparing average marks of students from 3 different schools.
✅ Key Idea:
-
Null Hypothesis (H0H_0) → All group means are equal.
-
Alternative Hypothesis (HaH_a) → At least one group mean is different.
⚡ Test Statistic:
-
F-test is used in ANOVA.
-
If p-value < 0.05 → Reject H0H_0, groups are significantly different.
🔹 2) Chi-square Test
-
Purpose: Used for categorical data (not numerical).
-
Checks relationship between two categorical variables OR if observed data fits expected distribution.
✅ Types:
-
Chi-square Goodness of Fit → Does observed data fit expected proportions?
-
Example: Are dice rolls fair (equal probability)?
-
-
Chi-square Test of Independence → Are two categorical variables related?
-
Example: Is gender related to voting preference?
-
⚡ Test Statistic:
χ2=∑(O−E)2E\chi^2 = \sum \frac{(O – E)^2}{E}
-
OO = Observed frequency
-
EE = Expected frequency
If p-value < 0.05 → Significant relationship exists.
✅ Quick Recap:
-
ANOVA → Compare means of 3+ groups.
-
Chi-square → Test categorical data (independence or goodness of fit).
