
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()
DistributionWithRandomnextRandom in interface DistributionWithRandompublic double pdf(double val)
Distributionpdf in interface Distributionval - existing valuepublic static double pdf(double val,
double dof)
val - Valuedof - Degrees of freedompublic double cdf(double val)
Distributioncdf in interface Distributionval - existing valuepublic static double cdf(double val,
double dof)
val - Valuedof - Degrees of freedom.public double quantile(double val)
Distributionquantile in interface Distributionval - Quantile to findpublic String toString()
DistributiontoString in interface DistributiontoString in class Object