Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Random Sampling Without Replacement?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26612] Re: [mg26586] Random Sampling Without Replacement?
  • From: BobHanlon at aol.com
  • Date: Thu, 11 Jan 2001 10:39:20 -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."

RandomKSubset[Range[52], 3]

{9, 33, 46}


Bob Hanlon

In a message dated 2001/1/9 2:10:41 AM, siegman at stanford.edu writes:

>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: Re: Random Sampling Without Replacement?
  • Next by Date: Plotting complex points
  • Previous by thread: Re: Re: Random Sampling Without Replacement?
  • Next by thread: RE: Random Sampling Without Replacement?