|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.distribution.AbstractDistribution
org.apache.commons.math.distribution.AbstractContinuousDistribution
org.apache.commons.math.distribution.FDistributionImpl
public class FDistributionImpl
Default implementation of
FDistribution.
| Field Summary | |
|---|---|
static double |
DEFAULT_INVERSE_ABSOLUTE_ACCURACY
Default inverse cumulative probability accuracy. |
| Fields inherited from class org.apache.commons.math.distribution.AbstractContinuousDistribution |
|---|
randomData, SOLVER_DEFAULT_ABSOLUTE_ACCURACY |
| Constructor Summary | |
|---|---|
FDistributionImpl(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom)
Create a F distribution using the given degrees of freedom. |
|
FDistributionImpl(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom,
double inverseCumAccuracy)
Create an F distribution using the given degrees of freedom and inverse cumulative probability accuracy. |
|
| Method Summary | |
|---|---|
protected double |
calculateNumericalMean()
Use this method to actually calculate the mean for the specific distribution. |
protected double |
calculateNumericalVariance()
Use this method to actually calculate the variance for the specific distribution. |
double |
cumulativeProbability(double x)
For this distribution, X, this method returns P(X < x). |
double |
density(double x)
Returns the probability density for a particular point. |
double |
getDenominatorDegreesOfFreedom()
Access the denominator degrees of freedom. |
protected double |
getDomainLowerBound(double p)
Access the domain value lower bound, based on p, used to
bracket a CDF root. |
protected double |
getDomainUpperBound(double p)
Access the domain value upper bound, based on p, used to
bracket a CDF root. |
protected double |
getInitialDomain(double p)
Access the initial domain value, based on p, used to
bracket a CDF root. |
double |
getNumeratorDegreesOfFreedom()
Access the numerator degrees of freedom. |
protected double |
getSolverAbsoluteAccuracy()
Return the absolute accuracy setting of the solver used to estimate inverse cumulative probabilities. |
double |
getSupportLowerBound()
Access the lower bound of the support. |
double |
getSupportUpperBound()
Access the upper bound of the support. |
double |
inverseCumulativeProbability(double p)
For this distribution, X, this method returns the critical
point x, such that P(X < x) = p. |
boolean |
isSupportLowerBoundInclusive()
Use this method to get information about whether the lower bound of the support is inclusive or not. |
boolean |
isSupportUpperBoundInclusive()
Use this method to get information about whether the upper bound of the support is inclusive or not. |
| Methods inherited from class org.apache.commons.math.distribution.AbstractContinuousDistribution |
|---|
reseedRandomGenerator, sample, sample |
| Methods inherited from class org.apache.commons.math.distribution.AbstractDistribution |
|---|
cumulativeProbability, getNumericalMean, getNumericalVariance, isSupportConnected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.math.distribution.ContinuousDistribution |
|---|
reseedRandomGenerator, sample, sample |
| Methods inherited from interface org.apache.commons.math.distribution.Distribution |
|---|
cumulativeProbability, getNumericalMean, getNumericalVariance, isSupportConnected |
| Field Detail |
|---|
public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY
| Constructor Detail |
|---|
public FDistributionImpl(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom)
numeratorDegreesOfFreedom - Numerator degrees of freedom.denominatorDegreesOfFreedom - Denominator degrees of freedom.
NotStrictlyPositiveException - if numeratorDegreesOfFreedom <= 0
or denominatorDegreesOfFreedom <= 0.
public FDistributionImpl(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom,
double inverseCumAccuracy)
numeratorDegreesOfFreedom - Numerator degrees of freedom.denominatorDegreesOfFreedom - Denominator degrees of freedom.inverseCumAccuracy - the maximum absolute error in inverse
cumulative probability estimates.
(defaults to DEFAULT_INVERSE_ABSOLUTE_ACCURACY)
NotStrictlyPositiveException - if numeratorDegreesOfFreedom <= 0
or denominatorDegreesOfFreedom <= 0.| Method Detail |
|---|
public double density(double x)
density in interface ContinuousDistributiondensity in class AbstractContinuousDistributionx - The point at which the density should be computed.
public double cumulativeProbability(double x)
X, this method returns P(X < x).
The implementation of this method is based on
cumulativeProbability in interface Distributionx - Value at which the CDF is evaluated.
public double inverseCumulativeProbability(double p)
X, this method returns the critical
point x, such that P(X < x) = p.
Returns 0 when p = 0 and Double.POSITIVE_INFINITY when p = 1.
inverseCumulativeProbability in interface ContinuousDistributioninverseCumulativeProbability in class AbstractContinuousDistributionp - Desired probability.
x, such that P(X < x) = p.
java.lang.IllegalArgumentException - if p is not a valid
probability.protected double getDomainLowerBound(double p)
p, used to
bracket a CDF root. This method is used by
inverseCumulativeProbability(double) to find critical values.
getDomainLowerBound in class AbstractContinuousDistributionp - Desired probability for the critical value.
P(X < 'lower bound') < p.protected double getDomainUpperBound(double p)
p, used to
bracket a CDF root. This method is used by
inverseCumulativeProbability(double) to find critical values.
getDomainUpperBound in class AbstractContinuousDistributionp - Desired probability for the critical value.
P(X < 'upper bound') > p.protected double getInitialDomain(double p)
p, used to
bracket a CDF root. This method is used by
inverseCumulativeProbability(double) to find critical values.
getInitialDomain in class AbstractContinuousDistributionp - Desired probability for the critical value.
public double getNumeratorDegreesOfFreedom()
getNumeratorDegreesOfFreedom in interface FDistributionpublic double getDenominatorDegreesOfFreedom()
getDenominatorDegreesOfFreedom in interface FDistributionprotected double getSolverAbsoluteAccuracy()
getSolverAbsoluteAccuracy in class AbstractContinuousDistributionpublic double getSupportLowerBound()
getSupportLowerBound in class AbstractContinuousDistributionpublic double getSupportUpperBound()
getSupportUpperBound in class AbstractContinuousDistributionprotected double calculateNumericalMean()
AbstractDistribution.getNumericalMean()
(which implements caching) to actually get the mean.
For denominator degrees of freedom parameter b,
the mean is
b > 2 then b / (b - 2)undefined
calculateNumericalMean in class AbstractDistributionprotected double calculateNumericalVariance()
AbstractDistribution.getNumericalVariance()
(which implements caching) to actually get the variance.
For numerator degrees of freedom parameter a
and denominator degrees of freedom parameter b,
the variance is
b > 4 then
[ 2 * b^2 * (a + b - 2) ] / [ a * (b - 2)^2 * (b - 4) ]
undefined
calculateNumericalVariance in class AbstractDistributionpublic boolean isSupportLowerBoundInclusive()
isSupportLowerBoundInclusive in interface DistributionisSupportLowerBoundInclusive in class AbstractDistributionpublic boolean isSupportUpperBoundInclusive()
isSupportUpperBoundInclusive in interface DistributionisSupportUpperBoundInclusive in class AbstractDistribution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||