Learning Objectives
2. Know how to use sample data to test for independence of two variables.
3. Understand the role of the chi-square distribution in conducting tests of goodness of fit and
independence.
4. Be able to conduct a goodness of fit test for cases where the population is hypothesized to have
either a multinomial, a Poisson, or a normal distribution.
5. For a test of independence, be able to set up a contingency table, determine the observed and expected
frequencies, and determine if the two variables are independent.
Solutions:
12 - 1
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
e3 = 200 (.20) = 40
k - 1 = 2 degrees of freedom
b. .01 = 9.210
Reject H0 if 2 9.210
2 = 35, reject H0
k - 1 = 3 degrees of freedom
Chi-square table shows p-value less than .005. Actual p-value = .0016
12 - 2
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
3. H0 = pABC = .29, pCBS = .28, pNBC = .25, pIND = .18
Ha = The proportions are not pABC = .29, pCBS = .28, pNBC = .25, pIND = .18
k - 1 = 3 degrees of freedom
p-value > .05, do not reject H0. There has not been a significant change in the viewing audience
proportions.
4.
Observed Expected
Hypothesized Frequency Frequency
Category Proportion (fi) (ei) (fi - ei)2 / ei
Brown 0.30 177 151.8 4.18
Yellow 0.20 135 101.2 11.29
Red 0.20 79 101.2 4.87
Orange 0.10 41 50.6 1.82
Green 0.10 36 50.6 4.21
Blue 0.10 38 50.6 3.14
Totals: 506 29.51
k - 1 = 5 degrees of freedom
p-value < .05, reject H0. The percentages reported by the company have changed.
5.
Observed Expected
Hypothesized Frequency Frequency
Category Proportion (fi) (ei) (fi - ei)2 / ei
Full Service 1/3 264 249.33 0.86
Discount 1/3 255 249.33 0.13
Both 1/3 229 249.33 1.66
Totals: 748 2.65
k - 1 = 2 degrees of freedom
12 - 3
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
p-value > .10, do not reject H0. There is no significant difference in preference among the three
services.
6.
Observed Expected
Hypothesized Frequency Frequency
Category Proportion (fi) (ei) (fi - ei)2 / ei
News and Opinion 1/6 20 19.17 .04
General Editorial 1/6 15 19.17 .91
Family Oriented 1/6 30 19.17 6.12
Business/Financial 1/6 22 19.17 .42
Female Oriented 1/6 16 19.17 .52
African-American 1/6 12 19.17 2.68
Totals: 115 10.69
k - 1 = 5 degrees of freedom
p-value .10, reject H0. Conclude that there is a difference in the proportion of ads with guilt appeals
among the six types of magazines.
k -1 = 4 degrees of freedom
Reject H0. Yes, the largest companies differ in performance from the 1000 companies. In general, the
largest companies did not do as well as others. 15 of 60 companies (25%) are in the middle group and
20 of 60 companies (33%) are in the next lower group. These both are greater than the 20% expected.
Relative few large companies are in the top A and B categories.
Note that this result is for the year 2002. This should not be generalized to other years without
additional data.
12 - 4
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
8. H0: p1 = .03, p2 = .28, p3 = .45, p4 = .24
Degrees of freedom = k - 1 = 3
p-value .01, reject H0. Conclude that the ratings differ. A comparison of observed and expected
frequencies show telephone service is slightly better with more excellent and good ratings.
Expected Frequencies:
A B C
P 28.5 39.9 45.6
Q 21.5 30.1 34.4
(20 28.5) 2 (44 39.9) 2 (50 45.6) 2 (30 21.5) 2 (26 30.1) 2 (30 34.4) 2
2 = + + + + +
28.5 39.9 45.6 21.5 30.1 34.4
= 7.86
p-value .05, reject H0. Conclude that the column variable is not independent of the row variable.
Expected Frequencies:
A B C
P 17.5000 30.6250 21.8750
Q 28.7500 50.3125 35.9375
R 13.7500 24.0625 17.1875
12 - 5
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
(20 17.5000) 2 (30 30.6250) 2 (30 17.1875) 2
2 = + + +
17.5000 30.6250 17.1875
= 19.77
p-value .05, reject H0. Conclude that the column variable is not independent of the row variable.
Expected Frequencies:
Observed Expected
Frequency Frequency
Ticket Flight (fi) (ei) (fi - ei)2 / ei
First Domestic 29 35.59 1.22
First International 22 15.41 2.82
Business Domestic 95 150.73 20.61
Business International 121 65.27 47.59
Full Fare Domestic 518 455.68 8.52
Full Fare International 135 197.32 19.68
Totals: 920 100.43
p-value .05, reject H0. Conclude that the type of ticket purchased is not independent of the type of
flight.
p-value .05, reject H0. Conclude brand loyalty is not independent of manufacturer.
b. Brand Loyalty
13.
Industry
Major Oil Chemical Electrical Computer
Business 30 22.5 17.5 30
Engineering 30 22.5 17.5 30
2 = 12.38
p-value .01, reject H0. Conclude that major and industry are not independent.
12 - 7
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
Observed Expected
Frequency Frequency
Most Difficult Gender (fi) (ei) (fi - ei)2 / ei
Spouse Men 37 31.0 1.16
Spouse Women 25 31.0 1.16
Parents Men 28 29.5 0.08
Parents Women 31 29.5 0.08
Children Men 7 13.0 2.77
Children Women 19 13.0 2.77
Siblings Men 8 5.5 1.14
Siblings Women 3 5.5 1.14
In-Laws Men 4 7.0 1.29
In-Laws Women 10 7.0 1.29
Other Relatives Men 16 14.0 0.29
Other Relatives Women 12 14.0 0.29
Totals: 200 13.43
p-value .05, reject H0. Conclude that the most difficult person to buy for is not independent of
gender.
Observed Expected
Frequency Frequency
Magazine Appeal (fi) (ei) (fi - ei)2 / ei
News Guilt 20 17.16 0.47
News Fear 10 12.84 0.63
General Guilt 15 14.88 0.00
General Fear 11 11.12 0.00
Family Guilt 30 28.03 0.14
Family Fear 19 20.97 0.18
Business Guilt 22 22.31 0.00
Business Fear 17 16.69 0.01
Female Guilt 16 17.16 0.08
Female Fear 14 12.84 0.11
African-American Guilt 12 15.45 0.77
African-American Fear 15 11.55 1.03
Totals: 201 3.41
12 - 8
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
Degrees of freedom = (6-1)(2-1) = 5
p-value > .01, do not reject H0. The hypothesis of independence cannot be rejected.
p-value .05, reject H0. Conclude order fulfillment is not independent of industry.
b. The pharmaceutical industry is doing the best with 207 of 210 (98.6%) correctly filled orders.
2 = 7.71
2 = 13.42
p-value < .01, reject H0. Conclude that party affiliation is not independent of education level.
Observed Expected
Frequency Frequency
Siskel Ebert (fi) (ei) (fi - ei)2 / ei
Con Con 24 11.81 12.57
Con Mixed 8 8.44 0.02
Con Pro 13 24.75 5.58
Mixed Con 8 8.40 0.02
Mixed Mixed 13 6.00 8.17
Mixed Pro 11 17.60 2.48
Pro Con 10 21.79 6.38
Pro Mixed 9 15.56 2.77
Pro Pro 64 45.65 7.38
Totals: 160 45.36
p-value .01, reject H0. Conclude that the ratings are not independent.
20. First estimate from the sample data. Sample size = 120.
12 - 10
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
Therefore, we use Poisson probabilities with = 1.3 to compute expected frequencies.
Degrees of freedom = 5 - 1 - 1 = 3
p-value .05, reject H0. Conclude that the data do not follow a Poisson probability distribution.
21. With n = 30 we will use six classes, each with the probability of .1667.
x = 22.8 s = 6.27
The z values that create 6 intervals, each with probability .1667 are -.98, -.43, 0, .43, .98
Observed Expected
Interval Frequency Frequency Difference
less than 16.66 3 5 -2
16.66 - 20.11 7 5 2
20.11 - 22.80 5 5 0
22.80 - 25.49 7 5 2
25.49- 28.94 3 5 -2
28.94 and up 5 5 0
Degrees of freedom = 6 - 2 - 1 = 3
12 - 11
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
Poisson
x Observed Probabilities Expected
0 34 .3679 29.43
1 25 .3679 29.43
2 11 .1839 14.71
3 7 .0613 4.90 combine into 1
4
5 or more
3
-
.0153
.0037
1.22
.30 } category of 3 or
more to make
ei 5
2 = 4.30
Degrees of freedom = 4 - 1 - 1 = 2
p-value > .05, do not reject H0. The assumption of a Poisson distribution cannot be rejected.
Poisson
x Observed Probabilities Expected
0 15 .1353 13.53
1 31 .2707 27.07
2 20 .2707 27.07
3 15 .1804 18.04
4 13 .0902 9.02
5 or more 6 .0527 5.27
2 = 4.95
Degrees of freedom = 6 - 1 - 1 = 4
p-value > .10, do not reject H0. The assumption of a Poisson distribution cannot be rejected.
12 - 12
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
24. x = 24.5 s = 3 n = 30 Use 6 classes
Observed Expected
Interval Frequency Frequency
less than 21.56 5 5
21.56 - 23.21 4 5
23.21 - 24.50 3 5
24.50 - 25.79 7 5
25.79 - 27.44 7 5
27.41 up 4 5
2 = 2.8
Degrees of freedom = 6 - 2 - 1 = 3
p-value > .10, do not reject H0. The assumption of a normal distribution cannot be rejected.
Observed Expected
Interval Frequency Frequency
less than 56.7 7 5
56.7 - 66.5 7 5
66.5 - 74.6 1 5
74.6 - 84.5 1 5
84.5 up 9 5
2 = 11.2
Degrees of freedom = 5 - 1 - 1 = 2
p-value .01, reject H0. Conclude the distribution is not a normal distribution.
26.
Observed 60 45 59 36
Expected 50 50 50 50
2 = 8.04
Degrees of freedom = 4 - 1 = 3
12 - 13
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
27.
Observed 48 323 79 16 63
Expected 37.03 306.82 126.96 21.16 37.03
Degrees of freedom = 5 - 1 = 4
p-value .01, reject H0. Mutual fund investors' attitudes toward corporate bonds differ from their
attitudes toward corporate stock.
28.
Observed 20 20 40 60
Expected 35 35 35 35
Degrees of freedom = 4 - 1 = 3
p-value .05, reject H0. The park manager should not plan on the same number attending each day.
Plan on a larger staff for Sundays and holidays.
29.
Observed 13 16 28 17 16
Expected 18 18 18 18 18
2 = 7.44
Degrees of freedom = 5 - 1 = 4
p-value > .05, do not reject H0. The assumption that the number of riders is uniformly distributed
cannot be rejected.
12 - 14
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
30.
Observed Expected
Hypothesized Frequency Frequency
Category Proportion (fi) (ei) (fi - ei)2 / ei
Very Satisfied 0.28 105 140 8.75
Somewhat Satisfied 0.46 235 230 0.11
Neither 0.12 55 60 0.42
Somewhat Dissatisfied 0.10 90 50 32.00
Very Dissatisfied 0.04 15 20 1.25
Totals: 500 42.53
Degrees of freedom = 5 - 1 = 4
p-value .05, reject H0. Conclude that the job satisfaction for computer programmers is different than
the job satisfaction for IS managers.
2 = 8.10
p-value .05, reject H0. Conclude that shift and quality are not independent.
12 - 15
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
Observed Expected
Frequency Frequency
Employment Region (fi) (ei) (fi - ei)2 / ei
Full-Time Eastern 1105 1046.19 3.31
Full-time Western 574 632.81 5.46
Part-Time Eastern 31 28.66 0.19
Part-Time Western 15 17.34 0.32
Self-Employed Eastern 229 258.59 3.39
Self-Employed Western 186 156.41 5.60
Not Employed Eastern 485 516.55 1.93
Not Employed Western 344 312.45 3.19
Totals: 2969 23.37
p-value .05, reject H0. Conclude that employment status is not independent of region.
2 = 2.21
p-value > .05, do not reject H0. The loan decision does not appear to be dependent on the officer.
12 - 16
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
2
Chi Square (fij - eij) / eij
p-value .01, reject H0. Conclude martial status is not independent of gender.
b. Martial Status
(4 9) 2 (10 12) 2 (4 6) 2
2 = + + + = 9.76
9 12 6
p-value .05, reject H0. Banking tends to have lower P/E ratios. We can conclude that industry type
and P/E ratio are related.
2 = 6.17
12 - 17
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Chapter 12
Using 2 table, 2 = 6.17 shows p-value is greater than .10
p-value > .05, do not reject H0. The assumption of independence cannot be rejected.
Observed Expected
Interval Frequency Frequency
less than 62.54 5 5
62.54 - 68.50 3 5
68.50 - 72.85 6 5
72.85 - 76.83 5 5
76.83 - 80.81 5 5
80.81 - 85.16 7 5
85.16 - 91.12 4 5
91.12 up 5 5
2 = 2
Degrees of freedom = 8 - 2 - 1 = 5
p-value > .05, do not reject H0. The assumption of a normal distribution cannot be rejected.
p-value > .05, do not reject H0. We cannot conclude that office vacancies are dependent on metropolitan
area, but it is close: the p-value is slightly larger than .05.
12 - 18
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.
Tests of Goodness of Fit and Independence
39. a.
Observed Binomial Prob. Expected
x Frequencies n = 4, p = .30 Frequencies
0 30 .2401 24.01
1 32 .4116 41.16
2 25 .2646 26.46
3 10 .0756 7.56
4 3 .0081 .81
100 100.00
The expected frequency of x = 4 is .81. Combine x = 3 and x = 4 into one category so that all
expected frequencies are 5 or more.
Observed Expected
x Frequencies Frequencies
0 30 24.01
1 32 41.16
2 25 26.46
3 or 4 13 8.37
100 100.00
b. 2 = 6.17
Degrees of freedom = 4 - 1 = 3
p-value > .05, do not reject H0. Conclude that the assumption of a binomial distribution cannot be
rejected.
12 - 19
This edition is intended for use outside of the U.S. only, with content that may be different from the U.S. Edition. This may not be resold, copied,
or distributed without the prior consent of the publisher.