Student-t distribution
Story
The story of the Student-t distribution largely derives from its relationships with other distributions. One way to think about it is as like the Normal distribution with heavier tails.
Parameters
The Student-t distribution is symmetrically peaked, and its peak is located at \(\mu\), the location paramter. The peak’s width is dictated by scale parameter \(\sigma\), which is positive. Finally, the shape parameter, called “degrees of freedom,” is \(\nu\). This last parameter imparts the distribution with heavy tails for small \(\nu\).
Support
The Student-t distribution is supported on the set of real numbers.
Probability density function
Moments
Mean: \(\mu\) for \(\nu > 1\), otherwise undefined.
Variance: \(\displaystyle{\frac{\nu}{\nu - 2}}\,\sigma^2\) for \(\nu > 2\). If \(1 < \nu < 2\), then the variance is infinite. If \(\nu \le 1\), the variance is undefined.
Usage
Package |
Syntax |
---|---|
NumPy |
|
SciPy |
|
Stan |
|
Notes
Only the standard Student-t distribution (\(\mu = 0\) and \(\sigma = 1\)) is available in NumPy. You can still draw out of the Student-t distribution by performing a transformation on the samples out of the standard Student-t distribution, as shown in the usage, above.