Class ChiDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.ChiDistribution
-
- All Implemented Interfaces:
Distribution
public class ChiDistribution extends java.lang.Object implements Distribution
Chi distribution.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChiDistribution.ParParameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Field Summary
Fields Modifier and Type Field Description private ChiSquaredDistributionchisqChi squared distribution (for random generation)private doubledofDegrees of freedom.
-
Constructor Summary
Constructors Constructor Description ChiDistribution(double dof)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecdf(double val)Return the cumulative density function at the given value.static doublecdf(double val, double dof)Cumulative density function.doublelogpdf(double val)Return the log density of an existing valuestatic doublelogpdf(double val, double dof)logPDF functiondoublenextRandom(java.util.Random random)Generate a new random valuedoublepdf(double val)Return the density of an existing valuestatic doublepdf(double val, double dof)PDF functiondoublequantile(double val)Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.java.lang.StringtoString()Describe the distribution
-
-
-
Field Detail
-
dof
private double dof
Degrees of freedom. Usually integer.
-
chisq
private ChiSquaredDistribution chisq
Chi squared distribution (for random generation)
-
-
Method Detail
-
nextRandom
public double nextRandom(java.util.Random random)
Description copied from interface:DistributionGenerate a new random value- Specified by:
nextRandomin interfaceDistribution- Parameters:
random- Random number generator- Returns:
- new random value
-
pdf
public double pdf(double val)
Description copied from interface:DistributionReturn the density of an existing value- Specified by:
pdfin interfaceDistribution- Parameters:
val- existing value- Returns:
- distribution density
-
pdf
public static double pdf(double val, double dof)PDF function- Parameters:
val- Valuedof- Degrees of freedom- Returns:
- Pdf value
-
logpdf
public double logpdf(double val)
Description copied from interface:DistributionReturn the log density of an existing value- Specified by:
logpdfin interfaceDistribution- Parameters:
val- existing value- Returns:
- log distribution density
-
logpdf
public static double logpdf(double val, double dof)logPDF function- Parameters:
val- Valuedof- Degrees of freedom- Returns:
- logPdf value
-
cdf
public double cdf(double val)
Description copied from interface:DistributionReturn the cumulative density function at the given value.- Specified by:
cdfin interfaceDistribution- Parameters:
val- existing value- Returns:
- cumulative density
-
cdf
public static double cdf(double val, double dof)Cumulative density function.- Parameters:
val- Valuedof- Degrees of freedom.- Returns:
- CDF value
-
quantile
public double quantile(double val)
Description copied from interface:DistributionQuantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.- Specified by:
quantilein interfaceDistribution- Parameters:
val- Quantile to find- Returns:
- Quantile position
-
toString
public java.lang.String toString()
Description copied from interface:DistributionDescribe the distribution- Specified by:
toStringin interfaceDistribution- Overrides:
toStringin classjava.lang.Object- Returns:
- description
-
-