public class ChiDistribution extends Object implements DistributionWithRandom
Modifier and Type | Field and Description |
---|---|
private ChiSquaredDistribution |
chisq
Chi squared distribution (for random generation)
|
private double |
dof
Degrees of freedom.
|
Constructor and Description |
---|
ChiDistribution(double dof)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double val)
Return the cumulative density function at the given value.
|
static double |
cdf(double val,
double dof)
Cumulative density function.
|
double |
nextRandom()
Generate a new random value
|
double |
pdf(double val)
Return the density of an existing value
|
static double |
pdf(double val,
double dof)
PDF function
|
double |
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
String |
toString()
Describe the distribution
|
private double dof
private ChiSquaredDistribution chisq
public ChiDistribution(double dof)
dof
- Degrees of freedom. Usually integer.public double nextRandom()
DistributionWithRandom
nextRandom
in interface DistributionWithRandom
public double pdf(double val)
Distribution
pdf
in interface Distribution
val
- existing valuepublic static double pdf(double val, double dof)
val
- Valuedof
- Degrees of freedompublic double cdf(double val)
Distribution
cdf
in interface Distribution
val
- existing valuepublic static double cdf(double val, double dof)
val
- Valuedof
- Degrees of freedom.public double quantile(double val)
Distribution
quantile
in interface Distribution
val
- Quantile to findpublic String toString()
Distribution
toString
in interface Distribution
toString
in class Object