RandomChoice

WMA link

RandomChoice[items]

randomly picks one item from items.

RandomChoice[items, n]

randomly picks n items from items. Each pick in the n picks happens from the given set of items, so each item can be picked any number of times.

RandomChoice[items, {$n_1$, $n_2$, ...}]

randomly picks items from items and arranges the picked items in the nested list structure described by {$n_1$, $n_2$, ...}.

RandomChoice[weights -> items, n]

randomly picks n items from items and uses the corresponding numeric values in weights to determine how probable it is for each item in items to get picked (in the long run, items with higher weights will get picked more often than ones with lower weight).

RandomChoice[weights -> items]

randomly picks one items from items using weights weights.

RandomChoice[weights -> items, {$n_1$, $n_2$, ...}]

randomly picks a structured list of items from items using weights weights.

Note: SeedRandom is used below so we get repeatable “random” numbers that we can test.

Random
RandomComplex