is distributed according to the noncentral chi-square distribution. The noncentral chi-square distribution has two parameters: k which specifies the number of degrees of freedom (i.e. the number of Xi), and λ which is related to the mean of the random variables Xi by:
Note that some references define λ as one half of the above sum.
where Yq is distributed as chi-square with q degrees of freedom.
From this representation, the noncentral chi-squared distribution is seen to be a Poisson-weighted mixture of central chi-squared distributions. Suppose that a random variable J has a Poisson distribution with mean λ / 2, and the conditional distribution of Z given J = j is chi-squared with k+2i degrees of freedom. Then the unconditional distribution of Z is non-central chi-squared with k degrees of freedom, and non-centrality parameter λ.
Alternatively, the pdf can be written as
where Iν(z) is a modified Bessel function of the first kind given by
The derivation of the probability density function is most easily done by performing the following steps:
First, assume without loss of generality that . Then the joint distribution of is spherically symmetric, up to a location shift.
The spherical symmetry then implies that the distribution of depends on the means only through the squared length, . Without loss of generality, we can therefore take and .
Now derive the density of (i.e. k=1 case). Simple transformation of random variables shows that :
where is the standard normal density.
Expand the cosh term in a Taylor series. This gives the Poisson-weighted mixture representation of the density, still for k=1. The indices on the chi-squared random variables in the series above are 1+2i in this case.
Finally, for the general case. We've assumed, wlog, that are standard normal, and so has a central chi-squared distribution with (k-1) degrees of freedom, independent of . Using the poisson-weighted mixture representation for , and the fact that the sum of chi-squared random variables is also chi-squared, completes the result. The indices in the series are (1+2i)+(k-1) = k+2i as required.
Related distributions
If V is chi-square distributed then V is also non-central chi-square distributed:
Many statistical software packages and libraries include functions for computing noncentral chisquare densities and probabilities. The table below gives commands for the following example problems:
Density fX(x;k,λ) with x=5.0, k=3, λ = 1.5
Cumulative probability P(x;k,λ) with x=5.0, k=3, λ = 1.5
Quantile: Find x in P(x;k,λ) = q with k=3, λ = 1.5, q=0.5
Critical noncentral parameter: Find λ in P(x;k,λ) = q with x=5.0,k=3, and q=0.5
Random numbers: Generate 100 random observations from the distribution with k=3, λ=1.5
Note: Any software that produces the answers 0.101384, 0.490071, 5.09848 for the first three problems is including a factor of 0.5 in the definition of the noncentrality parameter. This is standard in statistics texts (e.g. 2), but apparently not among programmers who don't read before writing their code.