Section 13.2 Chi-Squared Test of Independence/Association.

10
Section 13.2 Section 13.2 Chi-Squared Test of Chi-Squared Test of Independence/Association Independence/Association

description

What are the assumptions? SRS from the population of interest 10% Rule for showing independent. None of the expected counts are less than 5.

Transcript of Section 13.2 Chi-Squared Test of Independence/Association.

Page 1: Section 13.2 Chi-Squared Test of Independence/Association.

Section 13.2Section 13.2

Chi-Squared Test of Chi-Squared Test of Independence/AssociationIndependence/Association

Page 2: Section 13.2 Chi-Squared Test of Independence/Association.

The Three Types of χ2 tests

• Recall that there are three types of χ2

tests:– Goodness of fit test

• Tests whether a sample distribution matches a hypothesized distribution (Does it fit GOOD?)

– Homogeneity of proportions• Tests whether p1 = p2 = p3 = …

– Association/Independence• Tests whether two categorical variables are

related

Page 3: Section 13.2 Chi-Squared Test of Independence/Association.

What are the assumptions?

• SRS from the population of interest

• 10% Rule for showing independent.

• None of the expected counts are less than 5.

Page 4: Section 13.2 Chi-Squared Test of Independence/Association.

χ2 test of Association• When a two-way table compares

several populations, we use a χ2 test for homogeneity of proportions.

• On the other hand, sometimes we want to classify observations FROM A SINGLE POPULATION by placing them in categories. Then we use a χ2 test of association (also called the χ2 test of independence).

Page 5: Section 13.2 Chi-Squared Test of Independence/Association.

ExampleSES

Smoking High Middle Low TotalCurrent 51 22 43 116Former 92 21 28 141Never 68 9 22 99Total 211 52 93 356

My question: “Is there an association between SES level and smoking habits?”

Page 6: Section 13.2 Chi-Squared Test of Independence/Association.

Hypotheses• The χ2 test of association has

hypotheses that are written in words:– H0: There is no relationship between

smoking and SES level.– Ha: There is some relationship

between smoking and SES level.

Page 7: Section 13.2 Chi-Squared Test of Independence/Association.

In other words…– H0: Smoking and SES level are independent.– Ha: Smoking and SES level are not

independent.OR

– H0: There is no association between smoking and SES level.

– Ha: There is some association between smoking and SES level.

Page 8: Section 13.2 Chi-Squared Test of Independence/Association.

Finishing up• The rest of the test is carried out

in the same manner as the χ2 test for homogeneity of proportions.

• Just make sure your conclusion sentences match the H0 and Ha hypotheses.

Page 9: Section 13.2 Chi-Squared Test of Independence/Association.

χ2 tests Comparison Chart

Goodness of Fit Homogeneity of

Proportions

Association

Hypotheses H0: The sample distribution matches the hypothesized distribution.Ha: The sample distribution does not match the hypothesized distribution.

H0: p1 = p2 = p3 = …Ha: Not all of the proportions are equal.

H0: There is no relationship between the two variables.Ha: There is some relationship between the two variables.

Assumptions

SRSNone of the expected counts are zero.No more than 20% of the expected counts are less than 5.

Independent SRSsNone of the expected counts are zero.No more than 20% of the expected counts are less than 5.

SRSNone of the expected counts are zero.No more than 20% of the expected counts are less than 5.

Test Multiply the expected percents by your sample size. Calculate χ2 statistic by hand. Look up p-value in Table E, df = # of categories minus 1.

Enter observed counts in [A]. Use the calculator to find the p-value. *LOOK AT THE EXPECTED COUNTS IN [B] TO CHECK ASSUMPTIONS!

Enter observed counts in [A]. Use the calculator to find the p-value. *LOOK AT THE EXPECTED COUNTS IN [B] TO CHECK ASSUMPTIONS!

So, the difference between the homogeneity of proportions test and the association test is ARE WE COMPARING SEVERAL POPULATIONS or DID THE DATA ARISE BY CLASSIFYING OBSERVATIONS INTO CATEGORIES.

Page 10: Section 13.2 Chi-Squared Test of Independence/Association.

HomeworkHomeworkChapter 11Chapter 11

# 48, 49, 50, 51, 52# 48, 49, 50, 51, 52