Example: A survey was conducted to determine if color preference was related to, or independent of, gender. There were 120 males and 100 females surveyed, and the observed results are given in the cross tabulation below.
The expected frequency for a given category, such as males who prefer red, can be computed by multiplying the total number of males (120) by the percentage of people who prefer red, which is calculated by the total of the red preference column divided by the total number of people surveyed; in this case 91/220. An equivalent method is to multiply the corresponding row and column totals and divide by the grand total. With either method, the expected value for males who prefer red is about 49.63. You will not need to compute all these values by hand, however. The expected values, and the chi-squared value itself, will be found using an applet whose link is below. The general hypotheses for a Chi-Squared Test of Independence are these: The null hypothesis is that the two variables are independent of one another. The alternate hypothesis is that the two variables are related to each other. Thus, for this example, our hypotheses are as follows:
H: A person's gender and favorite color are related._{A}The Chi-Squared Test of Independence is performed in three main steps. First, form the null and alternate hypotheses and select an alpha level. The alpha level is the researcher's allowance for a type I error, which is mistakenly rejecting the null hypothesis. The value used at CVGS is typically alpha = 0.05. Next, arrange your data in a contingency table as shown above. You can then put this information in the Chi-Squared Test of Independence Calculator to determine your expected values and the chi-squared statistic. However, due to the JavaScript interface, it can only be used in some browsers. Please click below to test your browser. Note that the Chi-Squared Test of Independence calculator gives you the chi-squared value, as well as a quantity called the Finally, with your Another, related way to test the null hypothesis is to use the CHISQ.DIST.RT function in Excel. Entering the chi-squared value of 6.88 and The Health, Cops, and Education exercises in the inferential statistics activities menu use a Chi-Squared Test of Independence to investigate the relationship between two variables. Original work on this document was done by Central Virginia Governor's School students Richard Barnes, Kim Tibbs, and Ryan Nash (Class of '00). This document was updated by Central Virginia Governor's School students Matthew James and Kyle Nenninger (Class of '03). Copyright © 1999 Central Virginia Governor's School, Lynchburg, VA |