# Cauchy distribution

## Story

The intercept on the x-axis of a beam of light coming from the point $$(\mu, \sigma)$$ is Cauchy distributed. This story is popular in physics, but is not particularly useful. You can think of it as a peaked distribution with enormously heavy tails.

## Parameters

The Cauchy distribution is peaked, and its peak is located at $$\mu$$, its location parameter, which may take on any real value. The peak’s width is dictated by a positive scale parameter $$\sigma$$.

## Support

The Cauchy distribution is supported on the set of real numbers.

## Probability density function

\begin{align} f(y;\mu,\sigma) = \frac{1}{\pi \sigma}\,\frac{1}{1 + (y-\mu)^2/\sigma^2}. \end{align}

## Moments

Mean: Undefined

Variance: Undefined

## Usage

Package

Syntax

NumPy

mu + sigma * rg.standard_cauchy()

SciPy

scipy.stats.cauchy(mu, sigma)

Stan

cauchy(mu, sigma)

## Notes

• The numpy.random module only has the Standard Cauchy distribution ($$\mu=0$$ and $$\sigma=1$$), but you can draw out of a Cauchy distribution using the transformation shown in the NumPy usage above.

• The Cauchy distribution has extremely heavy tails, so heavy that no moments are defined.