Vous êtes sur la page 1sur 53

ELEMENTARY

Chapter 10

MARIO F. TRIOLA

STATISTICS

Multinomial Experiments and


Contingency Tables

EIGHTH

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

EDITION1

Chapter 10

Multinomial Experiments and


Contingency Tables
10-1 Overview
10-2 Multinomial Experiments:
Goodness-of-fit
10-3 Contingency Tables:
Independence and Homogeneity
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

10-1

Overview

Focus on analysis of categorical (qualitative or


attribute) data that can be separated into
different categories (often called cells)

Use the X2 (chi-square) test statistic (Table A-4)


One-way frequency table (single row or column)
Two-way frequency table or contingency table
(two or more rows and columns)
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

ELEMENTARY
Section 10-2

STATISTICS
Goodness of Fit

EIGHTH
EDITIO
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

MARIO F. TRIOLA

10-2 Multinomial Experiments:

Goodness-of-Fit
Assumptions
when testing hypothesis that the population
proportion for each of the categories is as claimed:

1. The data have been randomly selected.


2. The sample data consist of frequency counts
for each of the different categories.
3. The expected frequency is at least 5. (There is
no requirement that the observed frequency
for each category must be at least 5.)
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Definition
Multinomial Experiment
An experiment that meets the following conditions:
1. The number of trials is fixed.

2. The trials are independent.


3. All outcomes of each trial must be
classified
into exactly one of several different
categories.
4. The probabilities for the different
categories
remain constant for each trial.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Definition
Goodness-of-fit test
used to test the hypothesis that an
observed frequency distribution fits
(or conforms to) some claimed
distribution

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Goodness-of-Fit Test
Notation
0

represents the observed frequency of an outcome

represents the expected frequency of an outcome

represents the number of different categories or


outcomes

represents the total number of trials

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Expected Frequencies
If all expected frequencies are equal:

E=

n
k

the sum of all observed frequencies divided


by the number of categories
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

Expected Frequencies
If all expected frequencies are not all equal:

E=np
each expected frequency is found by multiplying
the sum of all observed frequencies by the
probability for the category
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

10

Goodness-of-fit Test in Multinomial Experiments

Test Statistic
X =
2

(O - E)2
E

Critical Values
1. Found in Table A-4 using k-1 degrees of
freedom
where k = number of categories
2. Goodness-of-fit hypothesis tests are always
right-tailed.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

11

A close agreement between observed


and expected values will lead to a small
value of X2 and a large P-value.
A large disagreement between observed
and expected values will lead to a large
value of X2 and a small P-value.
A significantly large value of will cause
a rejection of the null hypothesis of no
difference between the observed and the
expected.
2

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

12

Relationships Among
Components in
Goodness-of-Fit
Hypothesis Test

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

13

Categories with Equal


Frequencies
(Probabilities)

H0: p1 = p2 = p3 = . . . = pk
H1: at least one of the probabilities is
different from the others

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

14

Categories with Unequal


Frequencies
(Probabilities)

H0: p1 , p2, p3, . . . , pk are as claimed


H1: at least one of the above proportions
is different from the claimed value

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

15

Example:

Mars, Inc. claims its M&M candies are distributed with


the color percentages of 30% brown, 20% yellow, 20% red, 10% orange,
10% green, and 10% blue. At the 0.05 significance level, test the claim
that the color distribution is as claimed by Mars, Inc.

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

16

Example:

Mars, Inc. claims its M&M candies are distributed with


the color percentages of 30% brown, 20% yellow, 20% red, 10% orange,
10% green, and 10% blue. At the 0.05 significance level, test the claim
that the color distribution is as claimed by Mars, Inc.

Claim: p1 = 0.30, p2 = 0.20, p3 = 0.20, p4 = 0.10,


p5 = 0.10, p6 = 0.10

H0 : p1 = 0.30, p2 = 0.20, p3 = 0.20, p4 = 0.10,


