Chi-square test statistic formula

    Understanding the Chi-Square Test Statistic Formula

    The chi-square (ἆ2) test statistic is a fundamental component of various hypothesis tests for categorical data in AP Statistics. It quantifies the discrepancy between observed frequencies and frequencies that would be expected if the null hypothesis were true. A larger chi-square test statistic indicates a greater difference between what was observed and what was expected, making the null hypothesis less plausible.

    The General Formula

    The formula for the chi-square test statistic is given by:

    ἆ2 = ∑ (Observed - Expected)2⁄Expected

    • ∑ (Sigma) denotes the sum across all categories or cells in a contingency table.
    • Observed (O) represents the actual count in each category from the sample data.
    • Expected (E) represents the count that would be anticipated in each category if the null hypothesis were true. These are the counts we would expect under conditions of no association (for a test of independence), specified proportions (for a goodness-of-fit test), or homogeneity (for a test of homogeneity).

    Calculating Expected Counts

    The method for calculating expected counts varies slightly depending on the specific chi-square test being performed:

    • For a Chi-Square Test of Goodness-of-Fit:

      Expected Count = (Total Sample Size) × (Hypothesized Proportion for that Category)

      For example, if testing if a die is fair with 60 rolls, the expected count for each face (1-6) would be 60 × (1/6) = 10.

    • For a Chi-Square Test of Independence or Homogeneity:

      Expected Count = (Row Total) × (Column Total)⁄Grand Total

      This formula applies when analyzing a two-way contingency table. The 'Row Total' is the sum of observations in that specific row, the 'Column Total' is the sum of observations in that specific column, and the 'Grand Total' is the total number of observations in the entire table.

    Interpretation of the Components

    • (Observed - Expected): This term quantifies the difference between what was seen and what was expected. A value of zero means perfect agreement.
    • (Observed - Expected)2: Squaring this difference ensures that all contributions to the chi-square statistic are positive, regardless of whether the observed count was higher or lower than the expected count. It also penalizes larger deviations more heavily.
    • (Observed - Expected)2⁄Expected: Dividing by the expected count normalizes the contribution of each cell. This is crucial because a difference of 5 is much more significant if the expected count was 10 (a 50% deviation) than if the expected count was 1000 (a 0.5% deviation).

    The sum of these contributions across all categories yields the final chi-square test statistic. This statistic is then compared to a chi-square distribution with appropriate degrees of freedom to calculate a p-value, which informs the decision to reject or fail to reject the null hypothesis.

    Practice questions

    1

    What does the 'Observed' value represent in the chi-square test statistic formula?

    2

    Why is the difference between observed and expected counts squared in the chi-square formula?

    3

    How is the expected count calculated for a chi-square test of independence in a contingency table?

    4

    What is the effect of dividing (Observed - Expected)^2 by the 'Expected' value in the chi-square formula?

    Practice more free →

    Free AP4U account — unlimited practice, AI grader, and progress tracking.

    Canonical: https://apforu.com/ap/statistics/unit-8-inference-for-categorical-data-chi-square/chi-square-test-statistic-formula