Noncentral chi-squared distribution

In probability theory and statistics, the noncentral chi-squared distribution (or noncentral chi-square distribution, noncentral $$\chi^2$$ distribution) is a noncentral generalization of the chi-squared distribution. It often arises in the power analysis of statistical tests in which the null distribution is (perhaps asymptotically) a chi-squared distribution; important examples of such tests are the likelihood-ratio tests.

Background
Let $$(X_1,X_2, \ldots, X_i, \ldots,X_k)$$ be k independent, normally distributed random variables with means $$\mu_i$$ and unit variances. Then the random variable


 * $$\sum_{i=1}^k X_i^2$$

is distributed according to the noncentral chi-squared distribution. It has two parameters: $$k$$ which specifies the number of degrees of freedom (i.e. the number of $$X_i$$), and $$\lambda$$ which is related to the mean of the random variables $$X_i$$ by:


 * $$\lambda=\sum_{i=1}^k \mu_i^2.$$

$$\lambda$$ is sometimes called the noncentrality parameter. Note that some references define $$\lambda$$ in other ways, such as half of the above sum, or its square root.

This distribution arises in multivariate statistics as a derivative of the multivariate normal distribution. While the central chi-squared distribution is the squared norm of a random vector with $$N(0_k,I_k)$$ distribution (i.e., the squared distance from the origin to a point taken at random from that distribution), the non-central $$\chi^2$$ is the squared norm of a random vector with $$N(\mu,I_k)$$ distribution. Here $$0_k$$ is a zero vector of length k, $$\mu = (\mu_1, \ldots, \mu_k)$$ and $$I_k$$ is the identity matrix of size k.

Density
The probability density function (pdf) is given by

f_X(x; k,\lambda) = \sum_{i=0}^\infty \frac{e^{-\lambda/2} (\lambda/2)^i}{i!} f_{Y_{k+2i}}(x), $$ where $$Y_q$$ is distributed as chi-squared 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 $$\lambda/2$$, and the conditional distribution of Z given J = i 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 $$\lambda$$.

Alternatively, the pdf can be written as
 * $$f_X(x;k,\lambda)=\frac 1 2 e^{-(x+\lambda)/2} \left (\frac x \lambda \right)^{k/4-1/2} I_{k/2-1}(\sqrt{\lambda x})$$

where $$I_\nu(y)$$ is a modified Bessel function of the first kind given by


 * $$ I_\nu(y) = (y/2)^\nu \sum_{j=0}^\infty \frac{ (y^2/4)^j}{j! \Gamma(\nu+j+1)}. $$

Using the relation between Bessel functions and hypergeometric functions, the pdf can also be written as:


 * $$f_X(x;k,\lambda)={{\rm e}^{-\lambda/2}} _0F_1(k/2;\lambda x/4)\frac 1 {2^{k/2} \Gamma(k/2)} {\rm e}^{-x/2} x^{k/2-1}.$$

The case k = 0 (zero degrees of freedom), in which case the distribution has a discrete component at zero, is discussed by Torgersen (1972) and further by Siegel (1979).

Derivation of the pdf
The derivation of the probability density function is most easily done by performing the following steps:


 * 1) Since $$X_1,\ldots,X_k$$ have unit variances, their joint distribution is spherically symmetric, up to a location shift.
 * 2) The spherical symmetry then implies that the distribution of $$X=X_1^2+\cdots+X_k^2$$ depends on the means only through the squared length, $$\lambda=\mu_1^2+\cdots+\mu_k^2$$. Without loss of generality, we can therefore take $$\mu_1=\sqrt{\lambda}$$ and $$\mu_2=\cdots=\mu_k=0$$.
 * 3) Now derive the density of $$X=X_1^2$$ (i.e. the k = 1 case). Simple transformation of random variables shows that
 * $$\begin{align}f_X(x,1,\lambda) &= \frac{1}{2\sqrt{x}}\left( \phi(\sqrt{x}-\sqrt{\lambda}) + \phi(\sqrt{x}+\sqrt{\lambda}) \right )\\ &= \frac{1}{\sqrt{2\pi x}} e^{-(x+\lambda)/2} \cosh(\sqrt{\lambda x}), \end{align}$$
 * where $$\phi(\cdot)$$ is the standard normal density.


 * 1) 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.
 * 2) Finally, for the general case. We've assumed, without loss of generality, that $$X_2,\ldots,X_k$$ are standard normal, and so $$X_2^2+\cdots+X_k^2$$ has a central chi-squared distribution with (k − 1) degrees of freedom, independent of $$X_1^2$$. Using the poisson-weighted mixture representation for $$X_1^2$$, and the fact that the sum of chi-squared random variables is also a chi-square, completes the result. The indices in the series are (1 + 2i) + (k − 1) = k + 2i as required.

