Section 10.2 Independence
Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table to find expected frequencies
Contingency Tables r × c contingency table Shows the observed frequencies for two variables. The observed frequencies are arranged in r rows and c columns. The intersection of a row and a column is called a cell.
Contingency Tables Example: The contingency table shows the number of times a random sample of former smokers tried to quit smoking before they were habit free. They are classified by gender. Number of times tried to quit before habit-free Gender or more Male Female
Finding the Expected Frequency Assuming the two variables are independent, you can use the contingency table to find the expected frequency for each cell. The expected frequency for a cell E r,c in a contingency table is
Example: Finding Expected Frequencies Find the expected frequency for each cell in the contingency table. Assume that the variables, favorite way to eat ice cream and gender, are independent. Number of times tried to quit Gender or more Total Male Female Total marginal totals
Solution: Finding Expected Frequencies Number of times tried to quit Gender or more Total Male Female Total
Solution: Finding Expected Frequencies Number of times tried to quit Gender or more Total Male Female Total
Solution: Finding Expected Frequencies Number of times tried to quit Gender or more Total Male Female Total
Example: Finding Expected Frequencies Find the expected frequency for each cell in the contingency table. Assume that the variables, favorite way to eat ice cream and gender, are independent. Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male Female Total marginal totals
Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male Female Total
Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male Female Total
Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male Female Total
Chi-Square Independence Test Chi-square independence test Used to test the independence of two variables. Can determine whether the occurrence of one variable affects the probability of the occurrence of the other variable.
Chi-Square Independence Test For the chi-square independence test to be used, the following must be true. 1.The observed frequencies must be obtained by using a random sample. 2.Each expected frequency must be greater than or equal to 5.
Chi-Square Independence Test If these conditions are satisfied, then the sampling distribution for the chi-square independence test is approximated by a chi-square distribution with (r – 1)(c – 1) degrees of freedom, where r and c are the number of rows and columns, respectively, of a contingency table. The test statistic for the chi-square independence test is where O represents the observed frequencies and E represents the expected frequencies. The test is always a right-tailed test.
Chi - Square Independence Test 1.Identify the claim. State the null and alternative hypotheses. 2.Specify the level of significance. 3.Determine the degrees of freedom. 4.Determine the critical value. State H 0 and H a. Identify α. Use Table 6 in Appendix B. d.f. = (r – 1)(c – 1) In WordsIn Symbols
Chi - Square Independence Test If χ 2 is in the rejection region, reject H 0. Otherwise, fail to reject H 0. 5.Determine the rejection region. 6.Calculate the test statistic. 7.Make a decision to reject or fail to reject the null hypothesis. 8.Interpret the decision in the context of the original claim. In WordsIn Symbols
Example: Performing a χ 2 Independence Test Using the gender/favorite way to eat ice cream contingency table, can you conclude that the adults favorite ways to eat ice cream are related to gender? Use α = Expected frequencies are shown in parentheses. Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male 600 (550.91) 288 (342.55) 204 (209.45) 24 (24) 84 (73.09) 1200 Female 410 (459.09) 340 (285.45) 180 (174.55) 20 (20) 50 (60.91) 1000 Total
Solution: Performing a Goodness of Fit Test H 0 : H a : α = d.f. = Rejection Region Test Statistic: Decision: 0.01 (2 – 1)(5 – 1) = 4 The adults’ favorite ways to eat ice cream are independent of gender. The adults’ favorite ways to eat ice cream are dependent on gender. (Claim)
Solution: Performing a Goodness of Fit Test OE(O-E)(O-E) 2 (O-E) 2 /E =
Solution: Performing a Goodness of Fit Test H 0 : H a : α = d.f. = Rejection Region Test Statistic: Decision: 0.01 (2 – 1)(5 – 1) = 4 The adults’ favorite ways to eat ice cream are independent of gender. The adults’ favorite ways to eat ice cream are dependent on gender. (Claim) χ 2 ≈ There is enough evidence at the 1% level of significance to conclude that the adults’ favorite ways to eat ice cream and gender are dependent. Reject H 0
Section 10.2 Summary Used a contingency table to find expected frequencies Used a chi-square distribution to test whether two variables are independent
Contingency Tables Example: The contingency table shows the results of a random sample of 2200 adults classified by their favorite way to eat ice cream and gender. Favorite way to eat ice cream Gender CupConeSundaeSandwichOther Male Female
Solution: Performing a Goodness of Fit Test
Example: Performing a χ 2 Independence Test Using the gender/times to quit contingency table, can you conclude that the number of times they tried to quit are related to gender? Use α = Expected frequencies are shown in parentheses.