StudentTDistribution<T>
Models & Types · AiDotNet.Distributions
Represents a Student’s t probability distribution.
Inheritance: DistributionBase<T> → StudentTDistribution<T>
For Beginners
The t-distribution is like a “wider” version of the Normal distribution. It’s more spread out, especially in the tails, which makes it useful when you’re less certain about your data (like with small samples). As you get more data, it becomes more like a Normal. With 30+ degrees of freedom, it’s practically identical to Normal.
How It Works
The Student’s t distribution is used when estimating the mean of a normally distributed population when the sample size is small and the population standard deviation is unknown. It has heavier tails than the Normal distribution, approaching Normal as degrees of freedom increase.
PDF: f(x) = Γ((ν+1)/2) / (√(νπ) Γ(ν/2)) * (1 + (x-μ)²/(νσ²))^(-(ν+1)/2)
Constructors
| Constructor | Summary |
|---|---|
StudentTDistribution(T degreesOfFreedom) |
Initializes a standard Student’s t distribution with given degrees of freedom. |
StudentTDistribution(T location, T scale, T degreesOfFreedom) |
Initializes a new Student’s t distribution. |
Properties
| Property | Summary |
|---|---|
T DegreesOfFreedom { get; } |
Gets the degrees of freedom. |
T Location { get; } |
Gets the location parameter. |
T Mean { get; } |
|
T Scale { get; } |
Gets the scale parameter. |
T Variance { get; } |
|
Vector<T> Parameters { get; set; } |
|
int NumParameters { get; } |
|
string[] ParameterNames { get; } |
Methods
| Method | Summary |
|---|---|
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) |