RandomChoice[{e1,e2,…}]
gives a pseudorandom choice of one of the ei.
RandomChoice[list,n]
gives a list of n pseudorandom choices.
RandomChoice[list,{n1,n2,…}]
gives an n1×n2×… array of pseudorandom choices.
RandomChoice[{w1,w2,…}{e1,e2,…}]
gives a pseudorandom choice weighted by the wi.
RandomChoice[wlistelist,n]
gives a list of n weighted choices.
RandomChoice[wlistelist,{n1,n2,…}]
gives an n1×n2×… array of weighted choices.


RandomChoice
RandomChoice[{e1,e2,…}]
gives a pseudorandom choice of one of the ei.
RandomChoice[list,n]
gives a list of n pseudorandom choices.
RandomChoice[list,{n1,n2,…}]
gives an n1×n2×… array of pseudorandom choices.
RandomChoice[{w1,w2,…}{e1,e2,…}]
gives a pseudorandom choice weighted by the wi.
RandomChoice[wlistelist,n]
gives a list of n weighted choices.
RandomChoice[wlistelist,{n1,n2,…}]
gives an n1×n2×… array of weighted choices.
Details

- RandomChoice is also known as simple random sampling or sampling with replacement.
- RandomChoice[{e1,e2,…}] chooses with equal probability between all of the ei.
- RandomChoice 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.
Examples
open all close allBasic Examples (4)
Scope (2)
Applications (9)
Properties & Relations (2)
Use SeedRandom to get repeatable random values:
Use BlockRandom to block one use of RandomChoice from affecting others:
See Also
RandomInteger RandomSample RandomVariate SeedRandom BlockRandom Span RandomEntity CategoricalDistribution
Function Repository: RandomPartChoice SampleRebalance
Tech Notes
Related Guides
History
Text
Wolfram Research (2007), RandomChoice, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomChoice.html.
CMS
Wolfram Language. 2007. "RandomChoice." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomChoice.html.
APA
Wolfram Language. (2007). RandomChoice. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomChoice.html
BibTeX
@misc{reference.wolfram_2025_randomchoice, author="Wolfram Research", title="{RandomChoice}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/RandomChoice.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_randomchoice, organization={Wolfram Research}, title={RandomChoice}, year={2007}, url={https://reference.wolfram.com/language/ref/RandomChoice.html}, note=[Accessed: 15-August-2025]}