Re: Re: Random Sampling Without Replacement?

• To: mathgroup at smc.vnet.net
• Subject: [mg26633] Re: [mg26608] Re: [mg26586] Random Sampling Without Replacement?
• From: Tomas Garza <tgarza01 at prodigy.net.mx>
• Date: Sat, 13 Jan 2001 22:36:12 -0500 (EST)
• References: <200101111539.KAA07017@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```I think there is an error in your suggestion (apart from the fact that the
package is called DiscreteMath` - not DiscreteMathematics`). See, if the
original list from which the samples are to be taken is e.g. {2, 4, 6, 8,
10, 12, 14, 16, 18, 20}, with size 10, then

In[1]:=
Take[RandomPermutation[10], 3]
Out[1]=
{1, 9, 10}

and here you obtain two elements (1 and 9) who do not belong to the original
list. Check, e.g., [mg26602] .

Tomas Garza
Mexico City

----- Original Message -----
From: "Richard Finley" <rfinley at medicine.umsmed.edu>
To: mathgroup at smc.vnet.net
Subject: [mg26633] [mg26608] Re: [mg26586] Random Sampling Without Replacement?

> Try the following:
>
> <<DiscreteMathematics`Combinatorica`
> Take[RandomPermutation[n],3]
>
> where n is the size of the list you are selecting from.  regards,  RF
>
> >>> "A. E. Siegman" <siegman at stanford.edu> 01/09/01 12:52AM >>>
> Looking for neat compact way to extract three distinct (i.e., nonequal)
> randomly selected integers k1, k2, k3 from the range 1 to N (N > 3) --
> in other words, random sampling without replacement -- ???
>
>
>

```

• Prev by Date: How to change Mathematicas menus on the fly?
• Next by Date: Partial Differential Equation
• Previous by thread: Re: Random Sampling Without Replacement?
• Next by thread: Re: Random Sampling Without Replacement?