1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison...

29
1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman MARIO F. TRIOLA EIGHTH EDITION ELEMENTARY STATISTICS Section 10-3 Contingency Tables: Independence and Homogeneity

Transcript of 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison...

Page 1: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

1Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

MARIO F. TRIOLAMARIO F. TRIOLA EIGHTHEIGHTH

EDITIONEDITION

ELEMENTARY STATISTICS Section 10-3 Contingency Tables: Independence

and Homogeneity

Page 2: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

2Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Definition

Contingency Table (or two-way frequency table)

a table in which frequencies correspond to two variables.

(One variable is used to categorize rows, and a second variable is used to categorize columns.)

Page 3: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

3Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Definition Contingency Table (or two-way frequency table)

a table in which frequencies    correspond to two variables.

(One variable is used to categorize rows, and a second variable is used to categorize columns.)

Contingency tables have at least two rows and at least two columns.

Page 4: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

4Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test of Independence

tests the null hypothesis that the    row variable and column variable in    a contingency table are not related. (The null hypothesis is the

statement that the row and column    variables are independent.)

Definition

Page 5: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

5Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Assumptions1. The sample data are randomly selected.

2.The null hypothesis H0 is the statement that the

row and column variables are         independent; the alternative hypothesis H1 is     the statement that the

row and column     variables are dependent.

3. For every cell in the contingency table, the expected frequency E is at least 5. (There is no requirement that every observed frequency must be at least 5.)

Page 6: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

6Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test of IndependenceTest Statistic

Critical Values

1. Found in Table A-4 using

degrees of freedom = (r - 1)(c - 1)

r is the number of rows and c is the number of columns

2. Tests of Independence are always right-tailed.

X2 = (O - E)2

E

Page 7: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

7Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

(row total) (column total)

(grand total)E =

Total number of all observed frequencies

in the table

Page 8: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

8Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Tests of Independence

H0: The row variable is independent of the column variable

H1: The row variable is dependent (related to) the column variable

This procedure cannot be used to establish a direct cause-and-effect link between variables in question.

Dependence means only there is a relationship between the two variables.

Page 9: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

9Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Expected Frequency for Contingency Tables

Page 10: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

10Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

E = • •row total column total

grand total

Expected Frequency for Contingency Tables

grand totalgrand total

Page 11: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

11Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

n • p

E = • •row total column total

grand total

Expected Frequency for Contingency Tables

grand totalgrand total

(probability of a cell)

Page 12: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

12Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

n • p

E = • •row total column total

grand total

Expected Frequency for Contingency Tables

grand totalgrand total

(probability of a cell)

Page 13: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

13Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

n • p

E = • •row total column total

grand total

Expected Frequency for Contingency Tables

grand totalgrand total

(probability of a cell)

E = (row total) (column total)(grand total)

Page 14: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

14Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Is the type of crime independent of whether the criminal is a stranger?

Stranger

Acquaintanceor Relative

12

39

379

106

727

642

Homicide Robbery Assault

Page 15: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

15Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Row Total

Column Total

Stranger

Acquaintanceor Relative

1118

787

1905

12

39

51

379

106

485

727

642

1369

Homicide Robbery Assault

Is the type of crime independent of whether the criminal is a stranger?

Page 16: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

16Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Row Total

Column Total

E = (row total) (column total)(grand total)

Stranger

Acquaintanceor Relative

Homicide Robbery Assault

Is the type of crime independent of whether the criminal is a stranger?

1118

787

1905

12

39

51

379

106

485

727

642

1369

Page 17: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

17Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Row Total

(29.93)

Column Total

E = (row total) (column total)(grand total)

E = (1118)(51)

1905= 29.93

Stranger

Acquaintanceor Relative

Homicide Robbery Assault

Is the type of crime independent of whether the criminal is a stranger?

1118

787

1905

12

39

51

379

106

485

727

642

1369

Page 18: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

18Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Row Total

(29.93)

(21.07)

(284.64)

(200.36)

(803.43)

(565.57)

Column Total

E = (row total) (column total)(grand total)

E = (1118)(51)

1905= 29.93 E =

(1118)(485)

