[R] precision of rnorm

From: Phineas <phineas_at_blueyonder.co.uk>
Date: Fri 16 Dec 2005 - 00:01:20 EST


How many distinct values can rnorm return?

I assume that rnorm manipulates runif in some way, runif uses the Mersenne Twister, which has a period of 2^19937 - 1. Given that runif returns a 64 bit precision floating point number in [0,1], the actual period of the Mersenne Twister in a finite precision world must be significantly less.

One of the arguments for Monte Carlo over the bootstrap is that for a sample size n the bootstrap can return at most 2^n distinct resamples, however for even for relatively small sample sizes there may be no increase in precision in using Monte Carlo.

Phineas Campbell



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 Fri Dec 16 00:11:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:39 EST