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: Re: Random Sampling Without Replacement?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26639] Re: [mg26608] Re: [mg26586] Random Sampling Without Replacement?
  • From: "Richard Finley" <rfinley at medicine.umsmed.edu>
  • Date: Sat, 13 Jan 2001 22:36:16 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Tomas,
You are right about the package name...I just did it from memory and didn't check.  But for the question, remember that it concerned drawing from a list of integers 1 to N which your example is not.  For the problem as specified it works OK.  RF.  

>>> Tomas Garza <tgarza01 at prodigy.net.mx> 01/11/01 01:20PM >>>
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

-



  • Prev by Date: Re: Random Sampling Without Replacement?
  • Next by Date: Re: DO if Loop
  • Previous by thread: Re: Random Sampling Without Replacement?
  • Next by thread: Global Optimization