16.6 Cauchy Distribution
16.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} . \]
16.6.2 Sampling Statement
y ~
cauchy
(mu, sigma)
Increment target log probability density with cauchy_lupdf(y | mu, sigma)
.
16.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_lupdf
(reals y | reals mu, reals sigma)
The log of the Cauchy density of y given location mu and scale sigma
dropping constant additive terms
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 transformed data and generated quantities blocks.
For a description of argument and return types, see section
vectorized PRNG functions.