Moment generating function
The moment-generating function is given by


 * $$M(t;k,\lambda)=\frac{\exp\left(\frac{ \lambda t}{1-2t }\right)}{(1-2 t)^{k/2}}.$$

Moments
The first few raw moments are:


 * $$\mu'_1=k+\lambda$$
 * $$\mu'_2=(k+\lambda)^2 + 2(k + 2\lambda) $$
 * $$\mu'_3=(k+\lambda)^3 + 6(k+\lambda)(k+2\lambda)+8(k+3\lambda)$$
 * $$\mu'_4=(k+\lambda)^4+12(k+\lambda)^2(k+2\lambda)+4(11k^2+44k\lambda+36\lambda^2)+48(k+4\lambda).$$

The first few central moments are:


 * $$\mu_2=2(k+2\lambda)\,$$
 * $$\mu_3=8(k+3\lambda)\,$$
 * $$\mu_4=12(k+2\lambda)^2+48(k+4\lambda)\,$$

The nth cumulant is


 * $$\kappa_n=2^{n-1}(n-1)!(k+n\lambda).\,$$

Hence
 * $$\mu'_n = 2^{n-1}(n-1)!(k+n\lambda)+\sum_{j=1}^{n-1} \frac{(n-1)!2^{j-1}}{(n-j)!}(k+j\lambda )\mu'_{n-j}. $$

Cumulative distribution function
Again using the relation between the central and noncentral chi-squared distributions, the cumulative distribution function (cdf) can be written as


 * $$P(x; k, \lambda ) = e^{-\lambda/2}\; \sum_{j=0}^\infty \frac{(\lambda/2)^j}{j!} Q(x; k+2j)$$

where $$Q(x; k)\,$$ is the cumulative distribution function of the central chi-squared distribution with k degrees of freedom which is given by


 * $$Q(x;k)=\frac{\gamma(k/2,x/2)}{\Gamma(k/2)}\,$$


 * and where $$\gamma(k,z)\,$$ is the lower incomplete gamma function.

The Marcum Q-function $$Q_M(a,b)$$ can also be used to represent the cdf.


 * $$P(x; k, \lambda) = 1 - Q_{\frac{k}{2}} \left( \sqrt{\lambda}, \sqrt{x} \right)$$

When the degrees of freedom k is positive odd integer, we have a closed form expression for the complementary cumulative distribution function given by



\begin{align} P(x; 2n+1, \lambda) &= 1 - Q_{n+1/2}(\sqrt{\lambda}, \sqrt{x}) \\ &= 1 - \left[ Q(\sqrt{x}-\sqrt{\lambda}) + Q(\sqrt{x}+\sqrt{\lambda}) + e^{-(x + \lambda)/2} \sum_{m=1}^n \left(\frac{x}{\lambda}\right)^{m/2-1/4} I_{m-1/2}(\sqrt{\lambda x}) \right], \end{align} $$

where n is non-negative integer, Q is the Gaussian Q-function, and I is the modified Bessel function of first kind with half-integer order. The modified Bessel function of first kind with half-integer order in itself can be represented as a finite sum in terms of hyperbolic functions.

In particular, for k = 1, we have


 * $$P(x; 1, \lambda) = 1 - \left[ Q(\sqrt{x}-\sqrt{\lambda}) + Q(\sqrt{x}+\sqrt{\lambda}) \right].$$

