What is the Cauchy distribution?
The Cauchy distribution, also called the Lorentz distribution, is a continuous probability distribution defined by a location parameter a (the median and peak position) and a scale parameter b > 0 (the half-width at half-maximum). It is famous for its heavy tails: it has no finite mean and no finite variance. This calculator evaluates the distribution over a sequence of x values so you can build a plot-ready table of (x, value) pairs.
How to use this calculator
Pick a function: probability density f, lower cumulative probability P, or upper cumulative probability Q. Enter the location a and scale b (must be positive). Then define the x sequence with an initial value, a step increment, and the number of points. The k-th x is x_k = xInitial + k * xStep for k = 0 to count-1. The defaults sweep x from -5 to +5 in steps of 0.1 (101 points).
The formulas
Let \(z = (x - a) / b\). The density is $$f = \frac{1}{\pi} \cdot \frac{b}{(x-a)^2 + b^2},$$ equivalently \(\frac{1}{\pi b (1 + z^2)}\). The lower cumulative distribution is $$P = \frac{1}{2} + \frac{1}{\pi}\arctan(z),$$ and the upper (survival) function is $$Q = 1 - P = \frac{1}{2} - \frac{1}{\pi}\arctan(z).$$ Because arctan stays within \((-\pi/2, \pi/2)\), both P and Q remain strictly between 0 and 1.
Worked example
With \(a = 0\), \(b = 0.7\), evaluate density at \(x = 1\): \((x-a)^2 + b^2 = 1 + 0.49 = 1.49\), so $$f = \frac{1}{\pi}\left(\frac{0.7}{1.49}\right) \approx 0.14954.$$ For the lower cumulative at the same point, \(\arctan(1/0.7) = 0.96007\), so $$P = 0.5 + \frac{0.96007}{\pi} \approx 0.80559,$$ and \(Q = 1 - 0.80559 = 0.19441\). At the peak \(x = a\), \(f = \frac{1}{\pi b}\) and \(P = Q = 0.5\).
Standard Cauchy Reference Values (a = 0, b = 1)
For the standard Cauchy distribution (location \(a=0\), scale \(b=1\)) the density, lower cumulative probability P and upper cumulative probability Q at a point z are:
$$f(z)=\frac{1}{\pi(1+z^2)},\qquad P(z)=\frac12+\frac{\arctan z}{\pi},\qquad Q(z)=1-P(z)$$
| z | f(z) | P(z) | Q(z) |
|---|---|---|---|
| -3 | 0.03183 | 0.10242 | 0.89758 |
| -2 | 0.06366 | 0.14758 | 0.85242 |
| -1 | 0.15915 | 0.25000 | 0.75000 |
| 0 | 0.31831 | 0.50000 | 0.50000 |
| 1 | 0.15915 | 0.75000 | 0.25000 |
| 2 | 0.06366 | 0.85242 | 0.14758 |
| 3 | 0.03183 | 0.89758 | 0.10242 |
For a general Cauchy distribution, use \(z=(x-a)/b\) for P and Q, and divide the standard density by b to get \(f(x)\). The quartiles sit at \(x=a-b\) (P = 0.25) and \(x=a+b\) (P = 0.75), and the median is \(x=a\) (P = 0.5).
Interpreting the Curve and Table
- Location a sets the position of the peak. It is also the median and the mode.
- Scale b is the half-width at half-maximum: the density falls to half its peak value at \(x=a\pm b\). The interquartile range equals \(2b\).
- Peak height is \(f(a)=\dfrac{1}{\pi b}\). A larger b gives a lower, wider curve, and a smaller b gives a taller, narrower one. The area under the curve always stays 1.
- Heavy tails: for large \(|x-a|\) the density behaves like \(b/(\pi (x-a)^2)\), so the upper tail is about \(Q(x)\approx \dfrac{b}{\pi (x-a)}\). For example, in the standard case \(Q(10)\approx 0.0317\). A normal distribution would put almost nothing there, so in a Cauchy table P and Q approach 1 and 0 only slowly.
- Symmetry: the curve is symmetric about \(x=a\), so Q at \(a+d\) equals P at \(a-d\). The Q column is the mirror image of the P column about \(x=a\).
The ratio of two independent standard normal variables follows a standard Cauchy distribution. The Cauchy distribution has no mean and no variance, because the defining integrals diverge. As a result, the sample mean of Cauchy data does not converge as the sample grows: the mean of n observations has the same Cauchy distribution as a single observation. Use the median and the scale b (a robust measure of spread) to describe such data, not the mean and standard deviation.
FAQ
Why must b be positive? A non-positive scale makes the density and CDF undefined (zero or negative width), so the calculator clamps b to a tiny positive value.
Why is there no mean shown? The Cauchy distribution has undefined mean and variance due to its heavy tails; this tool only reports pointwise density and tail probabilities.
What is the "value" column? It is the chosen function (f, P, or Q) evaluated at each x, ready to plot with x on the horizontal axis.