Chi-Squared Hypothesis Test for Independence Study Notes
Chi-Squared Hypothesis Test for Independence
Overview of the Chi-Squared Test
Objective: To determine whether populations classified by two categorical variables are independent or dependent.
Example: Analyzing if a preference for horror movies is dependent upon gender (Do men like horror movies more than women?).
Hypothesis Definitions
Null Hypothesis (H₀): States that there is no dependency between the two variables (they are independent).
Alternative Hypothesis (H₁ or Hₐ): Indicates that there is a dependency between the two variables.
Test Procedure
Data Collection: Use a contingency table to display observed values.
Example: Asking individuals about their preferred movie genre categorized by gender.
Observed Values: Values filling the contingency table based on survey results or experimental data.
Contingency Table Setup: Involves counting responses across categories (e.g., gender vs. movie preference).
Observed Table Names: Can be referred to as the "observed table" or simply as the "table".
Setting Up the Table:
Ensure to format the table properly by avoiding counts of totals while determining row and column sizes.
Calculate each count based solely on response categories.
Finding the Expected Values (E):
The expected value for each cell in the table is calculated using:
Calculation Steps
Completing the Expected Values Matrix: Fill in the expected value for each category in the table based on the previously defined formula.
Test Statistic Calculation: The chi-squared statistic () is computed via: Where:
$O$: Observed values in the contingency table.
$E$: Expected values from the contingency table.
$\sum$: Summation across all cell values in the table.
Decision Rule
Comparative Analysis: Compare the calculated chi-squared statistic () to the critical value obtained from the chi-squared distribution table.
Rejection Criteria: Reject the null hypothesis (H₀) if the computed statistic is greater than the critical value from the chi-squared distribution table, determined using:
Significance Level (α): Commonly set at 0.05 or 0.01, which indicates the probability of rejecting the null hypothesis incorrectly.
Degrees of Freedom: Calculated as $(\text{number of rows} - 1 \cdot \text{number of columns} - 1)$.
Practical Application Examples
Political Affiliation Study: Examining whether gender distribution among political parties (Republican, Democrat, etc.) is independent or dependent.
Health Studies: Assessing if there's a correlation between pet ownership and allergies (surveying if pet owners have allergies vs. non-owners).
Procedure for Use of Calculator (TI-84 or similar)
Data Input: Enter observed values into the calculator's matrix function (use Matrix A).
Statistical Tests: Access the stats menu, select the appropriate chi-squared test, and perform calculations, which display results for , p-value, and degrees of freedom.
Results Interpretation: Evaluate p-value for significance in relation to α level. If p < α, reject the null hypothesis.
Summary of Key Formulas
Expected Value Formula:
Chi-Squared Statistic Formula:
Critical Value Determination:
Using alpha (α) level and degrees of freedom from appropriate statistical tables.
Classroom Engagement and Examples
Perform group simulations to apply theoretical understanding in practical scenarios, aiding retention and clarifying methodology.
Utilize calculators collaboratively to carry out chi-squared tests, fostering discussion and comprehension.