Chi-Square Distribution: Degrees of Freedom & Gamma

Explore the Chi-Square (χ²) distribution as a special Gamma case. Understand its role in statistical tests like goodness-of-fit, independence, and variance, crucial for ML & AI.

17.7 Special Case 2: Chi-Square Distribution with Degrees of Freedom

The Chi-Square ($\chi^2$) distribution is a fundamental probability distribution in statistics, frequently employed in hypothesis testing for goodness-of-fit, independence, and variance estimation. It is notably a special case of the Gamma distribution.

Chi-Square as a Gamma Distribution

The Chi-Square distribution can be derived from the Gamma distribution by applying specific parameter substitutions.

Parameter Substitutions

For a Gamma distribution with shape parameter $\alpha$ and rate parameter $\lambda$, the Chi-Square distribution with $\nu$ degrees of freedom is obtained when:

  • Shape parameter $\alpha$ = $\nu / 2$
  • Rate parameter $\lambda$ = $1 / 2$

Where:

  • $\nu$ is the degrees of freedom, which must be a positive integer.

Probability Density Function (PDF)

The probability density function (PDF) for a Chi-Square distribution with $\nu$ degrees of freedom is given by:

$$f(x; \nu) = \frac{1}{2^{\nu/2} \Gamma(\nu/2)} x^{(\nu/2) - 1} e^{-x/2}$$

For $x > 0$.

Where:

  • $\Gamma(\nu/2)$ is the Gamma function evaluated at $\nu / 2$. The Gamma function, for a positive real number $z$, is defined as $\Gamma(z) = \int_{0}^{\infty} t^{z-1} e^{-t} dt$. For integer values $n$, $\Gamma(n) = (n-1)!$.

Mean and Variance

The mean and variance of a Chi-Square distribution are directly related to its degrees of freedom:

  • Mean ($\mu$) = $\nu$
  • Variance ($\sigma^2$) = $2\nu$

These formulas reveal that the mean of the Chi-Square distribution increases linearly with the degrees of freedom, while the variance increases at twice that rate.

Special Case: $\nu = 2$

A notable special case occurs when the degrees of freedom $\nu = 2$. In this scenario, the Chi-Square distribution with 2 degrees of freedom is equivalent to an exponential distribution with a mean of 2. This connection highlights the relationship between the exponential and Chi-Square distributions within the broader Gamma family.

Summary of Key Formulas

  • Probability Density Function (PDF): $$f(x; \nu) = \frac{1}{2^{\nu/2} \Gamma(\nu/2)} x^{(\nu/2) - 1} e^{-x/2}, \quad x > 0$$
  • Mean ($\mu$): $$\mu = \nu$$
  • Variance ($\sigma^2$): $$\sigma^2 = 2\nu$$

Applications

The Chi-Square distribution is extensively used in various statistical tests, including:

  • Goodness-of-Fit Tests: To determine if observed data fits an expected theoretical distribution.
  • Tests for Independence: To assess whether two categorical variables are independent.
  • Tests for Variance: To test hypotheses about the variance of a normally distributed population.

Interview Questions

Here are some common interview questions related to the Chi-Square distribution:

  1. How is the Chi-Square distribution a special case of the Gamma distribution?
    • Answer: It's a special case due to specific parameter substitutions: $\alpha = \nu/2$ and $\lambda = 1/2$ in the Gamma distribution.
  2. What are the parameter substitutions used to derive Chi-Square from Gamma?
    • Answer: Shape parameter $\alpha = \nu/2$ and rate parameter $\lambda = 1/2$.
  3. Explain the probability density function (PDF) of the Chi-Square distribution.
    • Answer: The PDF $f(x; \nu)$ describes the likelihood of observing a particular value $x$ given $\nu$ degrees of freedom. It involves powers of $x$ and $e^{-x/2}$, scaled by constants derived from $\nu$ and the Gamma function.
  4. What is the role of the Gamma function in the Chi-Square distribution?
    • Answer: The Gamma function $\Gamma(\nu/2)$ serves as a normalization constant in the PDF, ensuring that the total probability integrates to 1.
  5. How do the mean and variance of the Chi-Square distribution relate to degrees of freedom?
    • Answer: The mean is equal to the degrees of freedom ($\mu = \nu$), and the variance is twice the degrees of freedom ($\sigma^2 = 2\nu$).
  6. Why does the variance of a Chi-Square distribution equal $2\nu$?
    • Answer: This arises from the derivation of the Chi-Square distribution from the Gamma distribution and the properties of the Gamma function and its derivatives.
  7. What happens when the degrees of freedom $\nu = 2$ in a Chi-Square distribution?
    • Answer: It becomes equivalent to an exponential distribution with a mean of 2.
  8. How does the Chi-Square distribution relate to the exponential distribution?
    • Answer: The Chi-Square distribution with 2 degrees of freedom is a special case of the exponential distribution.
  9. In what real-world scenarios is the Chi-Square distribution commonly used?
    • Answer: In testing the fit of data to a model, examining relationships between categorical variables, and analyzing variances in quality control or scientific experiments.
  10. How does the shape of the Chi-Square distribution change with increasing degrees of freedom?
    • Answer: For small $\nu$, the distribution is skewed to the right. As $\nu$ increases, the distribution becomes more symmetric and bell-shaped, approaching a normal distribution for very large $\nu$.

SEO Keywords

Chi-square gamma distribution, Chi-square PDF formula, Chi-square degrees of freedom, Gamma to chi-square derivation, Chi-square distribution mean, Chi-square distribution variance, Chi-square exponential link, Chi-square distribution explained, Chi-square vs gamma distribution, Chi-square applications statistics.