Re: Random choice
- To: mathgroup at smc.vnet.net
- Subject: [mg99843] Re: Random choice
- From: Valeri Astanoff <astanoff at gmail.com>
- Date: Sat, 16 May 2009 05:19:14 -0400 (EDT)
- References: <firstname.lastname@example.org> <email@example.com>
On 15 mai, 12:24, Ray Koopman <koop... at sfu.ca> wrote: > On May 15, 1:17 am, Valeri Astanoff <astan... at gmail.com> wrote: > > > > > > > Good day, > > > Given this example : > > > In:= RandomChoice[Range, 100] // Union // Length > > > Out= 91 > > > what is the best way to get *exactly* 100 different > > random numbers ranging from 1 to 500 ? > > > Any piece of advice would be appreciated. > > > -- > > > Valeri Astanoff > > RandomSample[Range, 100] // Union // Length > > Given the well-established meaning of m_Choose_n for sampling without > replacement, whoever decided on the new terminology got RandomChoice > and RandomSample backwards.- Masquer le texte des messages pr=E9c=E9dents= - > > - Afficher le texte des messages pr=E9c=E9dents - Thanks, Ray, (and Daniel and...) to let me (and some other posters !) know the existence of "RandomSample" : it does just what I was looking for. v.a.