16.5 Student-T Distribution
16.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} \! . \]
16.5.2 Sampling Statement
y ~
student_t
(nu, mu, sigma)
Increment target log probability density with student_t_lpdf(y | nu, mu, sigma)
dropping constant additive terms.
16.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
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
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
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
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.