[R] Cauchy distribution limits
William Asquith
wasquith at austin.rr.com
Wed Feb 1 04:14:50 CET 2006
I have question (curiosity) regarding returned values of R's qcauchy
() function,
for nonexceedance probability (F). It seems the ideal returned range
of cauchy distribution should be [-Inf,Inf].
For F=0
> qcauchy(0)
[1] -Inf
but for F=1
> qcauchy(1)
[1] 8.16562e+15
It seems to me that the proper return value should be Inf???
For default (location=0,scale=1) quantile function of cauchy
x(F) = tan(pi * (F - 0.5))
For F = 0
> tan(pi*(-0.5))
[1] -1.633124e+16
For F = 1
> tan(pi*(0.5))
[1] 1.633124e+16
So I conclude that qcauchy(0) properly handles the -Inf result and
the qcauchy(1) returns a very large number, curiously not equal to tan
(0.5*pi), but certainly not Inf.
As double check,
> tan(pi*(0.99999-0.5))
[1] 31830.99
> qcauchy(0.99999)
[1] 31830.99
william
More information about the R-help
mailing list