Chapter 12
Slide 1: In this video we’ll be covering chapter twelve the chi-square test. The chi-square test is used
when you have two categorical variables from a single population and you want to know if there is
significant relationship between them
Slide 2: Recall that contingency tables are useful in situations where you are comparing multiple
population proportions. They are used to classify sample observations according to two or more
characteristics. It is also called a cross-classification table.
Slide 3: Let’s look at an example contingency table. You have 2 categories for each variable, left vs righ
handed and male vs female. So this is called a 2 x 2 table.
Slide 4: Suppose we examine a sample of 300 children. Here are our results organized in a contingency
table, our sample size, n equals 300, there were 120 Females, 12 who were left handed; 180 Males, 24
of them were left handed.
Slide 5: The chi-square tests for the difference between two proportions. Our null hypothesis is that
the population proportion of females who are left handed is equal to the population proportion of
males who are left handed. So the null hypothesis is written pi 1 = pi2 and the alternative is that they are
not equal. In other words the two proportions are not the same.
If the null hypothesis is true, then the proportion of left-handed females should be the same as the
proportion of left-handed males.
Slide 6: The Chi-square test statistic is the sum of the observed frequency minus the expected frequency
if the null were true that value squared that value divided by the expected frequency. A chi square test
for a 2 by 2 case has 1 degree of freedom and we assume that each cell in the contingency table has
expected frequency of at least 5.
Slide 7: The chi- square test statistic approximately follows a chi-square distribution with one degree of
freedom. If the chi-square statistic is greater than our critical chi-square then we reject the null
hypothesis, otherwise, we do not reject H0.
Slide 8: Let’s go back to our example, and calculate the overall proportion. The overall proportion,
denoted p bar is the number of observations for each of the characteristics divided by the sum of the
two sample sizes. So the overall proportion is: 12 females and 24 males were left handed. We sampled
120 Females and 180 males. So based on all 300 children the proportion of left handers is 0.12, or 12
percent.
Slide 9: To calculate the expected frequency for left handed females, multiply the average proportion
left handed, p bar by the total number of females. We do the same thing for the males. So If the two
proportions are equal, then: the Probability of Left Handed given it was a Female equals the probability
that of being Left Handed given the person was a male equals 0.12. In other words, gender does not
have an effect on the likelihood that a person is left-handed. So we would expect .12 times 120 equals
14.4 females to be left handed and .12 times 180 equal to 21.6 males to be left handed.
Slide 10: If you calculated all of the expected values, for each of the variable you would get the
following results.