Sun 28 August 2016

Deriving the Cauchy density function

Written by Hongjinn Park in Articles

Let $X$ and $Y$ be independent standard Normal RVs then $\frac{X}{Y}$ has a Cauchy distribution. Note that if $T = \frac{X}{Y}$ then $1/T$ also has a Cauchy distribution by symmetry.


Deriving the pdf

Let's do this by finding the cdf and taking the derivative.

$$F_{\frac{X}{Y}}(t) = P \left( \frac{X}{Y} \le t \right) = P \left( \frac{X}{|Y|} \le t \right) $$

where the absolute value can be added due to symmetry. We want the absolute value because $Y$ can be negative and we have to be careful when we multiply both sides because the inequality can switch. So

$$= P \left( X \le |Y|t \right) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-y^2/2} \left( \int_{-\infty}^{|y|t} \frac{1}{\sqrt{2\pi}} e^{-x^2/2}dx \right) \, dy = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-y^2/2} \, \Phi(|y|t) \, dy$$

Note that $f(-y)=f(y)$ and so the function is symmetric and since we are now integrating over positive $y$ we can get rid of the absolute value. This gives us

$$= \frac{2}{\sqrt{2\pi}} \int_{0}^\infty e^{-y^2/2} \, \Phi(yt) \, dy$$

The above is the cdf of a Cauchy RV so we can take the derivative with respect to $t$ to get the pdf.

$$f_{\frac{X}{Y}}(t) = \frac{d}{dt} F_{\frac{X}{Y}}(t) = \frac{2}{\sqrt{2\pi}} \int_{0}^\infty e^{-y^2/2} \, \frac{d}{dt} \Phi(yt) \, dy = \frac{2}{\sqrt{2\pi}} \int_{0}^\infty e^{-y^2/2} y f(yt) \, dy $$

Above we interchanged the integral and $\frac{d}{dt}$ which you can do for "well behaved" functions (Leibniz integral rule). We also used chain rule for the derivative.

$$= \frac{2}{\sqrt{2\pi}} \frac{1}{\sqrt{2\pi}} \int_{0}^\infty e^{-y^2/2} y e^{-y^2t^2/2} \, dy = \frac{1}{\pi} \int_{0}^\infty e^{-y^2(1+t^2)/2} y \, dy $$

To calculate the integral use substitution

$\quad u = y^2(1+t^2)/2$ $\quad du = y(1+t^2) \, dy$ $$= \frac{1}{\pi(1+t^2)} \int_{0}^\infty e^{-u} \, du = \frac{1}{\pi (1+t^2)} = f_{\frac{X}{Y}}(t)$$

for all $t$ is the pdf of a Cauchy RV.



Articles

Personal notes I've written over the years.