org.ojalgo.random

## Class LogNormal

• All Implemented Interfaces:
Serializable, DoubleSupplier, Supplier<Double>, BasicFunction, NullaryFunction<Double>, ContinuousDistribution, Distribution

```public class LogNormal
extends RandomNumber```
A continuous distribution in which the logarithm of a variable has a normal distribution. A log normal distribution results if the variable is the product of a large number of independent, identically-distributed variables in the same way that a normal distribution results if the variable is the sum of a large number of independent, identically-distributed variables.
Author:
apete
Serialized Form

• ### Nested classes/interfaces inherited from interface org.ojalgo.function.BasicFunction

`BasicFunction.Differentiable<N extends Number,F extends BasicFunction>, BasicFunction.Integratable<N extends Number,F extends BasicFunction>, BasicFunction.PlainUnary<T,R>`
• ### Constructor Summary

Constructors
Constructor and Description
`LogNormal()`
```LogNormal(double aMean, double aStdDev)```
The aMean and aStdDev parameters are the mean and standard deviation of the variable's logarithm (by definition, the variable's logarithm is normally distributed).
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static LogNormal` `estimate(Access1D<?> rawSamples)`
`protected double` `generate()`
`double` `getDensity(double value)`
In probability theory, a probability density function (pdf), or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point.
`double` `getDistribution(double value)`
In probability theory and statistics, the cumulative distribution function (CDF), or just distribution function, describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x.
`double` `getExpected()`
`double` `getGeometricMean()`
The geometric mean is also the median
`double` `getGeometricStandardDeviation()`
`double` `getLowerConfidenceQuantile(double confidence)`
`double` `getQuantile(double probability)`
The quantile function, for any distribution, is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function.
`double` `getUpperConfidenceQuantile(double confidence)`
`double` `getVariance()`
Subclasses must override either getStandardDeviation() or getVariance()!
`static LogNormal` ```make(double aExpected, double aVariance)```
`void` `setSeed(long seed)`
• ### Methods inherited from class org.ojalgo.random.RandomNumber

`checkProbabilty, doubleValue, floatValue, getStandardDeviation, intValue, invoke, longValue, newSampleSet, random, toString`
• ### Methods inherited from class java.lang.Number

`byteValue, shortValue`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Methods inherited from interface org.ojalgo.random.ContinuousDistribution

`getProbability`
• ### Methods inherited from interface org.ojalgo.random.Distribution

`getStandardDeviation`
• ### Methods inherited from interface org.ojalgo.function.NullaryFunction

`andThen, get, getAsDouble`
• ### Constructor Detail

• #### LogNormal

`public LogNormal()`
• #### LogNormal

```public LogNormal(double aMean,
double aStdDev)```
The aMean and aStdDev parameters are the mean and standard deviation of the variable's logarithm (by definition, the variable's logarithm is normally distributed).
• ### Method Detail

• #### estimate

`public static LogNormal estimate(Access1D<?> rawSamples)`
• #### make

```public static LogNormal make(double aExpected,
double aVariance)```
• #### getDensity

`public double getDensity(double value)`
Description copied from interface: `ContinuousDistribution`
In probability theory, a probability density function (pdf), or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point. The probability for the random variable to fall within a particular region is given by the integral of this variable's density over the region. The probability density function is nonnegative everywhere, and its integral over the entire space is equal to one. WikipediA
Parameters:
`value` - x
Returns:
P(x)
• #### getDistribution

`public double getDistribution(double value)`
Description copied from interface: `ContinuousDistribution`
In probability theory and statistics, the cumulative distribution function (CDF), or just distribution function, describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x. Intuitively, it is the "area so far" function of the probability distribution. Cumulative distribution functions are also used to specify the distribution of multivariate random variables. WikipediA
Parameters:
`value` - x
Returns:
P(≤x)
• #### getExpected

`public double getExpected()`
• #### getGeometricMean

`public double getGeometricMean()`
The geometric mean is also the median
• #### getGeometricStandardDeviation

`public double getGeometricStandardDeviation()`
• #### getQuantile

`public double getQuantile(double probability)`
Description copied from interface: `ContinuousDistribution`
The quantile function, for any distribution, is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function. WikipediA The input probability absolutely has to be [0.0, 1.0], but values close to 0.0 and 1.0 may be problematic
Parameters:
`probability` - P(<=x)
Returns:
x
• #### getVariance

`public double getVariance()`
Description copied from class: `RandomNumber`
Subclasses must override either getStandardDeviation() or getVariance()!
Specified by:
`getVariance` in interface `Distribution`
Overrides:
`getVariance` in class `RandomNumber`
`Distribution.getStandardDeviation()`, `Distribution.getVariance()`
• #### setSeed

`public void setSeed(long seed)`
Overrides:
`setSeed` in class `RandomNumber`
• #### generate

`protected double generate()`
• #### getLowerConfidenceQuantile

`public final double getLowerConfidenceQuantile(double confidence)`
• #### getUpperConfidenceQuantile

`public final double getUpperConfidenceQuantile(double confidence)`