Class ChiSquaredDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.GammaDistribution
-
- elki.math.statistics.distribution.ChiSquaredDistribution
-
- All Implemented Interfaces:
Distribution
public class ChiSquaredDistribution extends GammaDistribution
Chi-Squared distribution (a specialization of the Gamma distribution).- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChiSquaredDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Field Summary
-
Fields inherited from class elki.math.statistics.distribution.GammaDistribution
EULERS_CONST, FPMIN, LANCZOS, LOGGAMMA_G, MAX_ITERATIONS, NUM_PRECISION
-
-
Constructor Summary
Constructors Constructor Description ChiSquaredDistribution(double dof)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
cdf(double val, double dof)
The CDF, static version.static double
logpdf(double x, double dof)
Chi-Squared distribution PDF (with 0.0 for x < 0)static double
pdf(double x, double dof)
Chi-Squared distribution PDF (with 0.0 for x < 0)static double
quantile(double x, double dof)
Return the quantile function for this distributionjava.lang.String
toString()
Simple toString explaining the distribution parameters.-
Methods inherited from class elki.math.statistics.distribution.GammaDistribution
cdf, cdf, chisquaredProbitApproximation, digamma, gamma, gammaQuantileNewtonRefinement, getK, getTheta, logcdf, logGamma, logpdf, logpdf, logregularizedGammaP, nextRandom, nextRandom, pdf, pdf, quantile, quantile, regularizedGammaP, regularizedGammaQ, trigamma
-
-
-
-
Method Detail
-
cdf
public static double cdf(double val, double dof)
The CDF, static version.- Parameters:
val
- Valuedof
- Degrees of freedom.- Returns:
- cdf value
-
pdf
public static double pdf(double x, double dof)
Chi-Squared distribution PDF (with 0.0 for x < 0)- Parameters:
x
- query valuedof
- Degrees of freedom.- Returns:
- probability density
-
logpdf
public static double logpdf(double x, double dof)
Chi-Squared distribution PDF (with 0.0 for x < 0)- Parameters:
x
- query valuedof
- Degrees of freedom.- Returns:
- probability density
-
quantile
@Reference(authors="D. J. Best, D. E. Roberts", title="Algorithm AS 91: The percentage points of the \u03c7\u00b2 distribution", booktitle="Journal of the Royal Statistical Society. Series C (Applied Statistics)", url="https://doi.org/10.2307/2347113", bibkey="doi:10.2307/2347113") public static double quantile(double x, double dof)
Return the quantile function for this distributionReference:
D. J. Best, D. E. Roberts
Algorithm AS 91: The percentage points of the χ² distribution
Journal of the Royal Statistical Society. Series C (Applied Statistics)- Parameters:
x
- Quantiledof
- Degrees of freedom- Returns:
- quantile position
-
toString
public java.lang.String toString()
Description copied from class:GammaDistribution
Simple toString explaining the distribution parameters. Used in producing a model description.- Specified by:
toString
in interfaceDistribution
- Overrides:
toString
in classGammaDistribution
- Returns:
- description
-
-