LogNormalDistribution<T>
Models & Types · AiDotNet.Distributions
Represents a Log-Normal probability distribution.
Inheritance: DistributionBase<T> → LogNormalDistribution<T>
For Beginners
If you take the natural log of values from a Log-Normal distribution, you get a Normal distribution. This is useful for data that’s always positive and tends to be right-skewed (long tail on the right). Think of things that grow by percentages, like investment returns or biological growth.
How It Works
The Log-Normal distribution is used for modeling positive-valued data where the logarithm of the variable follows a Normal distribution. Common applications include stock prices, income distributions, and particle sizes.
PDF: f(x) = (1 / (xσ√(2π))) * exp(-(ln(x) - μ)² / (2σ²)) for x > 0
Constructors
| Constructor | Summary |
|---|---|
LogNormalDistribution() |
Initializes a standard Log-Normal distribution (μ=0, σ=1). |
LogNormalDistribution(T mu, T sigma) |
Initializes a new Log-Normal distribution. |
Properties
| Property | Summary |
|---|---|
T Mean { get; } |
|
T Mu { get; } |
Gets the mu parameter (mean of log(X)). |
T Sigma { get; } |
Gets the sigma parameter (std dev of log(X)). |
T Variance { get; } |
|
Vector<T> Parameters { get; set; } |
|
int NumParameters { get; } |
|
string[] ParameterNames { get; } |
Methods
| Method | Summary |
|---|---|
IParametricDistribution<T> Clone() |
|
LogNormalDistribution<T> FromMeanVariance(T mean, T variance) |
Creates a Log-Normal distribution from the desired mean and variance of X (not log(X)). |
Matrix<T> FisherInformation() |
|
T Cdf(T x) |
|
T InverseCdf(T p) |
|
T LogPdf(T x) |
|
T Pdf(T x) |
|
T Sample(Random random) |
|
Vector<T> GradLogPdf(T x) |