Skip to main content

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[wlist->elist,n] gives a list of n weighted choices.

RandomChoice[wlist->elist,{n1,n2,…}] gives an n1×n2×… array of weighted choices.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.