# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.distribution.univariate

## Interface ProbabilityDistribution

• ### 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 mean()
Gets the mean of this distribution.
double median()
Gets the median of this distribution.
double moment(double t)
The moment generating function is the expected value of etX.
double quantile(double u)
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.
• ### Method Detail

• #### mean

double mean()
Gets the mean of this distribution.
Returns:
the mean
Wikipedia: Expected value
• #### median

double median()
Gets the median of this distribution.
Returns:
the median
Wikipedia: Median
• #### variance

double variance()
Gets the variance of this distribution.
Returns:
the variance
Wikipedia: Variance
• #### skew

double skew()
Gets the skewness of this distribution.
Returns:
the skewness
Wikipedia: Skewness
• #### kurtosis

double kurtosis()
Gets the excess kurtosis of this distribution.
Returns:
the excess kurtosis
Wikipedia: Kurtosis
• #### cdf

double cdf(double x)
Gets the cumulative probability F(x) = Pr(X ≤ x).
Parameters:
x - x
Returns:
F(x) = Pr(X ≤ x)
Wikipedia: Cumulative distribution function
• #### quantile

double quantile(double u)
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.
Parameters:
u - u, a quantile
Returns:
F-1(u)
Wikipedia: Quantile function
• #### density

double density(double x)
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.

Parameters:
x - x
Returns:
f(x)
• #### moment

double moment(double t)
The moment generating function is the expected value of etX. That is,
E(etX)
This may not always exist.
Parameters:
t - t
Returns:
E(exp(tX))