Statistics.Distributions.T
Student’s t distribution.
This distribution is always centered around 0.0 and allows a degrees of freedom parameter.
Summary
cdf(x, df) | The cumulative density function |
pdf(x, df) | The probability density function |
ppf(x, df) | The percentile-point function |
rand(df) | Draw a random number from a t distribution with specified degrees of freedom |
Functions
The cumulative density function
NOTE: this currently uses the very slow Simpson’s Rule to execute
a numerical integration of the pdf
function to approximate
the CDF. This leads to a trade-off between precision and speed.
A robust implementation of the 2F1 hypergeometric function is required to properly calculate the CDF of the t distribution.
Examples
iex> Statistics.Distributions.T.cdf(0, 3)
0.4909182507070275
The probability density function
Examples
iex> Statistics.Distributions.T.pdf(0, 3)
0.3675525969478612
iex> Statistics.Distributions.T.pdf(3.2, 1)
0.028319384891796327
The percentile-point function
NOTE: this is very slow due to the current implementation of the CDF