Class FDistribution
- java.lang.Object
-
- dev.nm.stat.distribution.univariate.FDistribution
-
- All Implemented Interfaces:
ProbabilityDistribution
public class FDistribution extends Object implements ProbabilityDistribution
The F distribution is the distribution of the ratio of two independent chi-squared variates. The R equivalent functions aredf, pf, qf, rf.- See Also:
- Wikipedia: FDistribution-distribution
-
-
Constructor Summary
Constructors Constructor Description FDistribution(double df1, double df2)Construct an F distribution.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description doublecdf(double x)Gets the cumulative probability F(x) = Pr(X ≤ x).doubledensity(double x)The density function, which, if exists, is the derivative of F.doubleentropy()Deprecated.Not supported yet.doublekurtosis()Gets the excess kurtosis of this distribution.doublemean()Gets the mean of this distribution.doublemedian()Deprecated.Not supported yet.doublemoment(double x)The moment generating function is the expected value of etX.doublequantile(double u)Gets the quantile, the inverse of the cumulative distribution function.doubleskew()Gets the skewness of this distribution.doublevariance()Gets the variance of this distribution.
-
-
-
Method Detail
-
mean
public double mean()
Gets the mean of this distribution.- Specified by:
meanin interfaceProbabilityDistribution- Returns:
- the mean
- Throws:
UnsupportedOperationException- when df2 ≤ 2- See Also:
- Wikipedia: Expected value
-
median
@Deprecated public double median()
Deprecated.Not supported yet.Description copied from interface:ProbabilityDistributionGets the median of this distribution.- Specified by:
medianin interfaceProbabilityDistribution- Returns:
- the median
- See Also:
- Wikipedia: Median
-
variance
public double variance()
Gets the variance of this distribution.- Specified by:
variancein interfaceProbabilityDistribution- Returns:
- the variance
- Throws:
UnsupportedOperationException- when df2 ≤ 4- See Also:
- Wikipedia: Variance
-
skew
public double skew()
Gets the skewness of this distribution.- Specified by:
skewin interfaceProbabilityDistribution- Returns:
- the skewness
- Throws:
UnsupportedOperationException- when df2 ≤ 6- See Also:
- Wikipedia: Skewness
-
kurtosis
public double kurtosis()
Gets the excess kurtosis of this distribution.- Specified by:
kurtosisin interfaceProbabilityDistribution- Returns:
- the excess kurtosis
- Throws:
UnsupportedOperationException- when df2 ≤ 8- See Also:
- Wikipedia: Kurtosis
-
entropy
@Deprecated public double entropy()
Deprecated.Not supported yet.Description copied from interface:ProbabilityDistributionGets the entropy of this distribution.- Specified by:
entropyin interfaceProbabilityDistribution- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
cdf
public double cdf(double x)
Description copied from interface:ProbabilityDistributionGets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdfin interfaceProbabilityDistribution- Parameters:
x- x- Returns:
- F(x) = Pr(X ≤ x)
- See Also:
- Wikipedia: Cumulative distribution function
-
density
public double density(double x)
Description copied from interface:ProbabilityDistributionThe density function, which, if exists, is the derivative of F. It describes the density of probability at each point in the sample space.f(x) = dF(X) / dx
This may not always exist. For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value.- Specified by:
densityin interfaceProbabilityDistribution- Parameters:
x- x- Returns:
- f(x)
- See Also:
-
quantile
public double quantile(double u)
Description copied from interface:ProbabilityDistributionGets the quantile, the inverse of the cumulative distribution function. It is the value below which random draws from the distribution would fall u×100 percent of the time.
This may not always exist.F-1(u) = x, such that Pr(X ≤ x) = u
- Specified by:
quantilein interfaceProbabilityDistribution- Parameters:
u-u, a quantile- Returns:
- F-1(u)
- See Also:
- Wikipedia: Quantile function
-
moment
public double moment(double x)
Description copied from interface:ProbabilityDistributionThe moment generating function is the expected value of etX. That is,E(etX)
This may not always exist.- Specified by:
momentin interfaceProbabilityDistribution- Parameters:
x- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
-