[R] precision of rnorm
Phineas
phineas at blueyonder.co.uk
Thu Dec 15 14:01:20 CET 2005
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
More information about the R-help
mailing list