#### 52.2.17 Cauchy Random Variable

The Cauchy distribution (also known as the Lorentz distribution) is the distribution of of the ratio of two independent normally distributed random variables with mean zero.

Note that the mean, variance, standard deviation, skewness coefficient, and kurtosis coefficient are all undefined for the Cauchy distribution. The integrals do not converge in this case.

Function: pdf_cauchy (x,a,b)

  Returns the value at x of the density function of a \({\it Cauchy}(a,b)\) random variable, with b>0. To make use of this function, write first `load("distrib")`.

  The pdf is $$ f(x; a, b) = {b\over \pi\left((x-a)^2+b^2\right)} $$

  Categories:Package distrib ·

Function: cdf_cauchy (x,a,b)

  Returns the value at x of the distribution function of a \({\it Cauchy}(a,b)\) random variable, with b>0. To make use of this function, write first `load("distrib")`.

  The cdf is $$ F(x; a, b) = {1\over 2} + {1\over \pi} \tan^{-1} {x-a\over b} $$

  Categories:Package distrib ·

Function: quantile_cauchy (q,a,b)

  Returns the q-quantile of a \({\it Cauchy}(a,b)\) random variable, with b>0; in other words, this is the inverse of `cdf_cauchy`. Argument q must be an element of [0,1]. To make use of this function, write first `load("distrib")`.

  Categories:Package distrib ·

Function: random_cauchy (a,b)
`random_cauchy` (a,b,n)

  Returns a \({\it Cauchy}(a,b)\) random variate, with b>0. Calling `random_cauchy` with a third argument n, a random sample of size n will be simulated.

  The implemented algorithm is based on the general inverse method.

  To make use of this function, write first `load("distrib")`.

  Categories:Package distrib ·Random numbers ·