Professional Documents
Culture Documents
Chi Square Tests
Chi Square Tests
17-1
Chi-Square Tests
Chi-Squared Analysis: Testing
for Patterns in Qualitative Data
Slide
17-2 Chi-Squared Tests
• Hypothesis Tests for Qualitative Data
– Categories instead of numbers
– Based on counts
• the number of sampled items falling into each category
– Chi-squared statistic
• Measures the difference between Actual counts and Expected
counts (as expected under the null hypothesis H0)
Expected Count Ei
where the sum extends over all categories or combinations of
categories
– Significant if the chi-squared statistic is large enough
Slide
17-3 Summarizing Qualitative Data
• Use Counts and Percentages, for Example:
Sum of
(Observed Count Expected Count ) 2 O Ei
i
2
Expected Count Ei
• Tells you what the counts would have been, on average, if the
variables were independent and there were no randomness
Slide
17-8 Testing Association (continued)
– The assumptions:
1. Data set is a random sample from the population of interest
2. At least 5 counts are expected in each combination of
categories
– The chi-squared statistic:
Sum of
(Observed Count Expected Count ) 2 O Ei
i
2
Expected Count Ei
• where the sum extends over all combinations of categories
– The degrees of freedom:
Number of categories Number of categories
1 1
for first vari able for second variable
– The test result: Significant if the chi-squared statistic is
larger than the critical value from the table
Slide
17-9
Tbl 17.3.1
Example: Market Segmentation
• Data: Rowing Machine Purchases
– Which model rowing machine was purchased?
• Basic, Designer, or Complete
– Which type of customer purchased it?
• Practical or Impulsive
Observed Counts
Practical Impulsive Total
Basic 22 25 47
Designer 13 88 101
Complete 54 19 73
Total 89 132 221
Slide
17-10
Tbl 17.3.2
Example (continued)
• Overall Percentages
– Divide each count by the overall total, 221
• e.g., 10.0% = 22/221 were practical customers who purchased
basic machines
• Note: impulsive customers bought most designer machines,
while practical customers bought most complete machines
Overall Percentages
Practical Impulsive Total
Basic 10.0% 11.3% 21.3%
Designer 5.9% 39.8% 45.7%
Complete 24.4% 8.6% 33.0%
Total 40.3% 59.7% 100.0%
Slide
17-11
Tbl 17.3.3
Example (continued)
• Percentages by Model
– Divide each count by the total for its model type
• e.g., 22/47 = 46.8% of the 47 basic machines were purchased
by practical customers
• Note: Practical customers make up 40.3% of all customers, but
represent 74.0% of complete-machine purchasers
Percentages by Model
Practical Impulsive Total
Basic 46.8% 53.2% 100.0%
Designer 12.9% 87.1% 100.0%
Complete 74.0% 26.0% 100.0%
Total 40.3% 59.7% 100.0%
Slide
17-12
Tbl 17.3.4
Example (continued)
• Percentages by Customer Type
– Divide each count by the total for its customer type
• e.g., 22/89 = 24.7% of the 89 practical customers purchased
basic machines
• Note: Of all machines, 33.0% are complete; looking only at
practical-customer purchases, 60.7% are complete
Percentages by Customer Type
Practical Impulsive Total
Basic 24.7% 18.9% 21.3%
Designer 14.6% 66.7% 45.7%
Complete 60.7% 14.4% 33.0%
Total 100.0% 100.0% 100.0%
Slide
17-13
Tbl 17.3.5
Example (continued)
• Expected Counts
– Multiply row total by column total, then divide by the
overall total of 221
• e.g., if there were no association between type of customer and
type of machine, we would have expected to find 8947/221 =
18.93 basic machines purchased by practical customers
Expected Counts
Practical Impulsive Total
Basic 18.93 28.07 47.00
Designer 40.67 60.33 101.00
Complete 29.40 43.60 73.00
Total 89.00 132.00 221.00
Slide
17-14 Example (continued)
• Chi-Squared Statistic (do not use the total row or column)
66.8
• Degrees of freedom
(Rows – 1)(Column – 1) = (3 – 1)(2 – 1) = 2
• Result
– If there were no association, such a large chi-squared
value would be highly unlikely