Statistical Inference and Chi-Square Goodness-of-Fit Test

These notes provide a comprehensive overview of statistical inference, focusing specifically on the Chi-square Goodness-of-Fit test. It covers the test's purpose, hypothesis formulation, calculation of the chi-square statistic and degrees of freedom, interpretation of results, and key properties of the chi-square distribution.

Introduction to Statistical Inference: Statistical inference is a method that uses probability to draw conclusions about a population parameter based on a statistic obtained from a sample. This allows researchers to generalize findings from a smaller group to a larger population.

Chi-Square Goodness-of-Fit Test - Purpose and Variable Type: The chi-square test for goodness-of-fit is specifically used when analyzing data from a single categorical variable. Its primary purpose is to determine if the observed frequency distribution of this categorical variable significantly differs from a hypothesized or expected distribution. For example, it can test if customer arrivals are equally likely on each day of the week, or if seagull landing preferences match the environmental composition.

Hypotheses Formulation: For a goodness-of-fit test, the null hypothesis (H0) typically states that the population proportions for each category are equal to their respective hypothesized values (e.g., P1=P2=...=Pk=1/k for equal likelihood, or P_sand=0.56, P_mud=0.29, P_rocks=0.15 for a specified distribution). The alternative hypothesis (Ha) is generally that 'not all' population proportions are equal to their hypothesized values, meaning there is a significant difference in at least one category.

Calculating Expected Counts: Expected counts are crucial for the chi-square test. They represent the number of observations anticipated in each category if the null hypothesis were true. To calculate an expected count for a specific category, multiply the total sample size by the hypothesized population proportion for that category. For instance, if 200 seagulls were observed and 15% were expected to land on rocks, the expected count for rocks would be 200 * 0.15 = 30. Importantly, expected counts are theoretical and do not need to be whole numbers.

Degrees of Freedom (df): The degrees of freedom for a chi-square goodness-of-fit test are determined by the number of categories (k) minus one, i.e., df = k - 1. This value is essential for identifying the correct chi-square distribution to use for P-value calculation.

The Chi-Square Test Statistic: The chi-square test statistic (χ²) quantifies the discrepancy between the observed frequencies and the expected frequencies. Its formula is Σ [(Observed - Expected)^2 / Expected], summed across all categories. Each term in the sum represents a component of the chi-square statistic, indicating the contribution of each category's deviation. A larger component value signifies a greater relative deviation for that specific category. The test statistic itself is always a positive number.

Properties of the Chi-Square Distribution: The chi-square distribution possesses distinct characteristics: it is always positive, meaning χ² values are non-negative; it is right-skewed, with its peak shifting to the right as degrees of freedom increase; the total area under its curve is equal to 1 (or 100%); and it is not a single curve but rather a family of curves, with the specific shape determined by the degrees of freedom.

Interpreting the Chi-Square Statistic and P-value: A small chi-square statistic (close to zero) suggests that the observed counts are very similar to the expected counts, thereby supporting the null hypothesis. Conversely, a large chi-square statistic indicates a significant difference, providing evidence against the null hypothesis and in favor of the alternative. The P-value, derived from the chi-square statistic and degrees of freedom, represents the probability of observing such extreme results (or more extreme) if the null hypothesis were true. If the P-value is less than the chosen significance level (alpha), the null hypothesis is rejected.

Drawing Conclusions in Hypothesis Testing: When the null hypothesis is rejected (P-value < alpha), the conclusion is that there is sufficient evidence to support the alternative hypothesis. For example, if testing seagull preference, rejecting H0 would mean there is enough evidence that seagulls do have a preference for where they land, implying the landing distribution is inconsistent with the shore composition. Conversely, if H0 is not rejected (P-value ≥ alpha), the conclusion is that there is not enough evidence to support the alternative hypothesis. It's crucial to state conclusions in terms of the alternative hypothesis; we do not 'accept' the null hypothesis, only 'fail to reject' it.

Key points

  • Statistical inference uses probability to draw conclusions about population parameters based on sample statistics.
  • The Chi-square Goodness-of-Fit test is used for one single categorical variable to determine if observed frequencies match an expected distribution.
  • The null hypothesis (H0) posits that the observed distribution is consistent with the expected distribution (e.g., specified proportions or equal likelihood).
  • The alternative hypothesis (Ha) states that the observed distribution is inconsistent with the expected distribution (at least one category's proportion differs).
  • Degrees of freedom (df) for the goodness-of-fit test are calculated as `k - 1`, where `k` is the number of categories.
  • The chi-square test statistic is calculated as the sum of `[(Observed - Expected)^2 / Expected]` for all categories.
  • Expected counts are hypothetical values derived from the null hypothesis and total sample size; they do not have to be whole numbers.
  • A larger chi-square test statistic indicates greater deviation between observed and expected counts, providing stronger evidence against the null hypothesis.
  • The chi-square distribution is always positive, right-skewed, and its shape varies depending on the degrees of freedom.
  • A P-value less than the chosen significance level leads to the rejection of the null hypothesis, supporting the alternative hypothesis.

Browse public study notes