Calculates, for given degrees of freedom, n: 
a) the chi-square (χ²) distribution ('cdf'),
P = χ²(x; n), of a
given value of the variable, x;  or 
b) the inverse function, x(P) ('tol' being the tolerance
in the numerical procedure).
   Draws a graph of the 'pdf', from 0 to twice the mean
(μ = n) of the distribution.
   For this distribution it is:
  
 The mean is μ = n,
the mode n − 2 (n ≥ 2), and
the variance 2 n.
 † Google: "chi-square" or
"chi-squared" |  
  | 
• Weisstein, Eric, W., "Chi-Squared
Distribution". From MathWorld—A Wolfram Web Resource. 
   • Craig, R. J. (.pdf), 1984,
"Normal family distribution functions: Fortran and Basic programs",
Journal of Quality Technology, pp 232–236. 
   • 1862-01-13: Hilbert, David
(† 1943-02-14, 81 yrs.).  |