19.6 Cauchy distribution
19.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} . \]
19.6.2 Sampling statement
y ~
cauchy
(mu, sigma)
Increment target log probability density with cauchy_lupdf(y | mu, sigma)
.
Available since 2.0
19.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
Available since 2.12
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
Available since 2.25
real
cauchy_cdf
(reals y, reals mu, reals sigma)
The Cauchy cumulative distribution function of y given location mu and
scale sigma
Available since 2.0
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
Available since 2.12
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
Available since 2.12
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.
Available since 2.18