Presentation is loading. Please wait.

Presentation is loading. Please wait.

Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.

Similar presentations


Presentation on theme: "Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table."— Presentation transcript:

1 Section 10.2 Independence

2 Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table to find expected frequencies

3 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.

4 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 12-3 4 or more Male271257149 Female14613980

5 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

6 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 12-3 4 or more Total Male271257149677 Female14613980365 Total4173962291042 marginal totals

7 Solution: Finding Expected Frequencies Number of times tried to quit Gender 12-3 4 or more Total Male 271257149677 Female14613980365 Total4174962291042

8 Solution: Finding Expected Frequencies Number of times tried to quit Gender 12-3 4 or more Total Male 271257149677 Female14613980365 Total4174962291042

9 Solution: Finding Expected Frequencies Number of times tried to quit Gender 12-3 4 or more Total Male 271257149677 Female14613980365 Total4174962291042

10 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 Male60028820424841200 Female41034018020501000 Total1010628384441342200 marginal totals

11 Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male 60028820424841200 Female41034018020501000 Total1010628384441342200

12 Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male 60028820424841200 Female41034018020501000 Total1010628384441342200

13 Solution: Finding Expected Frequencies Favorite way to eat ice cream Gender CupConeSundaeSandwichOtherTotal Male60028820424841200 Female41034018020501000 Total1010628384441342200

14 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.

15 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.

16 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.

17 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

18 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

19 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 α = 0.01. 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 1010628384441342200

20 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)

21 Solution: Performing a Goodness of Fit Test OE(O-E)(O-E) 2 (O-E) 2 /E 600550.9149.092409.82814.3743 288342.55-54.552975.70258.6869 204209.45-5.4529.70250.1418 24 000 8473.0910.91119.02811.6285 410459.09-49.092409.82815.2491 340285.4554.552975.702510.4246 180174.555.4529.70250.1702 20 000 5060.91-10.91119.02811.9542 4.3743+8.6869+.1418+0+1.6285+5.2491+10.4246+.1702+0+1.9542 = 32.630

22 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 ≈ 32.630 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

23 Section 10.2 Summary Used a contingency table to find expected frequencies Used a chi-square distribution to test whether two variables are independent

24 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 Male6002882042484 Female4103401802050

25 Solution: Performing a Goodness of Fit Test

26 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 α = 0.05. Expected frequencies are shown in parentheses.


Download ppt "Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table."

Similar presentations


Ads by Google