You have a biased 6-sided die. That is, the probabilities of each outcome are different but non-zero.
Can you use this die to generate a fair die roll?
Image credit: https://francescalli.files.wordpress.com
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice one. :)
Btw, sorry to be picky, but you can "generate a fair die roll" or "simulate a fair die" but it seems odd to say "generate a fair die".
Let's assume that we still want something that will deliver 6 possible outcomes with equal probability, as it's normally done with a fair die. As luck would have it, there are 6 possible permutations of 3 things, such as A B C , B A C , . . . , etc. So, for the sake of ease and efficiency, we find the 3 faces in the unfair die occuring with the highest probabilities. Call them A , B , C . Then throw the die exactly three times only, and see which of the permutations come up. If none, repeat until one does.
Ah, a time saving solution! :)
Log in to reply
Yes, let's imagine that the odds of getting the 1 , 2 , 3 , 4 , 5 , 6 faces are 1 , 2 , 3 , 4 , 5 , 6 out of 2 1 . Then doing it your way, a "good roll" occurs about 1 . 3 % of the time, while doing it mine it occurs about 9 % of the time. Probably would be a good problem... what's the most efficient way to do this?
Why knowing those three isn't required?
Log in to reply
Because all permutations of ABC are equiprobable since their probabilities are just multiplied together. So, it doesn't matter what the individual probabilities are...
This method could be impractical in the real world.
Let’s say probability of rolling a 1 is 0.999999999, probability of rolling a 2 is 0.0000000009, probability of rolling a 3 is 0.00000000009, probability of rolling a 4 is 0.000000000007, probability of rolling a 5 is 0.000000000002, and probability of rolling a 6 is 0.000000000001.
You would need to toss this die billions of times before 1,2,3 came up in any order.
Let P(1) equal p 1 , P(2) equal p 2 and P(3) equal p 3 , then p 1 ⋅ p 2 ⋅ p 3 is equal to the product of any permutation of those 3.
Use P(1 then 2 then 3), P(1 then 3 then 2), P(2 then 1 then 3), P(2 then 3 then 1), P(3 then 1 then 2) and P(3 then 2 then 1) to generate your fair die roll
Problem Loading...
Note Loading...
Set Loading...
Roll the die six times. If all values are different, take the first roll. Otherwise, start over (with all six rolls). Continue until all six rolls are different, then take the result of the first roll.
This works since the probabilities of each outcome yield the same product when multiplied together. And, for any given set of six different rolls, the first number is equally likely to be any of the numbers 1 through 6.