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

  1. Data Collection: Use a contingency table to display observed values.

    • Example: Asking individuals about their preferred movie genre categorized by gender.

  2. 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".

  3. 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.

  4. Finding the Expected Values (E):

    • The expected value for each cell in the table is calculated using:
      E=(Row Total)×(Column Total)Sample SizeE = \frac{(\text{Row Total}) \times (\text{Column Total})}{\text{Sample Size}}

Calculation Steps

  1. Completing the Expected Values Matrix: Fill in the expected value for each category in the table based on the previously defined formula.

  2. Test Statistic Calculation: The chi-squared statistic (χ2\chi^2) is computed via: χ2=(OE)2E\chi^2 = \sum \frac{(O - E)^2}{E} 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 (χ2\chi^2) to the critical value obtained from the chi-squared distribution table.

  • Rejection Criteria: Reject the null hypothesis (H₀) if the computed χ2\chi^2 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)

  1. Data Input: Enter observed values into the calculator's matrix function (use Matrix A).

  2. Statistical Tests: Access the stats menu, select the appropriate chi-squared test, and perform calculations, which display results for χ2\chi^2, p-value, and degrees of freedom.

  3. Results Interpretation: Evaluate p-value for significance in relation to α level. If p < α, reject the null hypothesis.

Summary of Key Formulas

  • Expected Value Formula:
    E=(Row Total)×(Column Total)Sample SizeE = \frac{(\text{Row Total}) \times (\text{Column Total})}{\text{Sample Size}}

  • Chi-Squared Statistic Formula:
    χ2=(OE)2E\chi^2 = \sum \frac{(O - E)^2}{E}

  • 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.