I want to generate uniformly distributed random numbers between 1 and 26 with a dice: Is this correct:
I have assembled the following algorithm using the Monte Carlo Method:
{1, 2, 3, 4, 5, 6} {7, 8, 9, 10, 11, 12} {13, 14, 15, 16, 17, 18} {19, 20, 21, 22, 23, 24} {25, 26, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0}
First step: Throw the dice. If the dice is x, I choose the x-th set.
Second step: Throw the dice. If the dice is y, I choose the y-th element of the choosen set. If the element is zero -> return to first step and repeat else -> return the chosen element as the result.
Since the two steps are independent of each other, each outcome has probability 1/36, and hence, the algorithm has equally distributed output of a number between 1 and 26.
Is this reasoning correct and if not, what should I change? Is there an even easier way?
thx :)
greetings