[R] Cauchy distribution limits

From: William Asquith <wasquith_at_austin.rr.com>
Date: Wed 01 Feb 2006 - 14:14:50 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Feb 01 14:29:13 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:16 EST