15.6 Cauchy Distribution

15.6.1 Probability Density Function

If \(\mu \in \mathbb{R}\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}\), \[ \text{Cauchy}(y|\mu,\sigma) = \frac{1}{\pi \sigma} \ \frac{1}{1 + \left((y - \mu)/\sigma\right)^2} . \]

15.6.2 Sampling Statement

y ~ cauchy(mu, sigma)

Increment target log probability density with cauchy_lpdf( y | mu, sigma) dropping constant additive terms.

15.6.3 Stan Functions

real cauchy_lpdf(reals y | reals mu, reals sigma)
The log of the Cauchy density of y given location mu and scale sigma

real cauchy_cdf(reals y, reals mu, reals sigma)
The Cauchy cumulative distribution function of y given location mu and scale sigma

real cauchy_lcdf(reals y | reals mu, reals sigma)
The log of the Cauchy cumulative distribution function of y given location mu and scale sigma

real cauchy_lccdf(reals y | reals mu, reals sigma)
The log of the Cauchy complementary cumulative distribution function of y given location mu and scale sigma

R cauchy_rng(reals mu, reals sigma)
Generate a Cauchy variate with location mu and scale sigma; may only be used in generated quantities block. For a description of argument and return types, see section vectorized PRNG functions.