Re: [R] How do you force runif to return non-duplicate results eg runif(0, 1, n=10)? thanks

About this list Date view Thread view Subject view Author view Attachment view

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Tue 18 May 2004 - 14:55:30 EST


Message-id: <Pine.LNX.4.44.0405180550290.13132-100000@gannet.stats>

On Tue, 18 May 2004, Briggs, Meredith M wrote:

<nothing>

runif by definition samples independently from U(0,1). So by defnition
the results are not duplicated. It is possible due to finite computer
representations that you would get duplicates to computer accuracy but the
chance of that in sample size of 10 is about the chance of winning the UK
lottery twice in a row, and much less plausible than a computer fault.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST