How often to roll 2d6 a special way to guarantee an outcome once?
February 15, 2016 5:39 PM   Subscribe

There is an 8/36 chance that a very particular outcome can be generated by rolling 2d6 in a particular way (both described after the jump). How many times do I need to roll to be certain that this outcome occurs (ie, I can stop rolling)? How about 90 per cent certain? 80 per cent?

I roll 2d6; keep only the highest number (eg if I roll a 3 and a 5, the result is 5); and consult this table:

1 A
2 X
3 X
4 A
5 X
6 X

I want a 1 or a 4 - 'A'.

By my (probably incorrect) calculations, I have an 8/36 chance of doing this. Successful combinations from the 36 total possible combinations of rolling 2d6 are 11, 14, 24, 34, 41, 42, 43 and 44. Let's call it 22%, or about one in five.

Now I know the answer isn't 'if you roll five times, you're guaranteed to get that outcome at least once', first because I remember at least enough high school maths to know that's not true, and second because I just rolled 11 f*&^ing times before I got the result I was after.

I'm looking for a rule of thumb about my chances of pulling this off. For example, 'you'd need to roll x times to be guaranteed of getting that result; y times to be about 90 per cent sure, z times to be about 80 per cent sure...'.

I've tried Monte Carloing this in Excel but I can make the COUNTIFS work because I hate Excel it's a stupid program for babies that's why.
posted by obiwanwasabi to Science & Nature (7 answers total) 2 users marked this as a favorite
The probability that you *won't* get the desired outcome after one roll of 2d6 is 8/36.
The probability that you *won't* get it after two rolls of 2d6 is 8/36 * 8/36.
The probability that you *won't* get it after n rolls, is (8/36)^n.

So the probability that you will, after n rolls, is 1-(8/36)^n.

(you only get exactly 100% after infinity rolls, but you can figure out from the formula how many times for 90 percent or 80 percent or whatever).
posted by nat at 5:44 PM on February 15, 2016

Sorry the probability that you won't is (36-8)/36 = 28/36, so the right answer is after n rolls is

1- (28/36)^n.
posted by nat at 5:45 PM on February 15, 2016 [3 favorites]

From my mathematician:
You can't guarantee it, because you could just get the wrong rolls forever.

But you can get 90%. You want a number of rolls where the probability that it doesn't happen is 7/9, so you take powers of 7/9 (i.e. multiply 7/9 by itself) until you get below 10% -- that's your number of rolls. The probability of it not happening in that number of rolls is under 10%, so the probability of it happening is over 90%.
posted by LobsterMitten at 5:47 PM on February 15, 2016

And just to complete things: if you want there to be a probability of at least p that you have received the desired result after N rolls, then N > log(1 - p)/log(7/9). For an 80% probability, you need at least 7 rolls; for a 90% probability, you need at least 10 rolls; and for a 99% probability, you need at least 19 rolls.
posted by Johnny Assay at 6:48 PM on February 15, 2016

Thanks all! It took all three solutions for me to get it, but now I can work this out for other similar problems too.
posted by obiwanwasabi at 7:14 PM on February 15, 2016

So, why wouldn't the actual odds of not rolling one (1,1), (1,4), (2,4), (3,4), or (4,4) be 16/21?
posted by nulledge at 4:50 AM on February 16, 2016

So, why wouldn't the actual odds of not rolling one (1,1), (1,4), (2,4), (3,4), or (4,4) be 16/21?

Assume you roll two dice: a red one and a green one. There are two ways to get the combination (1,4): either the red one comes up 1 and the green one comes up 4, or vice versa. This is true for any roll in which you get two different numbers. So there are 36 possible outcomes (6 for the red die, 6 for the green die), of which 8 (the ones you listed above along with (4,1), (4,2) and (4,3)) are good outcomes.
posted by Johnny Assay at 4:55 AM on February 16, 2016 [1 favorite]

« Older Taxes   |   PDB data for a human α1β2γ2 GABA A receptor Newer »
This thread is closed to new comments.