Skip to content
Prev 86009 / 398502 Next

difference between rnorm(1000, 0, 1) and running rnorm(500, 0, 1) twice

Duncan Murdoch <murdoch at stats.uwo.ca> writes:
I think it's a fair assumption that *uniform* random numbers have the
property, since these are engines that produce a continuous stream of
values, of which we select the next n and m values. 

As long as the normal.kind (see ?RNGkind) is "Inversion", we can be
sure that the property carries to rnorm, but it might not be the case
for other methods. In particular the ones that generate normal
variates in batches are suspect. However, empirically, I can't seem to
provoke the effect with any of R's built-in generators. One *could* of
course check the source code and see whether there is state
information being kept between invokations...