# The Non-central Chi Square Distribution

The non-central chi square (χ^{2}) distribution
with *n* degrees of freedom and non-centrality parameter
λ is a generalization of the
chi square distribution.
It is used in the power analysis of statistical tests,
including likelihood ratio tests.

The non-central chi square distribution has two parameters. The first is the degrees of freedom. This value is usually an integer, but this is not an absolute requirement. The second parameter is the non-centrality parameter. The probability density function (PDF) is:

where *n* is the degrees of freedom and λ is the non-centrality parameter.

The non-central chi square distribution is implemented by the NonCentralChiSquareDistribution class. It has one constructor which takes the degrees of freedom and the non-centrality parameter as arguments. The following constructs a non-central chi square distribution with 10 degrees of freedom and non-centrality parameter 15:

`var ncChiSquare = new NonCentralChiSquareDistribution(10, 15);`

The NonCentralChiSquareDistribution class has two specific properties. DegreesOfFreedom returns the degrees of freedom of the distribution. NonCentralityParameter returns the non-centrality parameter.

For details of the properties and methods common to all continuous distribution classes, see the topic on continuous distributions..