public class ChiDistribution extends Object implements Distribution
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
private double dof
private ChiSquaredDistribution chisq
public ChiDistribution(double dof)
dof
- Degrees of freedom. Usually integer.public double nextRandom()
Distribution
nextRandom
in interface Distribution
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.