statistics v0.5.0 Statistics.Distributions.T
Student’s t distribution.
This distribution is always centered around 0.0 and allows a degrees of freedom parameter.
Link to this section Summary
Link to this section 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(3).(0)
0.4909182507070275
The probability density function
Examples
iex> Statistics.Distributions.T.pdf(3).(0)
0.3675525969478612
iex> Statistics.Distributions.T.pdf(1).(3.2)
0.028319384891796327
The percentile-point function
NOTE: this is very slow due to the current implementation of the CDF
Draw a random number from a t distribution with specified degrees of freedom