SuanShu, a Java numerical and statistical library

## com.numericalmethod.suanshu.stats.distribution.univariate Class LogNormalDistribution

java.lang.Object
com.numericalmethod.suanshu.stats.distribution.univariate.LogNormalDistribution

All Implemented Interfaces:
ProbabilityDistribution

public class LogNormalDistributionextends java.lang.Objectimplements ProbabilityDistribution

A log-normal distribution is a probability distribution of a random variable whose logarithm is normally distributed. A variable might be modeled as log-normal if it can be thought of as the multiplicative product of many independent random variables each of which is positive.

Wikipedia: Log-normal distribution

Constructor Summary
LogNormalDistribution(double logMu, double logSigma)
Construct a log-normal distribution.

Method Summary
 double cdf(double x)
Get 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()
Get the entropy of this distribution.
 double kurtosis()
Get the excess kurtosis of this distribution.
 double mean()
Get the mean of this distribution.
 double median()
Get the median of this distribution.
 double moment(double s)
The moment generating function is the expected value of etX.
 double quantile(double u)
Get the quantile, the inverse of the cumulative distribution function.
 double skew()
Get the skewness of this distribution.
 double variance()
Get 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

### LogNormalDistribution

public LogNormalDistribution(double logMu,
double logSigma)
Construct a log-normal distribution.

Parameters:
logMu - the log mean
logSigma - the log standard deviation
Method Detail

### mean

public double mean()
Description copied from interface: ProbabilityDistribution
Get the mean of this distribution.

Specified by:
mean in interface ProbabilityDistribution
Returns:
the mean
Wikipedia: Expected value

### median

public double median()
Description copied from interface: ProbabilityDistribution
Get the median of this distribution.

Specified by:
median in interface ProbabilityDistribution
Returns:
the median
Wikipedia: Median

### variance

public double variance()
Description copied from interface: ProbabilityDistribution
Get the variance of this distribution.

Specified by:
variance in interface ProbabilityDistribution
Returns:
the variance
Wikipedia: Variance

### skew

public double skew()
Description copied from interface: ProbabilityDistribution
Get the skewness of this distribution.

Specified by:
skew in interface ProbabilityDistribution
Returns:
the skewness
Wikipedia: Skewness

### kurtosis

public double kurtosis()
Description copied from interface: ProbabilityDistribution
Get 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
Get the entropy of this distribution.

Specified by:
entropy in interface ProbabilityDistribution
Returns:
the entropy
Wikipedia: Entropy (information theory)

### cdf

public double cdf(double x)
Description copied from interface: ProbabilityDistribution
Get 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 u)
Description copied from interface: ProbabilityDistribution
Get 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:
u - u, a quantile
Returns:
F-1(u)
Wikipedia: Quantile function

### 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)

### moment

public double moment(double s)
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:
s - x
Returns:
E(exp(tX))