CHI-SQUARE TEST
The Chi-Square test is like a tool that helps us understand if there is a real connection between two things we are observing, or if what we’re seeing is just random luck.
Imagine you have a bag of candies, and you think there might be a pattern to the colors of the candies. Maybe you think there are more red candies than any other color. To figure out if you’re right, you can use the Chi-Square test.
Here’s how it works in easy steps:
1. Collect Data : First, you count how many candies of each color are in the bag. This is your “observed” data.
2. Make a Prediction: Next, you predict how many candies of each color you would expect to find if everything was totally random. This is your “expected” data.
3. Compare Observed and Expected: The Chi-Square test compares the observed data with the expected data .
4. Calculate the Difference: When we “calculate the difference,” we’re seeing how different our actual counts (observed) are from what we thought they would be (expected).
Formula For Chi-Square Test
Where
c = Degrees of freedom
O = Observed Value
Get Nehra Vikas’s stories in your inbox
Join Medium for free to get updates from this writer.
E = Expected Value
There are two main types of Chi-Square tests namely -
- Independence
2. Goodness-of-Fit
Independence:
Chi-Square Test of Independence: The Classroom Study
Imagine you are a researcher trying to determine if there is a relationship between students’ preferred study methods and their performance on exams.
Steps to Conduct the Test:
- Collect Data:
You survey a group of students about their preferred study methods (e.g., flashcards, group study, solo study) and categorize their exam performance (e.g., high, medium, low).
2. Formulate Hypotheses:
Null Hypothesis (H0): There is no relationship between the study methods and exam performance.
Alternative Hypothesis (H1): There is a relationship between the study methods and exam performance.
3. Create a Contingency Table:
- You organize the data into a table with study methods as rows and exam performance levels as columns, noting the frequency of each combination.
4. Performing the Chi-Square Test:
2.Goodness-Of-Fit-
Imagine we’re testing if a fair six-sided dice actually behaves as expected. We roll the dice many times and record the outcomes. Then we compare our observed results to what we’d expect from a fair dice using the Chi-Square Test.








