7.4.12  The Cauchy distribution

The probability density function for the Cauchy distribution: cauchycauchyd

The probability density function of the Cauchy distribution (sometimes called the Lorentz distribution) is given by the cauchy (or cauchyd) command. The Cauchy distribution depends on two parameters a and b, and the value of the density function at x is cauchy(a,b,x) = b/(π ((xa)2 + b2)). If you enter

cauchy(2.2,1.5,0.8)

you will get

0.113412073462

If you leave out the parameters a and b, they will default to 0 and 1, respectively; cauchy(x) = 1/(π (x2 + 1)). If you enter

cauchy(0.3)

you will get

0.292027418517

The cumulative distribution function for the Cauchy distribution: cauchy_cdfcauchyd_cdf

The command cauchy_cdf (or cauchyd_cdf) computes the cumulative distribution function for the Cauchy distribution. Like cauchy, you can give it the parameters a and b, or let them default to 0 and 1. The Cauchy cumulative distribution function is given by the formula cauchy_cdf(a,b,x) = 1/2 + arctan((xa)/b)/π. If you enter

cauchy_cdf(2,3,1.4)

you will get

0.437167041811

and if you enter

cauchy_cdf(1.4)

you will get

0.802568456711

If you give cauchy_cdf an extra argument (with or without the parameters), you will get the probability that the random variable lies between two values; cauchy_cdf(a,b,x,y) = Prob(xXy). If you enter

cauchy_cdf(2,3,-1.9,1.4)

you will get

0.228452641651

The inverse distribution function for the Cauchy distribution: cauchy_icdfcauchyd_icdf

Given a value h, the inverse distribution function gives the value of x with Prob(Xx) = h. The cauchy_icdf will compute the inverse distribution for the Cauchy distribution. (If no parameters are given, they will be assumed to be 0 and 1.) If you enter

cauchy_icdf(2,3,0.23)

you will get

-1.40283204777