What is the noncentral chi-squared distribution?
The noncentral chi-squared distribution generalizes the ordinary (central) chi-squared distribution by adding a noncentrality parameter lambda. It describes the sum of squares of independent normal variables that have nonzero means. It is widely used in statistical power analysis, signal detection, and hypothesis testing. This calculator is pure mathematics and applies universally — there are no country-specific rules.
How to use this calculator
Choose which quantity to output: the probability density f, the lower cumulative probability P, or the upper cumulative probability Q. Enter the degrees of freedom nu (must be greater than 0), the noncentrality lambda (must be at least 0), and a reference x value. Set an x initial value, a step increment, and the number of rows to generate a table of (x, value) pairs over a range.
The formula explained
The noncentral chi-squared is a Poisson(lambda/2)-weighted mixture of central chi-squared distributions. The weight for term j is \(w_j = e^{-\lambda/2}\,(\lambda/2)^j / j!\). The density is the sum of \(w_j\) times the central chi-squared density with \(\nu+2j\) degrees of freedom:
$$f(x;\nu,\lambda)=\sum_{j=0}^{\infty}\frac{e^{-\lambda/2}\left(\lambda/2\right)^{j}}{j!}\,\frac{x^{\,k/2-1}e^{-x/2}}{2^{k/2}\,\Gamma\!\left(k/2\right)}\quad\text{where}\;\; k=\nu+2j$$The lower cumulative probability is the same mixture applied to the central chi-squared CDF, which uses the regularized lower incomplete gamma function:
$$F(x;\nu,\lambda)=\sum_{j=0}^{\infty}\frac{e^{-\lambda/2}\left(\lambda/2\right)^{j}}{j!}\,P\!\left(\frac{\nu+2j}{2},\;\frac{x}{2}\right)$$The upper cumulative probability is simply \(Q = 1 - P\).
Worked example
For \(\nu = 3\), \(\lambda = 1\), \(x = 2\): the Poisson(0.5) weights are 0.6065, 0.3033, 0.0758, 0.0126, 0.0016. The central chi-squared CDFs at \(x=2\) for 3,5,7,9,11 dof are 0.4276, 0.1511, 0.0387, 0.0074, 0.0011. The weighted sum gives \(P \approx 0.3082\), so \(Q \approx 0.6918\). The density \(f\) at the same point is approximately 0.173.
FAQ
What happens when lambda = 0? The distribution reduces exactly to the central chi-squared distribution with \(\nu\) degrees of freedom, because only the \(j=0\) term survives with weight 1.
Can nu be non-integer? Yes. The gamma function handles any \(\nu\) greater than 0, so fractional degrees of freedom are valid.
Why is the density 0 at x = 0? For \(\nu\) of 2 or more the density is 0 at the origin; for \(\nu\) below 2 it diverges, so the calculator returns 0 at \(x = 0\) as a practical limit.