Last modified: February 26, 2024

This article is written in: πŸ‡ΊπŸ‡Έ

Chi-Square Distribution (Continuous)

A chi-square distribution is a continuous probability distribution of the sum of the squares of k independent standard normal random variables. The chi-square distribution is denoted as XβˆΌΟ‡2(k), where k is the number of degrees of freedom.

Probability Density Function (PDF)

The PDF of a chi-square distribution is given by:

f(x)={12k/2Ξ“(k2)xk2βˆ’1eβˆ’x2,if xβ‰₯00,if x<0

where Ξ“(β‹…) is the gamma function.

output(5)

Cumulative Distribution Function (CDF)

The CDF of a chi-square distribution is given by:

F(x)=Ξ³(k2,x2)Ξ“(k2)

where Ξ³(β‹…) is the lower incomplete gamma function and Ξ“(β‹…) is the gamma function.

output(6)

Expected Value and Variance

The expected value (mean) of a chi-square distribution is equal to the number of degrees of freedom:

E[X]=k

The variance of a chi-square distribution is given by:

Var(X)=2k

Moment Generating Functions and Moments

The moment generating function (MGF) of a chi-square distribution is:

MX(t)=E[etX]=(1βˆ’2t)βˆ’k2

To find the n-th moment, we take the n-th derivative of the MGF with respect to t and then evaluate it at t=0:

E[Xn]=dnMX(t)dtn|t=0

E[X]=k

E[X2]=k2+2k

Example: Goodness-of-Fit Test for a Fair Die

A researcher is testing the fairness of a six-sided die. The die is rolled 60 times, resulting in the following observed frequencies for each face:

Face of the Die Observed Frequency
1 8
2 9
3 13
4 7
5 12
6 11

To determine if the die is fair, the researcher employs a chi-square goodness-of-fit test.

Given:

The expected frequency for each face (assuming the die is fair): E = Total rolls / Number of faces = 60 / 6 = 10

The chi-square formula:

Ο‡2=βˆ‘(Oiβˆ’E)2E

where Oi is the observed frequency and E is the expected frequency.

I. Calculate the chi-square statistic:

Ο‡2=(8βˆ’10)210+(9βˆ’10)210+(13βˆ’10)210+(7βˆ’10)210+(12βˆ’10)210+(11βˆ’10)210=3.6

II. Determine the degrees of freedom:

Degrees of freedom for chi-square test: Number of categories - 1 = 6 - 1 = 5

Applications

Chi-square distributions are widely used in hypothesis testing (such as the chi-square test for independence), goodness-of-fit tests, and confidence interval estimation for the population variance in normally distributed data.

Table of Contents

    Chi-Square Distribution (Continuous)
    1. Probability Density Function (PDF)
    2. Cumulative Distribution Function (CDF)
    3. Expected Value and Variance
    4. Moment Generating Functions and Moments
    5. Example: Goodness-of-Fit Test for a Fair Die
    6. Applications