Chisq | CPN Tools help |
Function for generating values from chi-square distributions | CPN ML |
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.
Mean: | n |
Variance: | 2n |
Density functions for chi-square distributions: