Document From Da??
Document From Da??
Document From Da??
For the test for independence, the expected frequency for each
cell in the matrix is obtained by
j 1 .
Goodness-of-Fit Tests
• Rejection Region:
• Degrees of Freedom = k – 1 – m
• where k = # of categories, m = # of parameters
• Uniform Discrete: m = 0 so df = k – 1
• Binomial: m = 0 when is known, so df = k – 1
m = 1 when is unknown, so df = k – 2
• Poisson: m = 1 since µ usually estimated, df = k – 2
• Normal: m = 2 when µ and estimated, df = k – 3
• Exponential: m = 1 since µ usually estimated, df = k – 2
Goodness-of-Fit Tests
• Test Statistic:
(O – E )2
2 j j
Ej
where Oj = Actual number observed in
each class
Ej = Expected number, j • n
Goodness-of-Fit: An
Example
• Problem 13.20: In a study of vehicle ownership, it has been found
that 13.5% of U.S. households do not own a vehicle, with 33.7%
owning 1 vehicle, 33.5% owning 2 vehicles, and 19.3% owning 3 or
more vehicles. The data for a random sample of 100 households in
a resort community are summarized below. At the 0.05 level of
significance, can we reject the possibility that the vehicle-
ownership distribution in this community differs from that of the
nation as a whole?
# Vehicles Owned # Households
0 20
1 35
2 23
3 or more 22
Goodness-of-Fit: An
Example
# Vehicles O E [O – E ] / E
j j j j
2
j
0 20 13.5 3.1296
1 35 33.7 0.0501
2 23 33.5 3.2910
3+ 22 19.3 0.3777
Sum = 6.8484
I. H0: 0 = 0.135, 1 = 0.337, 2 = 0.335, 3+ = 0.193
Vehicle-ownership distribution in this community is the same as
it is in the nation as a whole.
H1: At least one of the proportions does not equal the stated
value. Vehicle-ownership distribution in this community is not
the same as it is in the nation as a whole.
Goodness-of-Fit: An
Example
II. Rejection Region:
= 0.05
df = k – 1 – m = 4 – 1 – 0 = 3
Do Not Reject H0 Reject H0
0.95 0.05
III. Test Statistic:
2 = 6.8484 c 2=7.815
IV. Conclusion: Since the test statistic of 2 = 6.8484 falls below the
critical value of 2 = 7.815, we do not reject H0 with at least 95%
confidence.
V. Implications: There is not enough evidence to show that vehicle
ownership in this community differs from that in the nation as a
whole.
Chi-Square Tests of
Independence
Between Two
• TheVariables
Question:
• Are the two variables independent? If the two variables of
interest are independent, then
• the way elements are distributed across the various levels of one
variable does not affect how they are distributed across the levels of
the other.
• the probability of an element falling in any level of the second
variable is unaffected by knowing its level on the first dimension.
An Integrated Definition of
Independence
• From basic probability:
If two events are independent
P(A and B) = P(A) • P(B)
(O – E )2
2 ij ij
E
ij
Chi-Square Tests of
Independence
• Calculating expected values
Domestic (Dom) : O- 19 22 23
E- 26.6971 17.1886 20.1143
2 contribution - 2.2192 1.3468 0.4140
• Hypotheses:
• H0: 1 = 2 = ... = k
• H1: At least one of the population proportions differs
from the other.
Chi-Square Tests of
Multiple ’s
• Rejection Region:
Degrees of freedom: df = (k – 1)
• Test Statistic:
(O – E )2
2 ij ij
E
ij
Chi-Square Tests of Multiple ’s
• Some applications:
• A Scenic America study of billboards found that 70% of the
billboards in a sample observed in Baltimore advertised
alcohol or tobacco products, compared to 50% in Detroit
and 54% in St. Louis.
• It has been reported that 4.9% of all U.S. households
burned wood as the main heating fuel in 1983, compared
to 4.6% in 1960 and 3.4% in 1980.
Chi-Square Tests of
Multiple ’s
• Comparison of –
Population
Variance
• The Question:
• Does the value of the sample variance differ from the
value of the assumed population variance?
• Hypotheses:
• H0: 2 {=, , } a specific value.
• H1: 2 {, >, <} a specific value.
Chi-Square Test of a Single
Population
• Variance
Rejection Region:
Degrees of freedom: df = n – 1
where n = sample size
• Test Statistic:
2 (n –1)s2
2