One should not expect to toss a perfect Random Roll probability in one 36 roll toss.
What is the expected number of rolls of two dice for every total from 2 to 12 to occur at least once?
β SixHorse
This question was asked at TwoPlusTwo.com, and was answered correctly by BruceZ . The following solution is the same method as that of BruceZ, who deserves proper credit. It is a difficult answer, so pay attention.
First, consider the expected number of rolls to obtain a total of two. The probability of a two is 1/36, so it would take 36 rolls on average to get the first 2.
Next, consider the expected number of rolls to get both a two and three. We already know it will take 36 rolls, on average, to get the two. If the three is obtained while waiting for the two, then no additional rolls will be needed for the 3. However, if not, the dice will have to be rolled more to get the three.
The probability of a three is 1/18, so it would take on average 18 additional rolls to get the three, if the two came first. Given that there is 1 way to roll the two, and 2 ways to roll the three, the chances of the two being rolled first are 1/(1+2) = 1/3.
So, there is a 1/3 chance we’ll need the extra 18 rolls to get the three. Thus, the expected number of rolls to get both a two and three are 36+(1/3)Γ18 = 42.
Next, consider how many more rolls you will need for a four as well. By the time you roll the two and three, if you didn’t get a four yet, then you will have to roll the dice 12 more times, on average, to get one. This is because the probability of a four is 1/12.
What is the probability of getting the four before achieving the two and three? First, let’s review a common rule of probability for when A and B are not mutually exclusive:
pr(A or B) = pr(A) + pr(B) – pr(A and B)
You subtract pr(A and B) because that contingency is double counted in pr(A) + pr(B). So,
pr(4 before 2 or 3) = pr(4 before 2) + pr(4 before 3) – pr(4 before 2 and 3) = (3/4)+(3/5)-(3/6) = 0.85.
The probability of not getting the four along the way to the two and three is 1.0 – 0.85 = 0.15. So, there is a 15% chance of needing the extra 12 rolls. Thus, the expected number of rolls to get a two, three, and four is 42 + 0.15Γ12 = 43.8.
Next, consider how many more rolls you will need for a five as well. By the time you roll the two to four, if you didn’t get a five yet, then you will have to roll the dice 7.2 more times, on average, to get one, because the probability of a five is 5/36 = 1/7.2.
What is the probability of getting the five before achieving the two, three, or four? The general rule is:
pr (A or B or C) = pr(A) + pr(B) + pr(C) – pr(A and B) – pr(A and C) – pr(B and C) + pr(A and B and C)
So, pr(5 before 2 or 3 or 4) = pr(5 before 2)+pr(5 before 3)+pr(5 before 4)-pr(5 before 2 and 3)-pr(5 before 2 and 4)-pr(5 before 3 and 4)+pr(5 before 2, 3, and 4) = (4/5)+(4/6)+(4/7)-(4/7)-(4/8)-(4/9)+(4/10) = 83/90. The probability of not getting the four along the way to the two to four is 1 – 83/90 = 7/90. So, there is a 7.78% chance of needing the extra 7.2 rolls. Thus, the expected number of rolls to get a two, three, four, and five is 43.8 + (7/90)Γ7.2 = 44.816.
Continue with the same logic, for totals of six to twelve. The number of calculations required for finding the probability of getting the next number before it is needed as the last number roughly doubles each time. By the time you get to the twelve, you will have to do 1,023 calculations.
Here is the general rule for pr(A or B or C or … or Z)
pr(A or B or C or Z) =
pr(A) + pr(B) + … + pr(Z)
– pr (A and B) – pr(A and C) – … – pr(Y and Z) Subtract the probability of every combination of two events
+ pr (A and B and C) + pr(A and B and D) + … + pr(X and Y and Z) Add the probability of every combination of three events
– pr (A and B and C and D) – pr(A and B and C and E) – … – pr(W and X and Y and Z) Subtract the probability of every combination of four events
Then keep repeating, remembering to add probability for odd number events and to subtract probabilities for an even number of events. This obviously gets tedious for large numbers of possible events, practically necessitating a spreadsheet or computer program.
The following table shows the the expected number for each step along the way. For example, 36 to get a two, 42 to get a two and three. The lower right cell shows the expected number of rolls to get all 11 totals is 61.217385.