## 20.4 Scaled inverse chi-square distribution

### 20.4.1 Probability density function

If $$\nu \in \mathbb{R}^+$$ and $$\sigma \in \mathbb{R}^+$$, then for $$y \in \mathbb{R}^+$$, $\text{ScaledInvChiSquare}(y|\nu,\sigma) = \frac{(\nu / 2)^{\nu/2}} {\Gamma(\nu / 2)} \, \sigma^{\nu} \, y^{-(\nu/2 + 1)} \, \exp \! \left( \! - \, \frac{1}{2} \, \nu \, \sigma^2 \, \frac{1}{y} \right) .$

### 20.4.2 Sampling statement

y ~ scaled_inv_chi_square(nu, sigma)

Increment target log probability density with scaled_inv_chi_square_lupdf(y | nu, sigma).
Available since 2.0

### 20.4.3 Stan functions

real scaled_inv_chi_square_lpdf(reals y | reals nu, reals sigma)
The log of the scaled inverse Chi-square density of y given degrees of freedom nu and scale sigma
Available since 2.12

real scaled_inv_chi_square_lupdf(reals y | reals nu, reals sigma)
The log of the scaled inverse Chi-square density of y given degrees of freedom nu and scale sigma dropping constant additive terms
Available since 2.25

real scaled_inv_chi_square_cdf(reals y, reals nu, reals sigma)
The scaled inverse Chi-square cumulative distribution function of y given degrees of freedom nu and scale sigma
Available since 2.0

real scaled_inv_chi_square_lcdf(reals y | reals nu, reals sigma)
The log of the scaled inverse Chi-square cumulative distribution function of y given degrees of freedom nu and scale sigma
Available since 2.12

real scaled_inv_chi_square_lccdf(reals y | reals nu, reals sigma)
The log of the scaled inverse Chi-square complementary cumulative distribution function of y given degrees of freedom nu and scale sigma
Available since 2.12

R scaled_inv_chi_square_rng(reals nu, reals sigma)
Generate a scaled inverse Chi-squared variate with degrees of freedom nu 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