9.4.14 The Cauchy distribution
The probability density function for the Cauchy distribution: cauchy cauchyd
The cauchy (or cauchyd) command computes the
probability density function for the Cauchy distribution (sometimes
called the Lorentz distribution).
-
cauchy takes two optionaly 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,
cauchy(a,b,x) = b/(π ((x−a)2 + b2)).
Examples.
-
Input:
cauchy(2.2,1.5,0.8)
Output:
- Input:
cauchy(0.3)
Output:
The cumulative distribution function for the Cauchy distribution: cauchy_cdf cauchyd_cdf
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 + arctan((x−a)/b)/π.
Examples.
-
Input:
cauchy_cdf(2,3,1.4)
Output:
- Input:
cauchy_cdf(1.4)
Output:
- Input:
cauchy_cdf(2,3,-1.9,1.4)
Output:
The inverse distribution function for the Cauchy distribution: cauchy_icdf cauchyd_icdf
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.
cauchy_icdf(2,3,0.23)
Output: