Looking for a random statistical biaised function

35 Views Asked by At

A common random function is designed like a dice, if you call it many times it will yield approximately the same number of times 1, 2, 3, 4, 5 and 6. Statistically, you could say it's equally spread or dispersed.

Are there function or formulas that use a random function, and can output an predictable, unequally statistically spread value ?

Imagine I want a function that if I call it, results tend to have 3 times 6s as usual, 2 times 2s as usual, half as many 4s as usual, etc ?

I don't want exactly those weights, but I wonder how is it possible to generate random values that tend to yield more values than others.

1

There are 1 best solutions below

0
On

Not sure if this is what you are after but you could throw the die twice or more and "reinterpret" the results. For example, if you throw $(1,2)$ call it $1$, if you throw $(2,1)$ call it $3$ etc. If you interpret the $36$ possibilities as $$1,2,2,2,2,2,2,2,2,2,2,2,2,3,4,4,4,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6$$ then the probability of $6$ will be $\frac{18}{36}=\frac{1}{2}$, three times as much as usual, the probability of $2$ will be $\frac{12}{36}=\frac{1}{3}$, twice as much as usual and the probability of $4$ will be $\frac{3}{36}=\frac{1}{12}$, half the usual.