MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Random Sampling Without Replacement?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26606] RE: [mg26586] Random Sampling Without Replacement?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 11 Jan 2001 10:39:15 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Needs["DiscreteMath`Combinatorica`"]

?RandomKSubset
"RandomKSubset[l, k] gives a random subset of set l with exactly k
elements."

set = Range[1, 100];
RandomKSubset[set, 3]
{8, 68, 93}

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


> From: A. E. Siegman [mailto:siegman at stanford.edu]
To: mathgroup at smc.vnet.net
>
> 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: Plotting complex points
  • Next by Date: Re: Random Sampling Without Replacement?
  • Previous by thread: Re: Random Sampling Without Replacement?
  • Next by thread: Re: Random Sampling Without Replacement?