Chi-Square Distribution¶
Chi-Square Distribution¶
If \(Z_{1}, Z_{2}, \ldots, Z_{n}\) are \(n\) independent standard normal variables, then the random variable \(X\)
i.e., \(X\) follows the chi-square distribution with \(n\) degrees of freedom.
If we add two chi-square distributed variables with degrees of freedom \(n_{1}\) and \(n_{2}\), then the resultant variable itself is chi-square distributed with \(n_{1} + n_{2}\) degrees of freedom. This simply follows from the fact that the sum of the two random variables is nothing but sum of \(n_{1} + n_{2}\) standard normal squared variables which is nothing but a chi-square variable with \(n_{1} + n_{2}\) degrees of freedom.
If \(X \sim \chi_{n}^{2}\), then \(\chi_{\alpha, n}^{2}\) is
This quantity is usually listed in mathematical tables since they are heavily used in hypothesis testing.
Relation between Chi-Square and Gamma Distribution¶
Consider the moment generating function for a chi-square random variable with \(n=1\) degrees of freedom
Extending this idea to the case of \(n\) degrees of freedom,
But, the quantity just derived is nothing but the moment generating function of the Gamma distribution with parameters \((n/2, 1/2)\). Hence, by the uniqueness of the moment generating function, we are forced to conclude that the probability density function of a chi-square variable with n degrees is same as that of a Gamma distribution with parameters (n/2, 1/2).
Thus,
Sum of Exponentially Distributed Random Variables to Chi-Square Distribution¶
We say that a Gamma distributed random variable with \(\lambda = 1/2\) and \(\alpha\) can be considered equivalent to a \(\chi^{2}\_{2\alpha}\) variable. Here, \(\lambda\) is constrained to be \(1/2\). By transforming the variables appropriately, we can extend the idea to a sum of exponentially distributed random variables.
Consider \(n\) independent and identically exponentially distributed random variables \(X_{i}\) with parameter \(\lambda\). Consider for any of those random variables \(X_{i}\),
i.e., \(2\lambda Exp(\lambda) \sim Exp(\frac{1}{2})\). Now, consider the sum of these transformed random variables
Hence, we can convert the sum of \(n\) exponentially distributed random variables with parameter \(\lambda\), to a \(\chi^{2}\_{n}\) variable by multiplying the individual variables by \(2\lambda\).
Mean and Variance¶
Since the distribution of a chi-square variable is identical to a \(Gamma(n/2, 1/2)\) distribution,
Sum of \(\chi^{2}\) Variables¶
Sum of \(n\) independent \(\chi^{2}\) variables where \(X_{i} \sim \chi^{2}\_{r_{i}}\) has a \(\chi^{2}\) distribution as well.
which follows from the fact that each \(\chi^{2}\) variable is a sum of independent standard normals, and sum of \(\chi^{2}\) variables will itself be a sum of even more independent standard normals.