On Wed, 11 Apr 2007, Douglas Bates wrote: > On 4/11/07, Jeann S <[EMAIL PROTECTED]> wrote: >> Dear all, >> >> Sorry for bringing up an old issue: >> >> >pexp(50, 0.5) >> [1] 1 >> >> In some cases, pexp() gives CDF=1. I read some discussion in 2002 saying it >> has been patched. However it's not working in "R2.4.1Patched". Could anyone >> help me out? > > And why is this a problem? The cdf of an exponential distribution > with rate = 0.5 evaluated at x = 50 is very close to 1. If you want > to find out exactly how close you could use > > pexp(50, rate = 0.5, lower.tail = FALSE) > > which gives an answer on the order of 10^(-11).
As does > 1-pexp(50, 0.5) [1] 1.388789e-11 It might be worth reminding people that printing rounds to (by default 7) a certain number of significant digits. (Dr Bates' answer is more accurate of course.) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.