Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for.

Similar presentations


Presentation on theme: "Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for."— Presentation transcript:

1 Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for homogeneity to determine whether the distribution of a categorical variable differs for several populations or treatments. 11.2a h.w: pg 694: 19 – 22; pg 724: 27 – 35 odd, 43

2 To compare two proportions, we use a 2-Proportion Z.
If we want to compare three or more proportions, we need a new procedure.

3 Two Way Tables The first step in the overall test for comparing several proportions is to arrange the data in a two-way table that gives counts for both successes and failures. Think of the counts as elements of a matrix with r rows and c columns. This is called an r x c table with (r)(c) cells.

4 Our null hypothesis is that there is no difference among the proportions.
Ho: p1 = p2 = p3 The alternative hypothesis is that there is some difference among the proportions. Ha: not all of p1, p2, and p3 are equal

5 We will use the chi-square test to measure
how far the observed values are from the expected values.

6 Expected Counts to calculate, multiply the row total by the column total, and divide by the table total:

7 Chi-Square Statistic is the sum over all r x c cells in the table
The degrees of freedom is (r – 1)(c – 1). The P-value is the area to the right of the X 2 statistic under the chi-square density curve.

8 Ex: Treating Cocaine Addiction
Read aloud pg. 710 Group Treatment Subjects No relapse Proportion 1 Desipramine Lithium 3 Placebo Plot data: compares the success rates of 3 treatments for cocaine addition.

9 Two way table How many subjects relapsed?
Observed Counts Relapse Treatment no yes Total Desipramine Lithium Placebo Total How many subjects relapsed? 48/72 subjects relapsed: (2/3)

10 Calculate Expected Counts
Relapse Observed Expected (s) (f) (s) (f) Treatment no yes no yes Desipramin Lithium Placebo 8

11 What do you observe? We expect 2/3’s of the subjects to relapse.
How did Desipramin do? Fewer relapses (10) and more successes (14) than expected. How did the Placebo do? More relapses (20) and fewer successes (4) than expected. How did Lithium do? Between desipramin and the placebo More directly: Desipramin does much better than the placebo with lithium in between.

12 As in the test for goodness of fit of the
X 2 statistic, think of as a measure of the distance of the observed counts from the expected counts. Large values of X 2 are evidence against Ho , because they say that the observed counts are far from what we would expect if Ho were true. Small values are not.

13 Remember: Although the Ha is many-sided,
the chi-square test is always one sided! Any violation of Ho tends to produce a large value of X 2.

14 Chi-Square Test for Homogeneity
In the Cocaine addiction example we had three examples. We can use the same chi-square procedure with several populations if we take separate and independent random samples from each population.

15 Cell Counts required for the Chi-Square Test
Expected counts conditions: No more than 20% of the Expected counts are less than 5 All individual expected counts are 1 or greater For 2x2 table, all expected counts should be 5 or greater.

16 Ex. Treating Cocaine Addiction continued.
We have examined the data from the three cocaine treatment groups informally. Now we proceed formally. Step 1: State We want to perform a test of Ho: p1 = p2 = p3 The proportion of cocaine addicts who avoid relapse are the same. Ha: Not all three of the proportions are equal. Make sure to define p1, p2, and p3

17 Random: the subjects were assigned to three treatment groups.
Step 2: Plan If conditions are met, we should carry out a chi-square test for homogeneity. Random: the subjects were assigned to three treatment groups. Large Sample Size: Expected counts? Yes, all 5 No more than 20% are less than 5: the smallest expected count was 8.

18 Independent: The random assignment helps create three independent groups. If the experiment is conducted properly, then knowing one subject’s relapse status should give us no information about another subject’s outcome. So individual observations are independent.

19 (for success and failure): = + + + + + = 10.5
Step 3: Do - Since the conditions are satisfied, we can a perform chi-test for homogeneity. We begin by calculating the test statistic. The test statistic is (for success and failure): = = 10.5 df = (r-1)(c-1) = (3-1)(2-1) = 2

20 Find P-value from table C or X 2cdf(10.5, E99, 2)
Falls between .01 and .005. P = .0052

21 Step 4. Conclude - Interpret the results in the context of the problem.
Since the P-value is less than 0.01, the difference between the three proportions are statistically significant at the α = 0.01 level. We would reject the null hypothesis and conclude that not all three of the proportions of cocaine addicts who avoid relapse are the same.

22 Do the Chi square Tests on the TI-38/89: see page 705
Use Matrix for observed and expected counts and then use Stat:Test: X2 test to calculate X2 value and P-value. Note, you only need to enter the “observed count”. When you use Stat:Test: X2 :Test, the calculator does the expected counts for you and puts them in matrix B. You do need to be able to calculate an individual cell expected value for the test.

23 Quiz tomorrow 11.1


Download ppt "Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for."

Similar presentations


Ads by Google