Chi-Square Tests: Theory, Formulas, and Applications
Introduction to Chi-Square Tests
Chi-square tests are designed to test hypotheses regarding patterns of outcomes based on frequency counts for categorical random variables.
The chapter covers two primary types of chi-square tests:
Goodness of Fit Test: This is used to assess how closely the distribution of a single categorical variable matches a specific expected distribution.
Example: Determining if the model for student transportation methods (drive, bike, walk, other) has changed from 5 years ago.
Test of Independence: This is used to assess whether two categorical variables are independent of one another or if an association exists between them.
Example: Investigating if there is an association between gender and smoking habits.
Properties of the Chi-Square Distribution
The Chi-Square distribution is not a single distribution but a family of distributions, with a unique curve for each degree of freedom.
It possesses only one parameter: the degrees of freedom ().
The distribution is non-symmetrical and skewed to the right ( is a skewed distribution).
As the degrees of freedom () increase, the distribution becomes more symmetrical.
The distribution assumes non-negative values only (it starts at zero and extends to positive infinity).
The total area under the curve is always equal to .
Calculation of the Test Statistic
The test statistic can be computed using two equivalent formulas:
Definitions of variables used in the formulas:
= observed frequency
= expected frequency
= sample size
Rejection Region and Decision Rules
For chi-square tests, the rejection region lies exclusively on the right side of the distribution curve.
The area of this rejection region is equal to the level of significance (Alpha, ).
Rejection Rule: If the calculated test statistic () lies in the rejection region, reject the null hypothesis () in favor of the alternative hypothesis ().
Formal condition: Reject if .
Goodness-of-Fit Test: Example 1 (Age Distribution of Arrests)
Scenario: A sample of people arrested for drunk driving was categorized by age.
Data Table:
Age 16-20: 25 arrests
Age 21-25: 32 arrests
Age 26-30: 19 arrests
Age 31-35: 16 arrests
Age 36-40: 8 arrests
Hypotheses:
: The proportion of people arrested for drunk driving is the same for all age groups.
: The proportion is not the same for all age groups.
Calculation Details:
Total sample size .
Expected frequency () for each of the 5 groups if the proportion is the same: .
Calculation of :
Group 1:
Group 2:
Group 3:
Group 4:
Group 5:
Total Sum:
Test Statistic:
Critical Value and Conclusion:
Level of significance .
Degrees of freedom (where is the number of categories).
Critical value .
Decision: Since , reject .
Conclusion: There is insufficient evidence to conclude that the proportion of drunk drivers is the same for all age groups.
Goodness-of-Fit Test: Example 2 (Bokomo Cereal Sales)
Scenario: Bokomo breakfast cereal sells in three sizes: Large, Medium, and Small. The national sales ratio is . Sales in the Limpopo region are tracked to see if they match the national pattern.
Limpopo Observed Sales (O): Large = 190, Medium = 250, Small = 100. Total cases () = 540.
Hypotheses:
: The Limpopo region’s pattern of sales is the same as the national sales pattern.
: The Limpopo region’s pattern of sales is not the same as the national sales pattern.
Calculations:
National ratio total: parts.
Expected frequencies ():
Large:
Medium:
Small:
Calculation of :
Large:
Medium:
Small:
Total
Test Statistic:
Critical Value and Conclusion:
Level of significance .
Degrees of freedom .
Critical value .
Decision: Since , reject .
Conclusion: There is insufficient evidence to conclude that the Limpopo region’s pattern of sales is the same as the national sales pattern.
Test of Independence
This test determines association or dependence between two variables arranged in a contingency table.
Expected Frequency Formula: For each cell in the table, the expected frequency is calculated as:
Degrees of Freedom: For a contingency table, the degrees of freedom are determined by:
, where is the number of rows and is the number of columns.
Test of Independence: Example (Gender and TV Watching)
Scenario: A sample of adults is classified by gender and weekly television watching time.
Observed Data ():
Male: 27 (Under 25 hours), 15 (Over 25 hours). Total males = 42.
Female: 19 (Under 25 hours), 29 (Over 25 hours). Total females = 48.
Row totals: Under 25 hours = 46; Over 25 hours = 44. Grand total () = 90.
Hypotheses:
: Gender and time spent watching TV are independent.
: Gender and time spent watching TV are dependent.
Calculated Expected Frequencies ():
Cell 1 (Male/Under 25):
Cell 2 (Female/Under 25):
Cell 3 (Male/Over 25):
Cell 4 (Female/Over 25):
Calculated Values for :
Cell 1:
Cell 2:
Cell 3:
Cell 4:
Total
Test Statistic:
Critical Value and Conclusion:
Level of significance .
Degrees of freedom .
Critical value .
Decision: Since (Note: The transcript calculates 5.46 but cites 5.64 in the decision summary), the test statistic does not lie in the rejection region. Do not reject .
Conclusion: There is insufficient evidence to conclude that the time spent watching TV is dependent on gender.