1905= 284.64

etc.

Stranger

Acquaintanceor Relative

Homicide Robbery Assault

Is the type of crime independent of whether the criminal is a stranger?

1118

787

1905

12

39

51

379

106

485

727

642

1369

Page 19: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

19Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

12

39

379

106

727

642

Homicide Robbery Forgery

(29.93)

(21.07)

(284.64)

(200.36)

(803.43)

(565.57

[10.741]Stranger

Acquaintance

or Relative

X2 = (O - E )2

E

(O -E )2

EUpper left cell: = = 10.741

(12 -29.93)2

29.93

(E)

(O - E )2

E

Is the type of crime independent of whether the criminal is a stranger?

Page 20: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

20Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

12

39

379

106

727

642

Homicide Robbery Forgery

(29.93)

(21.07)[15.258]

(284.64)[31.281]

(200.36)[44.439]

(803.43)[7.271]

(565.57)[10.329]

[10.741]Stranger

Acquaintance

or Relative

X2 = (O - E )2

E

(O -E )2

EUpper left cell: = = 10.741

(12 -29.93)2

29.93

(E)

(O - E )2

E

Is the type of crime independent of whether the criminal is a stranger?

Page 21: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

21Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

12

39

379

106

727

642

Homicide Robbery Forgery

(29.93)

(21.07)[15.258]

(284.64)[31.281]

(200.36)[44.439]

(803.43)[7.271]

(565.57)[10.329]

[10.741]Stranger

Acquaintance

or Relative

X2 = (O - E )2

E

(E)

(O - E )2

E

Is the type of crime independent of whether the criminal is a stranger?

Test Statistic X2 = 10.741 + 31.281 + ... + 10.329 =

119.319

Page 22: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

22Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test Statistic X2 = 119.319

with = 0.05 and (r -1) (c -1) = (2 -1) (3 -1) = 2 degrees of freedom

Critical Value X2 = 5.991 (from Table A-4)

Page 23: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

23Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test Statistic X2 = 119.319

with = 0.05 and (r -1) (c -1) = (2 -1) (3 -1) = 2 degrees of freedom

0

= 0.05

X2 = 5.991

RejectIndependence

Critical Value X2 = 5.991 (from Table A-4)

Sample data: X2 =119.319

Fail to RejectIndependence

Page 24: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

24Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test Statistic X2 = 119.319

with = 0.05 and (r -1) (c -1) = (2 -1) (3 -1) = 2 degrees of freedom

0

= 0.05

X2 = 5.991

RejectIndependence

Critical Value X2 = 5.991 (from Table A-4)

Reject independence

Sample data: X2 =119.319

Fail to RejectIndependence

Page 25: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

25Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test Statistic X2 = 119.319

with = 0.05 and (r -1) (c -1) = (2 -1) (3 -1) = 2 degrees of freedom

0

= 0.05

X2 = 5.991

RejectIndependence

Critical Value X2 = 5.991 (from Table A-4)

Reject independence

Sample data: X2 =119.319

Fail to RejectIndependence

Claim: The type of crime and knowledge of criminal are independentHo : The type of crime and knowledge of criminal are independent H1 : The type of crime and knowledge of criminal are dependent

Page 26: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

26Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Test Statistic X2 = 119.319

with = 0.05 and (r -1) (c -1) = (2 -1) (3 -1) = 2 degrees of freedom

It appears that the type of crime and knowledge of the criminal are related.

0

= 0.05

X2 = 5.991

RejectIndependence

Critical Value X2 = 5.991 (from Table A-4)

Reject independence

Sample data: X2 =119.319

Fail to RejectIndependence

Page 27: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

27Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Figure 10-8

Relationships Among Components in X2 Test of Independence

Page 28: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

28Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Definition

Test of Homogeneity test the claim that different

populations have the same proportions of some characteristics

Page 29: 1 Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION E.

29Chapter 10. Section 10-3. Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

How to distinguish between a test of homogeneity and a

test for independence:

Were predetermined sample sizes used for different populations (test of homogeneity), or was one big sample drawn so both row and column totals were determined randomly (test of independence)?