PeterO.RandomGenerator.ChiSquared C# (CSharp) Method

ChiSquared() public method

Generates a random number that is the sum of the squares of "df" normally-distributed random numbers with a mean of 0 and a standard deviation of 1.
public ChiSquared ( int df ) : double
df int Degrees of freedom (the number of independently /// chosen normally-distributed numbers).
return double
        public double ChiSquared(int df)
        {
            if (df <= 0) {
            throw new ArgumentException("df (" + df + ") is not greater than 0");
              }
              return this.Gamma(df / 2.0, 2);
        }