# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.evt.evd.univariate

## Class OrderStatisticsDistribution

• java.lang.Object
• com.numericalmethod.suanshu.stats.evt.evd.univariate.OrderStatisticsDistribution
• All Implemented Interfaces:
ProbabilityDistribution, UnivariateEVD

public class OrderStatisticsDistribution
extends Object
implements UnivariateEVD
The asymptotic nondegenerate distributions of the r-th smallest (largest) order statistic.

The R equivalent functions are evd::dorder, evd::porder, evd::rorder.

"E. Castillo, A. S. Hadi, N. Balakrishnan, J. M. Sarabia, "Extreme Value and Related Models with Applications in Engineering and Science," Wiley-Interscience, 2004, ch.7, P.158"
• ### Constructor Summary

Constructors
Constructor and Description
OrderStatisticsDistribution(ProbabilityDistribution dist, int nIIDs, int order)
Create an instance with the probability distribution of $$X$$, the number of iid samples to be drawn, and the order statistic.
• ### Method Summary

All Methods
Modifier and Type Method and Description
double cdf(double x)
Gets the cumulative probability F(x) = Pr(X ≤ x).
double density(double x)
The density function, which, if exists, is the derivative of F.
double entropy()
Gets the entropy of this distribution.
double kurtosis()
Gets the excess kurtosis of this distribution.
double logDensity(double x)
Get the logarithm of the probability density function at $$x$$, that is, $$\log(f(x))$$.
double mean()
Gets the mean of this distribution.
double median()
Gets the median of this distribution.
double moment(double x)
The moment generating function is the expected value of etX.
double quantile(double x)
Gets the quantile, the inverse of the cumulative distribution function.
double skew()
Gets the skewness of this distribution.
double variance()
Gets the variance of this distribution.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### OrderStatisticsDistribution

public OrderStatisticsDistribution(ProbabilityDistribution dist,
int nIIDs,
int order)
Create an instance with the probability distribution of $$X$$, the number of iid samples to be drawn, and the order statistic.
Parameters:
dist - the probability distribution
nIIDs - the number of independent variables
order - the order statistic (largest) (1 means smallest, n means largest)
• ### Method Detail

• #### density

public double density(double x)
Description copied from interface: ProbabilityDistribution
The 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:
density in interface ProbabilityDistribution
Parameters:
x - x
Returns:
f(x)
• #### logDensity

public double logDensity(double x)
Description copied from interface: UnivariateEVD
Get the logarithm of the probability density function at $$x$$, that is, $$\log(f(x))$$.
Specified by:
logDensity in interface UnivariateEVD
Parameters:
x - $$x$$
Returns:
$$\log(f(x))$$
• #### cdf

public double cdf(double x)
Description copied from interface: ProbabilityDistribution
Gets the cumulative probability F(x) = Pr(X ≤ x).
Specified by:
cdf in interface ProbabilityDistribution
Parameters:
x - x
Returns:
F(x) = Pr(X ≤ x)
Wikipedia: Cumulative distribution function
• #### quantile

public double quantile(double x)
Description copied from interface: ProbabilityDistribution
Gets 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.

F-1(u) = x, such that
Pr(X ≤ x) = u

This may not always exist.
Specified by:
quantile in interface ProbabilityDistribution
Parameters:
x - u, a quantile
Returns:
F-1(u)
Wikipedia: Quantile function
• #### mean

public double mean()
Description copied from interface: ProbabilityDistribution
Gets the mean of this distribution.
Specified by:
mean in interface ProbabilityDistribution
Returns:
the mean
Wikipedia: Expected value
• #### moment

public double moment(double x)
Description copied from interface: ProbabilityDistribution
The moment generating function is the expected value of etX. That is,
E(etX)
This may not always exist.
Specified by:
moment in interface ProbabilityDistribution
Parameters:
x - t
Returns:
E(exp(tX))
Wikipedia: Moment-generating function
• #### skew

public double skew()
Description copied from interface: ProbabilityDistribution
Gets the skewness of this distribution.
Specified by:
skew in interface ProbabilityDistribution
Returns:
the skewness
Wikipedia: Skewness
• #### variance

public double variance()
Description copied from interface: ProbabilityDistribution
Gets the variance of this distribution.
Specified by:
variance in interface ProbabilityDistribution
Returns:
the variance
Wikipedia: Variance
• #### median

public double median()
Description copied from interface: ProbabilityDistribution
Gets the median of this distribution.
Specified by:
median in interface ProbabilityDistribution
Returns:
the median
Wikipedia: Median
• #### kurtosis

public double kurtosis()
Description copied from interface: ProbabilityDistribution
Gets the excess kurtosis of this distribution.
Specified by:
kurtosis in interface ProbabilityDistribution
Returns:
the excess kurtosis
Wikipedia: Kurtosis
• #### entropy

public double entropy()
Description copied from interface: ProbabilityDistribution
Gets the entropy of this distribution.
Specified by:
entropy in interface ProbabilityDistribution
Returns:
the entropy