20.4.14 Cauchy distribution
The probability density function for the Cauchy distribution.
The cauchy
(or cauchyd) command computes the
probability density function for the Cauchy distribution (sometimes
called the Lorentz distribution).
-
cauchy takes two optional arguments and one
mandatory argument:
-
Optionally, a and b, real numbers (the parameters; by
default a=0 and b=1).
- x, a real number.
- cauchy(⟨ a,b,⟩ x) returns
the value of the density function at x, namely
b/π/(x−a)2+b2.
Examples
The cumulative distribution function for the Cauchy distribution.
The cauchy_cdf
(or cauchyd_cdf)
command computes the cumulative distribution function for the Cauchy distribution.
-
cauchy_cdf (or cauchyd_cdf) takes three
optional arguments and one mandatory argument:
-
Optionally, a and b, the parameters
(by default, a=0 and b=1).
- x, a real number.
- Optionally, y, a real number.
- cauchy_cdf(⟨ a,b,⟩ x) returns
Prob(X ≤ x) for the Cauchy distribution with parameters
a and b.
- cauchy_cdf(⟨ a,b,⟩ x,y) returns
Prob(x ≤ X ≤ y).
It turns out that cauchy_cdf(a,b,x)=1/2+1/πarctanx−a/b.
Examples
The inverse distribution function for the Cauchy distribution.
The cauchy_icdf
(or cauchyd_icdf)
command computes the inverse distribution for the Cauchy distribution.
-
cauchy_icdf (or cauchyd_icdf) takes two
optional arguments and one mandatory argument:
-
Optionally, a and b, parameters
(by default, a=0 and b=1).
- h, a real number between 0 and 1.
- cauchy_icdf([a,b,] h) returns the inverse
distribution for the Cauchy distribution with parameters a and
b; namely, the value of x for which
Prob(X ≤ x)=h.
Example