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/(π ((x−a)2 + b2)). If you enter
you will get
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
you will get
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((x−a)/b)/π. If you enter
you will get
and if you enter
you will get
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(x ≤ X ≤ y). If you enter
you will get
Given a value h, the inverse distribution function gives the value of x with Prob(X ≤ x) = 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
you will get