Chi-square distribution

    Understanding the Chi-Square Distribution

    The chi-square distribution (pronounced "kai-square") is a family of continuous probability distributions that arises in statistical inference, particularly when analyzing categorical data. It is primarily used for hypothesis tests concerning population variances, goodness-of-fit tests, tests of independence, and tests of homogeneity. Unlike the normal distribution or t-distribution, the chi-square distribution is right-skewed and takes on only non-negative values. Its shape is determined by a single parameter: the degrees of freedom (df).

    Degrees of Freedom (df)

    The degrees of freedom dictate the specific shape of a chi-square distribution. As the degrees of freedom increase, the chi-square distribution becomes less skewed and more closely approximates a normal distribution. For different chi-square tests, the calculation of degrees of freedom varies:

    • Goodness-of-Fit Test: df = (number of categories) - 1. This tests whether an observed distribution matches an expected distribution. For example, if you are testing if a die is fair across 6 faces, df = 6 - 1 = 5.
    • Test of Independence or Homogeneity: df = (number of rows - 1) * (number of columns - 1). These tests analyze relationships between two categorical variables in a two-way contingency table. If a table has 3 rows and 4 columns, df = (3-1) * (4-1) = 2 * 3 = 6.

    Characteristics of the Chi-Square Distribution

    The chi-square distribution possesses several key characteristics:

    • It is non-negative: The values of a chi-square random variable are always greater than or equal to zero. This makes sense as it's derived from squared differences.
    • It is right-skewed: For small degrees of freedom, the distribution is highly skewed to the right.
    • As df increases, the distribution becomes more symmetrical and bell-shaped, approaching a normal distribution.
    • The mean of a chi-square distribution is equal to its degrees of freedom (df).
    • The variance of a chi-square distribution is equal to 2 * df.

    When is a Chi-Square Distribution Used?

    The chi-square distribution is fundamental to several hypothesis tests for categorical data:

    • Chi-Square Goodness-of-Fit Test: Used to determine if a sample distribution matches a hypothesized population distribution. For instance, testing if the observed color distribution of M&Ms in a bag matches the manufacturer's stated proportions.
    • Chi-Square Test of Independence: Used to determine if there is an association between two categorical variables within a single population. For example, investigating if there is a relationship between political affiliation and opinion on a specific policy.
    • Chi-Square Test of Homogeneity: Used to determine if the distribution of a single categorical variable is the same across several different populations. For instance, comparing whether the proportion of students who prefer online learning is the same across three different high schools.

    In all these tests, the test statistic follows a chi-square distribution under the null hypothesis, allowing us to calculate a p-value to make a decision about the null hypothesis.

    Practice questions

    1

    What is the primary characteristic that determines the shape of a chi-square distribution?

    2

    Describe the skewness of a chi-square distribution with a small number of degrees of freedom.

    3

    How do you calculate the degrees of freedom for a chi-square test of independence for a 4x3 contingency table?

    4

    What is the smallest possible value a chi-square test statistic can take?

    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-distribution