What is the Cauchy distribution?
The Cauchy distribution (also called the Lorentz or Cauchy-Lorentz distribution) is a continuous probability distribution defined by two parameters: a location parameter \(x_0\), which is the peak and median of the curve, and a positive scale parameter \(\gamma\), which is the half-width at half-maximum. It is famous for its heavy tails: unlike the normal distribution, the Cauchy distribution has no defined mean or variance. The standard (canonical) Cauchy distribution uses \(x_0 = 0\) and \(\gamma = 1\), and is identical to a Student's t-distribution with one degree of freedom. This calculator is pure mathematics and applies identically everywhere.
How to use this calculator
Enter the percentile point \(x\) at which you want to evaluate the distribution, the location parameter \(x_0\), and the scale parameter \(\gamma\) (which must be greater than zero). The calculator returns the probability density \(f(x)\), the lower cumulative probability \(P(X \le x)\), and the upper cumulative probability \(P(X > x)\). For the standard Cauchy distribution leave \(x_0 = 0\) and \(\gamma = 1\).
The formula explained
First define the standardized value \(z = (x - x_0) / \gamma\). The probability density is $$f(x) = \frac{1}{\pi \cdot \gamma \cdot (1 + z^2)},$$ which is equivalent to $$f(x) = \frac{\gamma}{\pi\left[\left(x - x_0\right)^2 + \gamma^2\right]}.$$ The cumulative distribution function is $$F(x) = \frac{1}{2} + \frac{1}{\pi}\arctan(z),$$ giving the lower cumulative probability, and the upper cumulative probability is simply \(1 - F(x)\). Because arctan returns values in \((-\pi/2, \pi/2)\), the cumulative probability always lies strictly between 0 and 1.
Worked example
Take \(x = 1\), \(x_0 = 0\), \(\gamma = 1\). Then \(z = 1\). The density is $$f(x) = \frac{1}{\pi \cdot 2} = 0.159155.$$ \(\arctan(1) = 0.785398\), so the lower cumulative probability is $$\frac{1}{2} + \frac{1}{\pi} \cdot 0.785398 = 0.75,$$ and the upper cumulative probability is \(0.25\).
FAQ
Why are the mean and variance not reported? The Cauchy distribution has tails so heavy that its mean and variance are mathematically undefined, so reporting them would be meaningless.
What does the peak look like? At \(x = x_0\) the density is at its maximum value of \(1 / (\pi \cdot \gamma)\), and both cumulative probabilities equal \(0.5\).
What if gamma is zero or negative? The scale parameter must be strictly positive; a non-positive \(\gamma\) makes the distribution undefined and is rejected.