17.5 Student-t distribution
17.5.1 Probability density function
If \(\nu \in \mathbb{R}^+\), \(\mu \in \mathbb{R}\), and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}\), \[ \text{StudentT}(y|\nu,\mu,\sigma) = \frac{\Gamma\left((\nu + 1)/2\right)} {\Gamma(\nu/2)} \ \frac{1}{\sqrt{\nu \pi} \ \sigma} \ \left( 1 + \frac{1}{\nu} \left(\frac{y - \mu}{\sigma}\right)^2 \right)^{-(\nu + 1)/2} \! . \]
17.5.2 Sampling statement
y ~
student_t
(nu, mu, sigma)
Increment target log probability density with student_t_lupdf(y | nu, mu, sigma)
.
Available since 2.0
17.5.3 Stan functions
real
student_t_lpdf
(reals y | reals nu, reals mu, reals sigma)
The log of the Student-\(t\) density of y given degrees of freedom nu,
location mu, and scale sigma
Available since 2.12
real
student_t_lupdf
(reals y | reals nu, reals mu, reals sigma)
The log of the Student-\(t\) density of y given degrees of freedom nu,
location mu, and scale sigma dropping constant additive terms
Available since 2.25
real
student_t_cdf
(reals y, reals nu, reals mu, reals sigma)
The Student-\(t\) cumulative distribution function of y given degrees of
freedom nu, location mu, and scale sigma
Available since 2.0
real
student_t_lcdf
(reals y | reals nu, reals mu, reals sigma)
The log of the Student-\(t\) cumulative distribution function of y given
degrees of freedom nu, location mu, and scale sigma
Available since 2.12
real
student_t_lccdf
(reals y | reals nu, reals mu, reals sigma)
The log of the Student-\(t\) complementary cumulative distribution
function of y given degrees of freedom nu, location mu, and scale
sigma
Available since 2.12
R
student_t_rng
(reals nu, reals mu, reals sigma)
Generate a Student-\(t\) variate with degrees of freedom nu, location
mu, and scale sigma; may only be used in transformed data and generated
quantities blocks. For a description of argument and return types, see section
vectorized PRNG functions.
Available since 2.18