Professional Documents
Culture Documents
Lecture 9:
Chi-squared tests for
qualitative data
Objectives
Chi-squared tests
for qualitative data
Goodness-of-fit Test of
test independence
Goodness-of-fit test
1
8/25/22
Market share
• Firms periodically estimate their market
shares and the market shares of competitors.
• Market shares change over time.
• Firms have to test to determine whether the
actual current market shares are in
accordance with their beliefs.
Problem context
– Two competing companies A and B have
conducted aggressive advertising campaigns.
– Market shares before the campaigns were:
• Company A = 45%
• Company B = 40%
• Other competitors = 15%.
2
8/25/22
The
The technique
technique
Multinomial experiment
Problem
Problem context (cont.)
context (cont.)
– The hypotheses are:
H0: p1 = 0.45, p2 = 0.40, p3 = 0.15
HA: at least one pi is not equal to its specified value.
102
82
30 = 200(0.15)
16 9
3
8/25/22
10
The technique
• To determine whether the market shares have
changed or not, the best way is to compare
the observed frequency and the expected
one.
• If the differences are small à actual shares
are in accord with estimated shares àshares
unchanged.
• If the differences are large à actual shares are
not in accord with estimated shares.à shares
changed.
11
The technique
Expected frequency = np
12
4
8/25/22
Problem
Problemcontext
context(cont.)
(cont.)
• The rejection region is Conclusion: at the 5%
significance level there is
sufficient evidence to reject
the null hypothesis. At least
one of the probabilities pi
is different. Thus, at least two
• Value of the test statistic: market shares have changed.
13
Rule of five
• The test statistic used to perform the test is
only approximately Chi-squared distributed.
• For the approximation to apply, the expected
cell frequency has to be at least five.
• If the expected frequency in a cell is less than
five, combine it with other cells.
14
Goodness-of-Fit test
Goodness-of-Fit Test
comparing an observed set of frequencies
to an expected distribution.
15
5
8/25/22
Goodness-of-Fit test
Equal expected frequencies
Ho : No difference between ....
Ha : There is a difference between ....
OR
• H 0: p 1 = 1/k, …, p k = 1/k
• H A: At least one proportion differs from its
specified value.
• Test statistic:
Example
The following data on absenteeism was collected
from a manufacturing plant. At the 0.05 level of
significance, test to determine whether there is a
difference in the absence rate by day of the week.
17
Solution
Ho : No difference in the absence rate by day of the week
Ha : There is a difference in the absence rate by day of the week
Test statistic:
6
8/25/22
Goodness-of-Fit test
Unequal expected frequencies
• H 0: P 1 = p 1, …, P k = p k
• H A: At least one proportion differs from its
specified value.
• Test statistic:
19
Test of independence
20
21
7
8/25/22
Problem context
• A random sample of last year’s MBA students was selected.
• The following contingency table summarizes the relevant
data
22
Problem context
23
Problem context
H0: The two variables are independent
HA: The two variables are dependent
8
8/25/22
Problem context
60
39
61 44 152
25
Problem context
26
Problem context
31 24.08
31 24.08
5 6.39 7 6.80
31 24.08 5 6.39 7 6.80
The expected frequency 7 6.80
5 6.39
31 24.08
Calculation of the c 2 statistic
7 6.80
31 24.08 5 6.39
7 6.80
24.08)2 6.39)2 (7 - 6.80)2
c 2= (31 -
24.08 +…+
(5 -
6.39
+…+ 6.80
= 14.70
9
8/25/22
Rule of five
– The c2 distribution provides an adequate
approximation to the sampling distribution under the
condition that eij ³ 5 for all the cells.
– When eij < 5, rows or columns must be added such
that the condition is met.
Example
18 (17.9) 4 (5.1)
23 (22.3) 7 (6.3)
12 (12.8) 4 (3.6)
4 +14 5.1+12.8
7 +16 6.3+16
4+ 8 3.6+ 9.2
28
Summary
Ø Goodness-of-fit test
Ø Test of independence
Ø Rule of five
29
10