Chi-Square Distribution Function
JavaScript
The chi-square distribution with k degrees of freedom is
defined to be the distribution of the sum of the squares
of k independent normal(0,1) random variables. It is the
same as the gamma distribution with shape parameter k/2 and
scale parameter 1/2.
For example, chisq(2,2) = 1 - 1/e = .63212