NormalDistribution<T>
Models & Types · AiDotNet.Distributions
Represents a Normal (Gaussian) probability distribution.
Inheritance: DistributionBase<T> → NormalDistribution<T>
For Beginners
The Normal distribution describes many natural phenomena like heights, test scores, and measurement errors. Most values cluster around the mean, with fewer values as you move away from the center. About 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three.
How It Works
The Normal distribution is the most common probability distribution, characterized by its bell-shaped curve. It is defined by two parameters: mean (μ) and variance (σ²).
PDF: f(x) = (1 / √(2πσ²)) * exp(-(x - μ)² / (2σ²))
Constructors
| Constructor | Summary |
|---|---|
NormalDistribution() |
Initializes a standard Normal distribution (mean=0, variance=1). |
NormalDistribution(T mean, T variance) |
Initializes a new Normal distribution with specified mean and variance. |
Properties
| Property | Summary |
|---|---|
T Mean { get; } |
|
T Variance { get; } |
|
Vector<T> Parameters { get; set; } |
|
int NumParameters { get; } |
|
string[] ParameterNames { get; } |
Methods
| Method | Summary |
|---|---|
IParametricDistribution<T> Clone() |
|
Matrix<T> FisherInformation() |
|
NormalDistribution<T> FromMeanStdDev(T mean, T stdDev) |
Creates a Normal distribution from mean and standard deviation. |
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) |