Ch. 28 Chi-square test

Post on 06-Jan-2016

23 views 0 download

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

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

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

4. Expected frequencies

EyeRight Left Total

Hand Right 17 6Left 3 1Total

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

• 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

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

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

• Chi-square =

• P-value =