Practice Exercises for Factorial Chisquare (χ2)
Click your Link:
An any bill that is introduced in the US Congress (House of Representatives or Senate), members of either political party have one of three voting choices: They can vote 'Yea' in support of the bill, they can vote 'Nay' in opposition of the bill, or they can 'Abstain' ant not caste a vote. It is always interesting to see if there is a relationship between voting on Bills and political party; that is, do Democrats vote 'Yea' more often on certain bills(and Republicans 'Nay', and vice versa, or is there no relationship. To show you how chi-square analyses can be used to address this question, below, I ave provided voting results for each political party for a recent Bill before the US House of Representatives.
Congressional Bill H R 12, the "Paycheck Fairness Act", was introduced "To amend the Fair Labor Standards Act of 1938 to provide more effective remedies to victims of discrimination in the payment of wages on the basis of sex, and for other purposes." Basically, this bill tries to make salary fair for all in any given profession. Below, I have reproduced the actual voting record of the number of Republicans and Democrats voting 'Yea', 'Nay', and Abstaining. Use this data to answer the questions that follow:
| Party | Yea | Nay | Abstain |
| Democratic | 246 | 3 | 7 |
| Republican | 10 | 160 | 7 |
1) Is this a chi-square test for homogeneity of variance, or a chi-square test for independence? How do you know?
2) Based on the frequencies of votes above, calculate the expected frequency (fE) for each cell.
3) If α = .01, what is the critical chi-square value (χ2α).
4) Under the null hypothesis, what should the expected value of chi-square be equal to?
5) Perform the chi-square analysis. What is your observed chi-square value?
6) What should you conclude regarding the relationship between political party and voting on Bill HR 12?
7) In this example, would you use Cramer's C or the Phi Coefficient to measure the strength of the relationship between political party and voting on Bill HR 12? When you have decided, use that statistic to measure the strength of this relationship.
There is a stereotype that university professors tend to be atheists, or agnostics. This stereotype is even more pronounced if the professor has an appointment in the sciences (e.g., biology, chemistry, physics, psychology--YES, PSYCHOLOGY IS A SCIENCE!!, etc.) compared to the humanities (e.g., history, philosophy, theology, English/literature etc.). To examine whether there is a relationship between religions view and appointment of a professor, I ask 250 professors at a university whether their appointment is in the sciences, the humanities, or some other general field, and whether they are Religious, Agnostic, or Atheist. I observe the following frequencies, which should be used to answer the questions below:
| Religious | Agnostic | Atheist | |
| Sciences | 25 | 25 | 75 |
| Humanities | 25 | 25 | 50 |
| Other | 15 | 5 | 5 |
1) Is this a chi-square test for homogeneity of variance, or a chi-square test for independence? How do you know?
2) Based on the observed frequencies above, calculate the expected frequency (fE) for each cell.
3) If α = .01, what is the critical chi-square value (χ2α).
4) Under the null hypothesis, what should the expected value of chi-square be equal to?
5) Perform the chi-square analysis. What is your observed chi-square value?
6) What should you conclude regarding the relationship between religions viewpoint and the appointment of a professor?
7) In this example, would you use Cramer's C or the Phi Coefficient to measure the strength of the relationship between religions viewpoint and the appointment of a professor? When you have decided, use that statistic to measure the strength of this relationship.
I want to know whether there is a relationship between sex (males/female) and getting caught text-messaging in class. For one academic year I count the number of males and females caught text-messaging in my classes. I also count the numbers of males and females from those classes that I did not catch text-messaging (i.e., who were not likely text-messaging). The frequencies of males and females caught text-messaging and not caught text-messaging in class for this academic year are below. Use this information to answer the following questions:
| Caught Text- Messaging | Not Caught (Not Text-Messaging) | |
| Males | 15 | 55 |
| Females | 30 | 80 |
1) If α = .01, what is the critical chi-square value (χ2α).
2) Using the computational chi-square formula for a 2 x 2 design, what is your observed chi-square value?
3) What should you conclude regarding the relationship between sex and getting caught text-messaging in class?
4) In this example, would you use Cramer's C or the Phi Coefficient to measure the strength of the relationship between sex and getting caught text-messaging in class? When you have decided, use that statistic to measure the strength of this relationship.
1) Most people would assume that this is a chi-square test for independence because you can never be sure of the vote tally; however, because there a fixed number of Democrats (n = 256) and a fixed number of Republicans (n = 177) in the US House of Representatives, this is a chi-square test for homogeneity of variance.
2) The fE values for each cell are presented below each fO value in the table below.
| Party | Yea | Nay | Abstain |
| Democratic | fO = 246 fE = 151.353 | fO =3 fE = 96.370 | fO = 7 fE = 8.277 |
| Republican | fO = 10 fE = 104.647 | fO = 160 fE = 66.630 | fO = 7 fE = 5.723 |
3) With α = .01, and df = 2, χ2α = 9.210
4) E(χ2|H0 is True) = 0
5) The observed chi-square is 366.574
6) Because the observed chi-square is greater than the critical chi-square, the relationship between political party and voting on Bill HR 12 is statistically significant. Thus, there is a relationship between a congressperson's political party and s/he voted on this bill.
7) You would use Cramer's C, because this is a 3 x 2 design, which is larger than a 2 x 2 design; the Phi Coefficient is used only when you have a 2 x 2 design. Cramer's C = 0.677
1) This a chi-square test for independence, because there is no way that I can know the marginal frequencies before I start the study.
2) The fE values for each cell are presented below each fO value in the table below:
| Religious | Agnostic | Atheist | |
| Sciences | fO = 25 fE = 32.500 | fO = 25 fE = 27.500 | fO = 75 fE = 65.000 |
| Humanities | fO = 25 fE = 26.000 | fO = 25 fE = 22.000 | fO = 50 fE = 52.000 |
| Other | fO = 15 fE = 6.500 | fO = 5 fE = 5.500 | fO = 5 fE = 13.000 |
3) With α = .01, and df = 4, χ2α = 13.277
4) E(χ2|H0 is True) = 0
5) The observed chi-square is 20.103
6) Because the observed chi-square is greater than the critical chi-square, the relationship between the religions viewpoint and the appointment of a university professor is statistically significant. Specifically, certain types of professors are more likely to be atheist, agnostic, or religious.
7) ou would use Cramer's C, because this is a 3 x 2 design, which is larger than a 2 x 2 design; the Phi Coefficient is used only when you have a 2 x 2 design. Cramer's C = 0.272
1) With α = .01, and df = 1, χ2α = 6.635
2) Here, a = 15, b = 55, c = 30 and d = 70 The observed chi-square is 1.646
3) Because the observed chi-square is less than the critical chi-square, the relationship between sex and getting caught text-messaging in class is not statistically significant. Thus, males are no more likely to get caught text-messaging in class compared to females, or vice versa.
4) Because this is a 2 x 2 design, you would use the Phi-Coefficient (Φ). In this case, Φ = 0.095