Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] precision of rnorm

Phineas

2005-12-15

Replies:

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@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.