This is an old version, view current version.

18.5 Student-t distribution

18.5.1 Probability density function

If νR+, μR, and σR+, then for yR, StudentT(y|ν,μ,σ)=Γ((ν+1)/2)Γ(ν/2) 1νπ σ (1+1ν(yμσ)2)(ν+1)/2.

18.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

18.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