Lec 54
Lec 54
When sample size is large enough (n p >= 5 and n q>= 5), sample proportions are normally distributed
and the following formula can be used to test hypotheses about p.
A manufacturer believes exactly 8% of its products contain at least one minor flaw.
Suppose a company researcher wants to test this belief. The null and alternative hypotheses are
H0: p = .08
Ha: p = .08
3
The observed value of z is in the rejection region (observed z = 4.43> table z.05= +1.645), so the
business researcher rejects the null hypothesis.
The chi-square goodness-of-fit test can also be used to conduct tests about p; this situation can
be viewed as a special case of the chi-square goodness-of-fit test where the number of
classifications equals two (binomial distribution situation).
The observed chi-square is computed in the same way as in any other chi-square goodness-of-fit
test, but because the test contains only two classifications (success or failure), k = 2 and the
degrees of freedom are k - 1 = 2 - 1 = 1.
Working this problem by the chi-square goodness-of-fit test, we view it as a two category
expected distribution in which we expect .08 defects and .92 non-defects.
The observed categories are 33 defects and 200 - 33 = 167 non-defects. Using the total observed
items (200), we can determine an expected distribution as .08(200) = 16 and .92(200) = 184.
Shown here are the observed and expected frequencies.
5
6
2 Test for the Difference Between Two Proportions
H0: π1 = π2 (Proportion of females who are left handed is equal to the proportion of
males who are left handed)
H1: π1 ≠ π2 (The two proportions are not the same – hand preference is not
independent of gender)
• If H0 is true, then the proportion of left-handed females should be the same as the proportion of left-handed
males
• The two proportions above should be the same as the proportion of left-handed people overall
The Chi-Square Test Statistic
The Chi-square test statistic is:
( fo fe )2
2
χ STAT
all cells
fe
• where:
fo = observed frequency in a particular cell
fe = expected frequency in a particular cell if H0 is true
STAT
2
for the 2 x 2 case has 1 degree of freedom
(Assumed: each cell in the contingency table has expected frequency of at least 5)
2
Decision Rule
The χ STATtest statistic approximately follows a
chi-squared distribution with one degree of freedom
Decision Rule:
If χ
2
STAT
χ α2 , reject H0,
otherwise, do not reject H0
0
Do not Reject H0 2
reject H0 2α
The Chi-Square Test Statistic
Gender Hand Preference
Left Right
Female Observed = 12 Observed = 108 120
36 264 300
2
The test statistic is χ STAT 0.7576 ; χ 02.05 with 1 d.f. 3.841
Decision Rule:
2
If χ STAT > 3.841, reject H0, otherwise, do
not reject H0
0.05 Here,
2 2
χ STAT = 0.7576< χ 0.05 = 3.841,
so we do not reject H0 and
0
Do not reject H0 Reject H0 2 conclude that there is not sufficient
evidence that the two proportions
20.05 = 3.841 are different at = 0.05
2 Test for Differences Among More Than Two Proportions
• Extend the 2 test to the case with more than two
independent populations:
H0: π1 = π2 = … = πc
H1: Not all of the πj are equal (j = 1, 2, …, c)
The Chi-Square Test Statistic
The Chi-square test statistic is:
( fo fe )2
2
χ STAT
all cells
fe
• Where:
fo = observed frequency in a particular cell of the 2 x c table
fe = expected frequency in a particular cell if H0 is true
(Assumed: each cell in the contingency table has expected frequency of at least 1)
Computing the
Overall Proportion
The overall X1 X 2 Xc X
p
proportion is: n1 n2 nc n
X1 X 2 Xc X
p (128+199+186) / (216+232+252) = 513/ 700 = 0.733
n1 n2 nc n
17
Expected values
Choice of hotel Golden palm Palm Royale Palm princes Total
H0: π1 = π2 = … = π3
H1: Not all of the πj are equal (j = 1, 2, …, 3)
18