## Types in MathNet.Numerics.Distributions

Type LogNormal

Namespace MathNet.Numerics.Distributions

Interfaces IContinuousDistribution

Continuous Univariate Log-Normal distribution. For details about this distribution, see.

### Public Constructors

#### LogNormal(double mu, double sigma, Random randomSource)

Initializes a new instance of the LogNormal class. The distribution will be initialized with the default random number generator.
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `Random` randomSource

The random number generator which is used to draw random samples.

#### LogNormal(double mu, double sigma)

Initializes a new instance of the LogNormal class. The distribution will be initialized with the default random number generator.
##### Parameters
###### `double` mu

The log-scale (μ) of the logarithm of the distribution.

###### `double` sigma

The shape (σ) of the logarithm of the distribution. Range: σ ≥ 0.

### Public Static Functions

#### doubleCDF(double mu, double sigma, double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
MATLAB: logncdf
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `double` x

The location at which to compute the cumulative distribution function.

##### Return
###### `double`

the cumulative distribution at location x.

#### LogNormalEstimate(IEnumerable<double> samples, Random randomSource)

Estimates the log-normal distribution parameters from sample data with maximum-likelihood.
MATLAB: lognfit
##### Parameters
###### `IEnumerable<double>` samples

The samples to estimate the distribution parameters from.

###### `Random` randomSource

The random number generator which is used to draw random samples. Optional, can be null.

##### Return
###### `LogNormal`

A log-normal distribution.

#### doubleInvCDF(double mu, double sigma, double p)

Computes the inverse of the cumulative distribution function (InvCDF) for the distribution at the given probability. This is also known as the quantile or percent point function.
MATLAB: logninv
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `double` p

The location at which to compute the inverse cumulative density.

##### Return
###### `double`

the inverse cumulative density at p.

#### boolIsValidParameterSet(double mu, double sigma)

Tests whether the provided values are valid parameters for this distribution.
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

#### doublePDF(double mu, double sigma, double x)

Computes the probability density of the distribution (PDF) at x, i.e. ∂P(X ≤ x)/∂x.
MATLAB: lognpdf
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `double` x

The location at which to compute the density.

##### Return
###### `double`

the density at x.

#### doublePDFLn(double mu, double sigma, double x)

Computes the log probability density of the distribution (lnPDF) at x, i.e. ln(∂P(X ≤ x)/∂x).
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `double` x

The location at which to compute the density.

##### Return
###### `double`

the log density at x.

#### doubleSample(Random rnd, double mu, double sigma)

Generates a sample from the log-normal distribution using the algorithm.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `double`

a sample from the distribution.

#### doubleSample(double mu, double sigma)

Generates a sample from the log-normal distribution using the algorithm.
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `double`

a sample from the distribution.

#### IEnumerable<double>Samples(Random rnd, double mu, double sigma)

Generates a sequence of samples from the log-normal distribution using the algorithm.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `IEnumerable<double>`

a sequence of samples from the distribution.

#### voidSamples(Random rnd, Double[] values, double mu, double sigma)

Fills an array with samples generated from the distribution.
##### Parameters
###### `Random` rnd

The random number generator to use.

###### `Double[]` values

The array to fill with the samples.

###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `void`

a sequence of samples from the distribution.

#### IEnumerable<double>Samples(double mu, double sigma)

Generates a sequence of samples from the log-normal distribution using the algorithm.
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `IEnumerable<double>`

a sequence of samples from the distribution.

#### voidSamples(Double[] values, double mu, double sigma)

Fills an array with samples generated from the distribution.
##### Parameters
###### `Double[]` values

The array to fill with the samples.

###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

##### Return
###### `void`

a sequence of samples from the distribution.

#### LogNormalWithMeanVariance(double mean, double var, Random randomSource)

Constructs a log-normal distribution with the desired mean and variance.
##### Parameters
###### `double` mean

The mean of the log-normal distribution.

###### `double` var

The variance of the log-normal distribution.

###### `Random` randomSource

The random number generator which is used to draw random samples. Optional, can be null.

##### Return
###### `LogNormal`

A log-normal distribution.

#### LogNormalWithMuSigma(double mu, double sigma, Random randomSource)

Constructs a log-normal distribution with the desired mu and sigma parameters.
##### Parameters
###### `double` mu

The log-scale (μ) of the distribution.

###### `double` sigma

The shape (σ) of the distribution. Range: σ ≥ 0.

###### `Random` randomSource

The random number generator which is used to draw random samples. Optional, can be null.

##### Return
###### `LogNormal`

A log-normal distribution.

### Public Methods

#### doubleCumulativeDistribution(double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
##### Parameters
###### `double` x

The location at which to compute the cumulative distribution function.

##### Return
###### `double`

the cumulative distribution at location x.

#### doubleDensity(double x)

Computes the probability density of the distribution (PDF) at x, i.e. ∂P(X ≤ x)/∂x.
##### Parameters
###### `double` x

The location at which to compute the density.

##### Return
###### `double`

the density at x.

#### doubleDensityLn(double x)

Computes the log probability density of the distribution (lnPDF) at x, i.e. ln(∂P(X ≤ x)/∂x).
##### Parameters
###### `double` x

The location at which to compute the log density.

##### Return
###### `double`

the log density at x.

#### doubleInverseCumulativeDistribution(double p)

Computes the inverse of the cumulative distribution function (InvCDF) for the distribution at the given probability. This is also known as the quantile or percent point function.
##### Parameters
###### `double` p

The location at which to compute the inverse cumulative density.

##### Return
###### `double`

the inverse cumulative density at p.

#### doubleSample()

Generates a sample from the log-normal distribution using the algorithm.
##### Return
###### `double`

a sample from the distribution.

#### voidSamples(Double[] values)

Fills an array with samples generated from the distribution.

#### IEnumerable<double>Samples()

Generates a sequence of samples from the log-normal distribution using the algorithm.
##### Return
###### `IEnumerable<double>`

a sequence of samples from the distribution.

#### stringToString()

A string representation of the distribution.
##### Return
###### `string`

a string representation of the distribution.

### Public Properties

#### doubleEntropy get;

Gets the entropy of the log-normal distribution.

#### doubleMaximum get;

Gets the maximum of the log-normal distribution.

#### doubleMean get;

Gets the mu of the log-normal distribution.

#### doubleMedian get;

Gets the median of the log-normal distribution.

#### doubleMinimum get;

Gets the minimum of the log-normal distribution.

#### doubleMode get;

Gets the mode of the log-normal distribution.

#### doubleMu get;

Gets the log-scale (μ) (mean of the logarithm) of the distribution.

#### RandomRandomSource get; set;

Gets or sets the random number generator which is used to draw random samples.

#### doubleSigma get;

Gets the shape (σ) (standard deviation of the logarithm) of the distribution. Range: σ ≥ 0.

#### doubleSkewness get;

Gets the skewness of the log-normal distribution.

#### doubleStdDev get;

Gets the standard deviation of the log-normal distribution.

#### doubleVariance get;

Gets the variance of the log-normal distribution.