Also, for k = 3, we have


 * $$P(x; 3, \lambda) = 1 - \left[ Q(\sqrt{x}-\sqrt{\lambda}) + Q(\sqrt{x}+\sqrt{\lambda}) + \sqrt{\frac{2}{\pi}} \frac{\sinh (\sqrt{\lambda x})}{\sqrt{\lambda}} e^{-(x+\lambda)/2} \right].$$

Approximation (including for quantiles)
Abdel-Aty derives (as "first approx.") a non-central Wilson–Hilferty transformation:

$$ \left(\frac{\chi'^2}{k+\lambda}\right)^{\frac 1 3}$$ is approximately normally distributed, $$\sim \mathcal{N}\left(1-\frac{2}{9f}, \frac{2}{9f} \right),$$ i.e.,


 * $$ P(x; k, \lambda )\approx \Phi \left\{ \frac{\left(\frac{x}{k+\lambda}\right)^{1/3} - \left(1 - \frac{2}{9f}\right) } {\sqrt{\frac{2}{9f}}  } \right\}, \text{where } \ f := \frac{(k+\lambda)^2}{k+2\lambda} = k + \frac{\lambda^2}{k+2\lambda},$$

which is quite accurate and well adapting to the noncentrality. Also, $$f = f(k,\lambda)$$ becomes $$f = k$$ for $$\lambda=0$$, the (central) chi-squared case.

Sankaran discusses a number of closed form approximations for the cumulative distribution function. In an earlier paper, he derived and states the following approximation:


 * $$ P(x; k, \lambda ) \approx \Phi \left\{ \frac{(\frac{x} {k + \lambda}) ^ h - (1 + h  p  (h - 1 - 0.5 (2 - h)  m  p))}  {h \sqrt{2p}  (1 + 0.5 m  p)} \right\}  $$

where
 * $$ \Phi \lbrace \cdot \rbrace \, $$ denotes the cumulative distribution function of the standard normal distribution;
 * $$ h = 1 - \frac{2}{3} \frac{(k+ \lambda) (k+ 3  \lambda)}{(k+ 2  \lambda) ^ 2} \, ;$$
 * $$ p = \frac{k+ 2 \lambda}{(k+ \lambda) ^ 2} ;$$
 * $$ m = (h - 1) (1 - 3  h) \, .$$

This and other approximations are discussed in a later text book.

More recently, since the CDF of non-central chi-squared distribution with odd degree of freedom can be exactly computed, the CDF for even degree of freedom can be approximated by exploiting the monotonicity and log-concavity properties of Marcum-Q function as


 * $$ P(x; 2n, \lambda ) \approx \frac{1}{2}\left[ P(x; 2n - 1, \lambda) + P(x; 2n + 1, \lambda) \right].$$

Another approximation that also serves as an upper bound is given by


 * $$ P(x; 2n, \lambda ) \approx 1 - \left[ (1- P(x; 2n - 1, \lambda)) (1 - P(x; 2n + 1, \lambda)) \right]^{1/2}.$$

For a given probability, these formulas are easily inverted to provide the corresponding approximation for $$ x$$, to compute approximate quantiles.

Related distributions

 * If $$V$$ is chi-square distributed $$V \sim \chi_k^2$$ then $$V$$ is also non-central chi-square distributed: $$V \sim {\chi'}^2_k(0)$$
 * A linear combination of independent noncentral chi-squared variables $$\xi=\sum_i \lambda_i Y_i + c, \quad Y_i \sim \chi'^2(m_i,\delta_i^2)$$, is generalized chi-square distributed.
 * If $$V_1 \sim {\chi'}_{k_1}^2(\lambda)$$ and $$V_2 \sim {\chi'}_{k_2}^2(0)$$ and $$V_1$$ is independent of $$V_2$$ then a noncentral F-distributed variable is developed as $$\frac{V_1/k_1}{V_2/k_2} \sim F'_{k_1,k_2}(\lambda)$$
 * If $$J \sim \mathrm{Poisson}\left({\frac{1}{2}\lambda}\right)$$, then $$\chi_{k+2J}^2 \sim {\chi'}_k^2(\lambda)$$
 * If $$V\sim{\chi'}^2_2(\lambda)$$, then $$\sqrt{V}$$ takes the Rice distribution with parameter $$\sqrt{\lambda}$$.
 * Normal approximation: if $$V \sim {\chi'}^2_k(\lambda)$$, then $$\frac{V-(k+\lambda)}{\sqrt{2(k+2\lambda)}}\to N(0,1)$$ in distribution as either $$k\to\infty$$ or $$\lambda\to\infty$$.
 * If $$V_1 \sim {\chi'}^2_{k_1}(\lambda_1)$$and $$V_2 \sim {\chi'}^2_{k_2}(\lambda_2)$$, where $$V_1, V_2$$ are independent, then $$W = (V_1+V_2) \sim {\chi'}^2_k(\lambda_1+\lambda_2)$$ where $$k=k_1+k_2$$.
 * In general, for a finite set of $$V_i \sim {\chi'}^2_{k_i}(\lambda_i), i\in \left \{ 1..N \right \}$$, the sum of these non-central chi-square distributed random variables $$Y = \sum_{i=1}^N V_i$$ has the distribution $$Y \sim {\chi'}^2_{k_y}(\lambda_y)$$ where $$k_y=\sum_{i=1}^N k_i, \lambda_y=\sum_{i=1}^N\lambda_i$$. This can be seen using moment generating functions as follows: $$M_Y(t) = M_{\sum_{i=1}^N V_i}(t) = \prod_{i=1}^N M_{V_i}(t)$$ by the independence of the $$V_i$$ random variables. It remains to plug in the MGF for the non-central chi square distributions into the product and compute the new MGF – this is left as an exercise. Alternatively it can be seen via the interpretation in the background section above as sums of squares of independent normally distributed random variables with variances of 1 and the specified means.
 * The complex noncentral chi-squared distribution has applications in radio communication and radar systems. Let $$(z_1, \ldots, z_k)$$ be independent scalar complex random variables with noncentral circular symmetry, means of $$\mu_i$$ and unit variances: $$ \operatorname{E} \left |z_i - \mu_i \right |^2 = 1 $$. Then the real random variable $$S = \sum_{i=1}^k \left |z_i \right | ^2$$ is distributed according to the complex noncentral chi-squared distribution, which is effectively a scaled (by 1/2) non-central $$ {\chi'}^2 $$ with twice the degree of freedom and twice the noncentrality parameter:
 * $$ f_S(S) = \left( \frac {S}{\lambda} \right)^{(k-1)/2} e^{ - (S + \lambda) }

I_{k-1} (2 \sqrt {S\lambda} )$$
 * where $$\lambda=\sum_{i=1}^k \left |\mu_i \right |^2.$$

Transformations
Sankaran (1963) discusses the transformations of the form $$z=[(X-b)/(k+\lambda)]^{1/2}$$. He analyzes the expansions of the cumulants of $$z$$ up to the term $$O((k+\lambda)^{-4})$$ and shows that the following choices of $$b$$ produce reasonable results:


 * $$b=(k-1)/2$$ makes the second cumulant of $$z$$ approximately independent of $$\lambda$$
 * $$b=(k-1)/3$$ makes the third cumulant of $$z$$ approximately independent of $$\lambda$$
 * $$b=(k-1)/4$$ makes the fourth cumulant of $$z$$ approximately independent of $$\lambda$$

Also, a simpler transformation $$z_1 = (X-(k-1)/2)^{1/2}$$ can be used as a variance stabilizing transformation that produces a random variable with mean $$(\lambda + (k-1)/2)^{1/2}$$ and variance $$O((k+\lambda)^{-2})$$.

Usability of these transformations may be hampered by the need to take the square roots of negative numbers.

Use in tolerance intervals
Two-sided normal regression tolerance intervals can be obtained based on the noncentral chi-squared distribution. This enables the calculation of a statistical interval within which, with some confidence level, a specified proportion of a sampled population falls.