Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

Chi-Square (X²) Tests

Chi-square test
A statistical test for categorical data. It is
used to determine whether your data are
significantly different from what you
expected.
Types of Chi-square test
•The chi-square goodness of fit test is used to test
whether the frequency distribution of a categorical
variable is different from your expectations.
•The chi-square test of independence is used to test
whether two categorical variables are related to each
other.
Chi-square (Χ2) goodness of fit test
•You can use it to test whether the observed distribution of
a categorical variable differs from your expectations.
Goodness of fit is a measure of how well a statistical
model fits a set of observations.
•When goodness of fit is high, the values expected based
on the model are close to the observed values.
•When goodness of fit is low, the values expected based
on the model are far from the observed values.
Example: You’re hired by a dog food company to help them test
three new dog food flavors.
You recruit a random sample of 75 dogs and offer each dog a
choice between the three flavors by placing bowls in front of
them. You expect that the flavors will be equally popular
among the dogs, with about 25 dogs choosing each flavor.
Once you have your experimental results, you plan to use a chi-
square goodness of fit test to figure out whether the distribution
of the dogs’ flavor choices is significantly different from your
expectations.
Chi-square (Χ2) goodness of fit test
Chi-square (Χ2) goodness of fit test
Chi-square (Χ2) goodness of fit test
Chi-square (Χ ) goodness of fit test
2
Chi-square (Χ ) goodness of fit test
2
Chi-square (Χ2) goodness of fit test
How to perform the chi-square goodness of fit test

To interpret the chi-square goodness of fit, you need


to compare it to something. That’s what a chi-square
test is: comparing the chi-square value to the
appropriate chi-square distribution to decide whether
to reject the null hypothesis.
5 steps
Step 1: Calculate the expected frequencies
◦ In general, you’ll need to multiply each group’s expected proportion by
the total number of observations to get the expected frequencies.
Chi-Square Test of Independence
◦ A chi-square (Χ2) test of independence is a nonparametric 
hypothesis test. You can use it to test whether two 
categorical variables are related to each other.
Five(5) steps to calculate the test
statistic:

You might also like