p5 = 0.10, p6 = 0.10
H1: At least one of the proportions is
different from the claimed value.

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

17

Example:

Mars, Inc. claims its M&M candies are distributed with


the color percentages of 30% brown, 20% yellow, 20% red, 10% orange,
10% green, and 10% blue. At the 0.05 significance level, test the claim
that the color distribution is as claimed by Mars, Inc.

Frequencies of M&Ms
Brown Yellow Red Orange Green Blue
Observed frequency

33

26

21

n = 100

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

18

Example:

Mars, Inc. claims its M&M candies are distributed with


the color percentages of 30% brown, 20% yellow, 20% red, 10% orange,
10% green, and 10% blue. At the 0.05 significance level, test the claim
that the color distribution is as claimed by Mars, Inc.

Frequencies of M&Ms
Brown Yellow Red Orange Green Blue
Observed frequency

n = 100

33

26

21

Brown E = np = (100)(0.30) = 30
Yellow E = np = (100)(0.20) = 20
Red E = np = (100)(0.20) = 20
Orange E = np = (100)(0.10) = 10
Green E = np = (100)(0.10) = 10
Blue E = np = (100)(0.10) = 10

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

19

Frequencies of M&Ms
Brown Yellow Red Orange Green Blue
Observed frequency

33

26

21

Expected frequency

30

20

20

10

10

10

0.3

1.8

0.05

0.4

0.9

2.5

(O -E)2/E

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

20

Frequencies of M&Ms
Brown Yellow Red Orange Green Blue
Observed frequency

33

26

21

Expected frequency

30

20

20

10

10

10

0.3

1.8

0.05

0.4

0.9

2.5

(O -E)2/E

Test Statistic

X =
2

(O - E)2
=
E

5.95

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

21

Frequencies of M&Ms
Brown Yellow Red Orange Green Blue
Observed frequency

33

26

21

Expected frequency

30

20

20

10

10

10

0.3

1.8

0.05

0.4

0.9

2.5

(O -E)2/E

Test Statistic

X2 =

(O - E)2
=
E

5.95

Critical Value X =11.071


(with k-1 = 5 and = 0.05)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

22

Fail to Reject

Reject

= 0.05
0

X2 = 11.071
Sample data: X2 = 5.95

Test Statistic does not fall within critical region;


Fail to reject H0: percentages are as claimed
There is not sufficient evidence to warrant rejection of the
claim that the colors are distributed with the given
percentages.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

23

Comparison of Claimed and Observed Proportions

0.30

0.20
Proportions

Observed proportions

Claimed proportions
0.10

0
Orange

Yellow

Brown

Red

Blue

Green

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

24

ELEMENTARY
Section 10-3

STATISTICS

Contingency Tables: Independence


and Homogeneity

EIGHTH
EDITIO
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

MARIO F. TRIOLA

25

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

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

26

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.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

27

Definition
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.)
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

28

Assumptions
1.

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

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

29

Test of Independence

Test Statistic
X =
2

(O - E)2
E

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.


Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

30

E=

(row total) (column total)


(grand total)

Total number of all observed frequencies


in the table

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

31

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.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

32

Expected Frequency for


Contingency Tables

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

33

Expected Frequency for


Contingency Tables

E=

grand total

row total
grand total

column total
grand total

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

34

Expected Frequency for


Contingency Tables

E=

grand total

row total
grand total

column total
grand total

p
(probability of a cell)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

35

Expected Frequency for


Contingency Tables

E=

grand total

row total
grand total

column total
grand total

p
(probability of a cell)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

36

Expected Frequency for


Contingency Tables

E=

grand total

row total
grand total

column total
grand total

p
(probability of a cell)

E=

(row total) (column total)


(grand total)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

37

Is the type of crime independent of whether the


criminal is a stranger?
Stranger
Acquaintance
or Relative

Homicide
12

39

Robbery

Assault

379

727

106

642

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

38

Is the type of crime independent of whether the


criminal is a stranger?
Stranger

