16.2 Chi-Square Distribution
16.2.1 Probability Density Function
If ν∈R+, then for y∈R+, ChiSquare(y|ν)=2−ν/2Γ(ν/2)yν/2−1exp(−12y).
16.2.2 Sampling Statement
y ~
chi_square
(nu)
Increment target log probability density with chi_square_lpdf( y | nu)
dropping constant additive terms.
16.2.3 Stan Functions
real
chi_square_lpdf
(reals y | reals nu)
The log of the Chi-square density of y given degrees of freedom nu
real
chi_square_cdf
(reals y, reals nu)
The Chi-square cumulative distribution function of y given degrees of
freedom nu
real
chi_square_lcdf
(reals y | reals nu)
The log of the Chi-square cumulative distribution function of y given
degrees of freedom nu
real
chi_square_lccdf
(reals y | reals nu)
The log of the complementary Chi-square cumulative distribution
function of y given degrees of freedom nu
R
chi_square_rng
(reals nu)
Generate a Chi-square variate with degrees of freedom nu; may only be
used in transformed data and generated quantities blocks.
For a description of argument and return types, see section
vectorized PRNG functions.