pymc.HalfStudentT — PyMC 5.22.0 documentation (original) (raw)
class pymc.HalfStudentT(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#
Half Student’s T distribution.
The pdf of this distribution is
\[f(x \mid \sigma,\nu) = \frac{2\;\Gamma\left(\frac{\nu+1}{2}\right)} {\Gamma\left(\frac{\nu}{2}\right)\sqrt{\nu\pi\sigma^2}} \left(1+\frac{1}{\nu}\frac{x^2}{\sigma^2}\right)^{-\frac{\nu+1}{2}}\]
(Source code, png, hires.png, pdf)
Support | \(x \in [0, \infty)\) |
---|
Parameters:
nutensor_like of float
Degrees of freedom, also known as normality parameter (nu > 0).
sigmatensor_like of float, optional
Scale parameter (sigma > 0). Converges to the standard deviation as nu increases (only required if lam is not specified). Defaults to 1.
lamtensor_like of float, optional
Scale parameter (lam > 0). Converges to the precision as nu increases (only required if sigma is not specified). Defaults to 1.
Examples
Only pass in one of lam or sigma, but not both.
with pm.Model(): x = pm.HalfStudentT("x", sigma=10, nu=10)
with pm.Model(): x = pm.HalfStudentT("x", lam=4, nu=10)
Methods
HalfStudentT.dist(nu[, sigma, lam]) | Create a tensor variable corresponding to the cls distribution. |
---|