🧪 Chi-Square Test (χ² Test)
Last Updated: Jan 2026
The Chi-Square Test (χ² Test) is a non-parametric hypothesis test used to determine whether there is a significant relationship between categorical variables.
It compares observed frequencies with expected frequencies.
🗣 Hinglish Tip: Chi-Square test = actual data vs expected data ka comparison
When to Use Chi-Square Test?
Use Chi-Square Test when:
- Data is categorical
- Values are in frequency/count
- Sample size is sufficiently large
- Observations are independent
✘ Not used for:
- Mean comparison
- Numerical data
Types of Chi-Square Test
- Chi-Square Test of Independence
- Chi-Square Test of Goodness of Fit
👉 In this tutorial, we cover Test of Independence (most common)
Chi-Square Notation (Math Standard)
- Observed frequency →
- Expected frequency →
- Chi-square statistic →
- Degrees of freedom →
- Significance level →
Chi-Square Formula
Example
Problem Statement
A survey was conducted to see whether Gender and Preference for Online Course are independent.
Test at 5% significance level.
Step 1: State the Hypotheses
Step 2: Create Observed Frequency Table (O)
Step 3: Calculate Expected Frequencies (E)
Formula:
Step 4: Compute Value
Step 5: Degrees of Freedom
Step 6: Critical Value
At:
- = 0.05
- df = 1
From Chi-Square table:
Step 7: Decision
- Calculate χ² Value= 16.66
- Compare with Critical Value= 3.84
Since:
👉 Reject
Step 8: Conclusion
There is significant evidence to conclude that Gender and course preference are dependent.
🗣 Hinglish Tip: Chi-square zyada aaya → relation exist karta hai
