Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


gives a pseudorandom sample of n of the .

gives a pseudorandom sample of n of the chosen using weights .

gives a pseudorandom permutation of the .


  • RandomSample[{e1,e2,},n] never samples any of the more than once.
  • RandomSample[{e1,e2,},n] samples each of the with equal probability.
  • RandomSample gives a different sequence of pseudorandom choices whenever you run the Wolfram Language. You can start with a particular seed using SeedRandom.
  • A Method option to SeedRandom can be given to specify the pseudorandom generator used.
Introduced in 2007