Chisq
Function for generating values from chi-square distributions CPN ML


Related Pages

Random distribution functions

Interface

chisq(n:int) : real

where n>=1. Returns a drawing from a chi-square distribution with n degrees of freedom.

The sum of the squares of n independent normally distributed random variables with mean 0.0 and standard deviation 1.0 is a chi-squared distribution with n degrees of freedom.

Raises Chisq exception, if n<1.

Characteristics

Mean: n
Variance: 2n

Density functions for chi-square distributions:

Density functions for chi-square distributions

Example

An example for this distribution has been omitted due to the fact that it is rarely found in nature. Instead, the distribution is used when doing statistical tests.