public class FDistribution extends AbstractDistribution
U1 / d1 ------- U2 / d2where U1 and U2 have chi-square distributions with d1 and d2 degrees of freedom respectively, and U1 and U2 are independent.
| Constructor and Description |
|---|
FDistribution(int nu1,
int nu2)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Cumulative distribution function.
|
double |
entropy()
Shannon entropy.
|
int |
getNu1()
Returns the parameter nu1, the degrees of freedom of chi-square distribution in numerator.
|
int |
getNu2()
Returns the parameter nu2, the degrees of freedom chi-square distribution in denominator.
|
double |
logp(double x)
The density at x in log scale, which may prevents the underflow problem.
|
double |
mean()
The mean of distribution.
|
int |
npara()
The number of parameters of the distribution.
|
double |
p(double x)
The probability density function for continuous distribution
or probability mass function for discrete distribution at x.
|
double |
quantile(double p)
The quantile, the probability to the left of quantile is p.
|
double |
rand()
Generates a random number following this distribution.
|
double |
sd()
The standard deviation of distribution.
|
java.lang.String |
toString() |
double |
var()
The variance of distribution.
|
inverseTransformSampling, likelihood, logLikelihood, quantile, quantile, rejectionpublic FDistribution(int nu1,
int nu2)
nu1 - the degree of freedom of chi-square distribution in numerator.nu2 - the degree of freedom of chi-square distribution in denominator.public int getNu1()
public int getNu2()
public int npara()
Distributionpublic double mean()
Distributionpublic double var()
Distributionpublic double sd()
Distributionpublic double entropy()
public java.lang.String toString()
toString in class java.lang.Objectpublic double rand()
Distributionpublic double p(double x)
Distributionpublic double logp(double x)
Distributionpublic double cdf(double x)
Distributionpublic double quantile(double p)
Distribution