# Some Notes on the Cauchy Distribution

**RStudio**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

by Joseph Rickert

I have always been attracted to the capricious. So, it was no surprise that I fell for the Cauchy distribution at first sight. I had never seen such unpredictability! You might say that every distribution has its moments of unpredictability, but the great charm of Cauchy is that it has no moments. (No finite moments, anyway.)

Before discussing why momentlessness (not being in the moment ) leads to unpredictability, let’s derive the Cauchy distribution. A common conceit for doing this is to consider a blindfolded archer trying to hit a target directly in front of him. He randomly shoots towards the wall at an angle *θ* that can sometimes be so large he shoots parallel to the wall!

Where on the wall is any given arrow likely to land? The following diagram maps out the situation.

The archer is standing at the point (0, 0). The point on the wall directly in front of him is (x, 0), and the arrow will land at (x, y), (x, -y), or not at all. After changing to polar coordinates, a moments reflection will give you the equation *y = xtan(θ)*.

Assuming that theta is uniformly distributed on the interval *I = (- π/2, π/2)*, a direct substitution into the equation for the CDF of the uniform distribution will yield the CDF for the Cauchy distribution.

Differentiating this gives the Cauchy density function:

This looks tame, but a short argument showing that the necessary integrals do not converge demonstrates that neither the mean nor the variance exist. Hence, neither the Law of Large Numbers, nor the Central Limit Theorem apply. Taking lots of samples and computing averages doesn’t buy you anything. The averages just don’t settle down. This behavior is apparent in the following simulation that computes means of Cauchy samples for sample sizes of one to five thousand. The plots that show the same data at different scales dramatize the erratic behavior.

Not only don’t the samples converge, it is not that difficult to show that the distribution of the sample mean:

of n independent Cauchy random variables has the same distribution as a single Cauchy random variable! The proof is straightforward. Let *φ(t)* be the characteristic function. Then

which is the characteristic function of nY.

The extreme values that dominate the Cauchy distribution make it the prototypical heavy-tailed distribution. Informally, a distribution is often described as having heavy or “fat” tails if the probability of events in the tails of the distribution are greater than what would be given by a Normal distribution. While there seems to be more than one formal definition of a [heavy-tailed distribution] (https://en.wikipedia.org/wiki/Heavy-tailed_distribution), the following diagram, which compares the right tails of the Normal, Exponential and Cauchy distributions, gets the general idea across.

As exotic as the Cauchy distribution may seem, it is not all that difficult to come face-to-face with the Cauchy Distribution in every-day modeling work. A student t distribution with one degree of freedom is Cauchy, as is the ratio of two independent standard normal random variables.

Additionally, the Cauchy distribution, also called the Breit-Wigner, or Lorentz distribution, has applications in particle physics, spectroscopy, finance, and medicine. In his 2006 JSS paper, Geroge Marsaglia elaborates on early work he did on transforming the ratio of two jointly Normal random variables into something tractable. The original problem arose from an attempt to estimate the intercept in a linear model giving the life span of red blood cells.

The real fun, and maybe the real world, seems to happen when things are not normal.

## Further Reading

The Introduction to Probability with R by Kenneth Baclawski, based on a course he developed with Gian-Carlo Rota, is a delightful introduction to probability theory. The idea of plotting the sample means above comes from Section 5.7 of this book.

For some good reading on heavy-tailed distributions, have a look at the extended presentation on the Fundamentals of Heavy Tails by Nair et al.; Chapter 2 of The Statistical Analysis of Financial Data in R; and Chapter 2 of An Introduction to Heavy-Tailed and Sucexponential Distributions by Foss et al.

For a sophisticated but accessible look at general Stable Distributions, have a look at this recent paper on Stable Distributions, by John Nolan.

**leave a comment**for the author, please follow the link and comment on their blog:

**RStudio**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.