Continuous distribution · also called Lorentz

Cauchy distribution

The ratio of two independent standard normals, or where a beam from a spinning lighthouse hits a straight shore. Its tails are so heavy that it has no mean or variance, and the average of Cauchy draws is exactly as spread out as one draw, so the law of large numbers fails. It is with one degree of freedom, and physicists know it as the Lorentzian line shape.

Cauchy probability calculator

P(X ≤ 0) = 0.5

At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.

PDF

00.10.20.3−505f(x)

CDF

00.250.50.751−505F(x)

mean undefined · variance undefined · mode 0 · entropy 2.531 nats

Formulas

Parameters
  • , the location (median)
  • , the scale (half the interquartile range)
Support
PDF
CDF
Mean
Variance
Mode
MGF
Entropy

Worked example

For a standard Cauchy variable, what is ? Compare it with the normal.

, about 75 times the standard normal's 0.00135. answer checked by code

How it relates to others

All the relationships, as a diagram →

In Python

from scipy import stats
import numpy as np

X = stats.cauchy(loc=0, scale=1)
X.pdf(1)  # f(1) = 0.1592
X.cdf(1)  # P(X ≤ 1) = 0.75
X.mean(), X.var()  # undefined, undefined
X.ppf(0.95)  # 95th percentile
X.rvs(size=10, random_state=0)

rng = np.random.default_rng(0)
0 + 1 * rng.standard_cauchy(size=10)

Choosing between this and its neighbours? Which distribution for extremes and heavy tails?

← FHalf-Cauchy →