RandomChoice[{e1,e2,…}]
eiの一つを擬似乱数的に選ぶ.
RandomChoice[list,n]
n 個の擬似乱数的選択のリストを与える.
RandomChoice[list,{n1,n2,…}]
擬似乱数的選択の n1×n2×…配列を与える.
RandomChoice[{w1,w2,…}{e1,e2,…}]
wiで重みを付けた擬似乱数的選択を与える.
RandomChoice[wlistelist,n]
n 個の重みを付けた選択のリストを与える.
RandomChoice[wlistelist,{n1,n2,…}]
重みを付けた選択の n1×n2×…配列を与える.


RandomChoice
RandomChoice[{e1,e2,…}]
eiの一つを擬似乱数的に選ぶ.
RandomChoice[list,n]
n 個の擬似乱数的選択のリストを与える.
RandomChoice[list,{n1,n2,…}]
擬似乱数的選択の n1×n2×…配列を与える.
RandomChoice[{w1,w2,…}{e1,e2,…}]
wiで重みを付けた擬似乱数的選択を与える.
RandomChoice[wlistelist,n]
n 個の重みを付けた選択のリストを与える.
RandomChoice[wlistelist,{n1,n2,…}]
重みを付けた選択の n1×n2×…配列を与える.
詳細

- RandomChoiceは,単純なランダムサンプリングまたは復元サンプリングとしても知られている.
- RandomChoice[{e1,e2,…}]は,すべての eiから等確率で選択する.
- RandomChoiceは,Wolfram言語を実行するたびに擬似乱数的選択の異なる列を与える.SeedRandomを使って特定のシードで始めることができる.
- 使用する擬似乱数生成器を指定するために,SeedRandomにMethodオブションを与えることができる.
例題
すべて開く すべて閉じるアプリケーション (9)
特性と関係 (2)
関連項目
RandomInteger RandomSample RandomVariate SeedRandom BlockRandom Span RandomEntity CategoricalDistribution
Function Repository: RandomPartChoice SampleRebalance
テキスト
Wolfram Research (2007), RandomChoice, Wolfram言語関数, 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: 17-September-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: 17-September-2025]}