Ch. 28 Chi-square test

8
Ch. 28 Chi-square test Used when the data are frequencies (counts) or proportions for 2 or more groups. Example 1 1. O bserved frequencies Eye Right Left T otal H and Right 18 5 Left 2 2 T otal

description

Ch. 28 Chi-square test. Used when the data are frequencies (counts) or proportions for 2 or more groups. Example 1. 5. Calculate ((observed-expected)^2) expected 6. Calculate Chi-square = sum of the values from step 5. The degrees of freedom = - PowerPoint PPT Presentation

Transcript of Ch. 28 Chi-square test

Page 1: Ch. 28 Chi-square test

Ch. 28 Chi-square test

• Used when the data are frequencies (counts) or proportions for 2 or more groups.

• Example 11. Observed frequencies

EyeRight Left Total

Hand Right 18 5Left 2 2Total

Page 2: Ch. 28 Chi-square test

2. Observed percents

EyeRight Left Total

Hand Right 90% 71%Left 10% 29%Total

3. Expected percents

EyeRight Left Total

Hand Right 85% 85%Left 15% 15%Total

Page 3: Ch. 28 Chi-square test

4. Expected frequencies

EyeRight Left Total

Hand Right 17 6Left 3 1Total

Page 4: Ch. 28 Chi-square test

5. Calculate ((observed-expected)^2)

expected

6. Calculate Chi-square = sum of the values from step 5. The degrees of freedom =

(# rows - 1)x(# columns – 1). Find the p-value using the Chi-square table.

Activity: Titanic survival data

Page 5: Ch. 28 Chi-square test

• Example 2: Titanic survival data grouped by class.

1. Observed frequencies

Class1st 2nd 3rd Total

Surivor Yes 203 118 178No 122 167 528Total

2. Observed percents

Class1st 2nd 3rd Total

Surivor Yes 62%NoTotal

Page 6: Ch. 28 Chi-square test

Null hypothesis: Class and survival are independent. In other words, everyone had the same chance of survival.

Use the bootstrap method to estimate the proportions in the box based on the observed data.

Null hypothesis: The proportion of “yes” in every class is the same as the overall proportion = 38%.

Page 7: Ch. 28 Chi-square test

3. Expected percents

Class1st 2nd 3rd Total

Surivor Yes 38%No 62%Total

4. Expected frequencies

Class1st 2nd 3rd Total

Surivor Yes 499No 817Total 325 285 706 1316

Page 8: Ch. 28 Chi-square test

• Chi-square =

• P-value =