← Back to Book Detail

Module 11: The Chi Square Distribution (58/47) -- Adapted By Darlene Young Introductory St...

Browse
123%

Module 11: The Chi Square Distribution

Module 11: The Chi Square Distribution Test of Independence Barbara Illowsky & OpenStax et al. Tests of independence involve using a contingency table of observed (data) values. The test statistic for a test of independence is similar to that of a goodness-of-fit test: [latex]displaystyle{sum_{(icdot{j})}}frac{{({O}-{E})}^{{2}}}{{E}}[/latex]where: - O = observed values - E = expected values - i = the number of rows in the table - j = the number of columns in the table There are [latex]displaystyle{i}cdot{j}[/latex] terms of the form [latex]frac{{({O}-{E})}^{{2}}}{{E}}[/latex]. A test of independence determines whether two factors are independent or not. Note: The expected value for each cell needs to be at least five in order for you to use this test. Example Suppose A = a speeding violation in the last year and B = a cell phone user while driving. If A and B are independent then P(A AND B) = P(A)P(B). A AND B is the event that a driver received a speeding violation last year and also used a cell phone while driving. Suppose, in a study of drivers who received speeding violations in the last year, and who used cell phone while driving, that 755 people were surveyed. Out of the 755, 70 had a speeding violation and 685 did not; 305 used cell phones while driving and 450 did not. Let y = expected number of drivers who used a cell phone while driving and received speeding violations. If A and B are independent, then P(A AND B) = P(A)P(B). By substitution, [latex]displaystylefrac{{y}}{{755}}={(frac{{70}}{{755}})}{(frac{{305}}{{755}})}[/latex]Solve for y: [latex]displaystyle{y}=frac{{{({70})}{({305})}}}{{755}}={28.3}[/latex] About 28 people from the sample are expected to use cell phones while driving and to receive speeding violations. In a test of independence, we state the null and alternative hypotheses in words. Since the contingency table consists of two factors, the null hypothesis states that the factors are independent and the alternative hypothesis states that they are not independent (dependent). If we do a test of independence using the example, then the null hypothesis is: H0: Being a cell phone user while driving and receiving a speeding violation are independent events. If the null hypothesis were true, we would expect about 28 people to use cell phones while driving and to receive a speeding violation. The test of independence is always right-tailed because of the calculation of the test statistic. If the expected and observed values are not close together, then the test statistic is very large and way out in the right tail of the chi-square curve, as it is in a goodness-of-fit. The number of degrees of freedom for the test of independence is: df = (number of columns – 1)(number of rows – 1) The following formula calculates the expected number (E): [latex]displaystyle{E}=frac{{{(text{row total})}{(text{column total})}}}{text{total number surveyed}}[/latex] try it A sample of 300 students is taken. Of the students surveyed, 50 were music
← Previous Chapter Next Chapter →