Homicide
12

Assault

Row Total

379

727

1118

Robbery

Acquaintance
or Relative

39

106

642

787

Column Total

51

485

1369

1905

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

39

Is the type of crime independent of whether the


criminal is a stranger?
Stranger

Homicide
12

Assault

Row Total

379

727

1118

Robbery

Acquaintance
or Relative

39

106

642

787

Column Total

51

485

1369

1905

E=

(row total) (column total)


(grand total)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

40

Is the type of crime independent of whether the


criminal is a stranger?
Homicide
12

Stranger

Assault

Row Total

379

727

1118

Robbery

(29.93)
Acquaintance
or Relative

39

106

642

787

Column Total

51

485

1369

1905

E=

(row total) (column total)


(grand total)

E = (1118)(5 = 29.93
1) 1905

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

41

Is the type of crime independent of whether the


criminal is a stranger?
Stranger
Acquaintance
or Relative

Row Total

727

1118

Robbery

(29.93)

(284.64)

(803.43)

39
(21.07)

106
(200.36)

642
(565.57)

787

485

1369

1905

379

51

Column Total

E=
E

Assault

Homicide
12

= (1118)(5
1) 1905

(row total) (column total)


(grand total)

= 29.93

E = (1118)(485)= 284.64
1905

etc.

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

42

Is the type of crime independent of whether the


criminal is a stranger?

X =
2

(O - E )2
E
Homicide

Stranger

Acquaintance

12
(29.93)

Robbery

Forgery

379
(284.64)

727
(803.43)

106
(200.36)

642
(565.57

[10.741]
39
(21.07)

(E)

(O - E )2
E

or Relative

(O -E )2
Upper left cell:
=
E

(12 -29.93)2

29.93

= 10.741

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

43

Is the type of crime independent of whether the


criminal is a stranger?

X =
2

(O - E )2
E
Homicide

Stranger

Acquaintance
or Relative

12
(29.93)

[10.741]
39
(21.07)
[15.258]

(O -E )2
Upper left cell:
=
E

Robbery

Forgery

379
(284.64)
[31.281]

727
(803.43)
[7.271]

106
(200.36)
[44.439]

642
(565.57)
[10.329]

(12 -29.93)2

29.93

(E)

(O - E )2
E

= 10.741

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

44

Is the type of crime independent of whether the


criminal is a stranger?

X =
2

(O - E )2
E
Homicide

12
(29.93)

Stranger

[10.741]

Acquaintance
or Relative

39
(21.07)
[15.258]

Robbery

Forgery

379
(284.64)
[31.281]

727
(803.43)
[7.271]

106
(200.36)
[44.439]

642
(565.57)
[10.329]

(E)

(O - E )2
E

2
Test Statistic X = 10.741 + 31.281 + ... + 10.329 =

119.319
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

45

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)

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

46

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)

Fail to Reject
Independence

Reject
Independence

= 0.05
0

X2 = 5.991
Sample data: X2 =119.319

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

47

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)

Fail to Reject
Independence

Reject
Independence

= 0.05
0

X2 = 5.991

Reject independence

Sample data: X2 =119.319

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

48

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)

Fail to Reject
Independence

Reject
Independence

= 0.05
0

X2 = 5.991

Reject independence

Sample data: X2 =119.319

Claim: The type of crime and knowledge of criminal are independent


Ho : The type of crime and knowledge of criminal are independent
H1 : The type of crime and knowledge of criminal are dependent
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

49

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)

Fail to Reject
Independence

Reject
Independence

= 0.05
0

X2 = 5.991

Reject independence

Sample data: X2 =119.319

It appears that the type of crime and


knowledge of the criminal are related.
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

50

Relationships Among Components in X2 Test


of Independence

Figure 10-8

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

51

Definition
Test of Homogeneity
test the claim that different populations
have the same proportions of some
characteristics

Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

52

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)?
Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright 2001. Addison Wesley Longman

53

Vous aimerez peut-être aussi