Package pal.statistics
Class ChiSquareDistribution
- java.lang.Object
-
- pal.statistics.GammaDistribution
-
- pal.statistics.ChiSquareDistribution
-
public class ChiSquareDistribution extends GammaDistribution
chi-square distribution (distribution of sum of squares of n uniform random variables) (Parameter: n; mean: n; variance: 2*n) The chi-square distribution is a special case of the Gamma distribution (shape parameter = n/2.0, scale = 2.0).- Version:
- $Id: ChiSquareDistribution.java,v 1.2 2001/07/13 14:39:13 korbinian Exp $
- Author:
- Korbinian Strimmer
-
-
Constructor Summary
Constructors Constructor Description ChiSquareDistribution()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
cdf(double x, double n)
cumulative density function of the chi-square distributionstatic double
mean(double n)
mean of the chi-square distributionstatic double
pdf(double x, double n)
probability density function of the chi-square distributionstatic double
quantile(double y, double n)
quantile (inverse cumulative density function) of the chi-square distributionstatic double
variance(double n)
variance of the chi-square distribution
-
-
-
Method Detail
-
pdf
public static double pdf(double x, double n)
probability density function of the chi-square distribution- Parameters:
x
- argumentn
- degrees of freedom- Returns:
- pdf value
-
cdf
public static double cdf(double x, double n)
cumulative density function of the chi-square distribution- Parameters:
x
- argumentn
- degrees of freedom- Returns:
- cdf value
-
quantile
public static double quantile(double y, double n)
quantile (inverse cumulative density function) of the chi-square distribution- Parameters:
x
- argumentn
- degrees of freedom- Returns:
- icdf value
-
mean
public static double mean(double n)
mean of the chi-square distribution- Parameters:
n
- degrees of freedom- Returns:
- mean
-
variance
public static double variance(double n)
variance of the chi-square distribution- Parameters:
n
- degrees of freedom- Returns:
- variance
-
-