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.| Modifier and Type | Field and Description |
|---|---|
int |
nu1
The degrees of freedom of chi-square distribution in numerator.
|
int |
nu2
The degrees of freedom chi-square distribution in denominator.
|
| 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 |
length()
The number of parameters of the distribution.
|
double |
logp(double x)
The density at x in log scale, which may prevents the underflow problem.
|
double |
mean()
The mean of 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.
|
java.lang.String |
toString() |
double |
variance()
The variance of distribution.
|
inverseTransformSampling, quantile, quantile, rejectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlikelihood, logLikelihood, rand, sdpublic final int nu1
public final int nu2
public 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 length()
Distributionpublic double mean()
Distributionpublic double variance()
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