If have normal independent distributions with mean 0 and variance 1, then
| (1) |
is distributed as with
degrees of freedom. This makes a
distribution a gamma distribution with
and
, where
is the number of degrees of freedom.
More generally, if are independently distributed according to a
distribution with
,
, ...,
degrees of freedom, then
| (2) |
is distributed according to with
degrees of freedom.
The probability density function for the distribution with
degrees of freedom is given by
| (3) |
for , where
is a gamma function. The cumulative distribution function is then
| (4) | |||
| (5) | |||
| (6) | |||
| (7) |
where is an incomplete gamma function and
is a regularized gamma function.
The chi-squared distribution is implemented in the Wolfram Language as ChiSquareDistribution[n].
For ,
is monotonic decreasing, but for
, it has a maximum at
| (8) |
where
| (9) |
The th raw moment for a distribution with
degrees of freedom is
| (10) | |||
| (11) |
giving the first few as
| (12) | |||
| (13) | |||
| (14) | |||
| (15) |
The th central moment is given by
| (16) |
where is a confluent hypergeometric function of the second kind, giving the first few as
| (17) | |||
| (18) | |||
| (19) | |||
| (20) |
The cumulants can be found via the characteristic function
| (21) | |||
| (22) |
Taking the natural logarithm of both sides gives
| (23) |
But this is simply a Mercator series
| (24) |
with , so from the definition of cumulants, it follows that
| (25) |
giving the result
| (26) |
The first few are therefore
| (27) | |||
| (28) | |||
| (29) | |||
| (30) |
The moment-generating function of the distribution is
| (31) | |||
| (32) | |||
| (33) | |||
| (34) | |||
| (35) |
so
| (36) | |||
| (37) | |||
| (38) | |||
| (39) | |||
| (40) | |||
| (41) |
If the mean is not equal to zero, a more general distribution known as the noncentral chi-squared distribution results. In particular, if are independent variates with a normal distribution having means
and variances
for
, ...,
, then
| (42) |
obeys a gamma distribution with , i.e.,
| (43) |
where .