Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I watched a video on youtube which stated the probability of rolling a yahtzee in a single roll (same value on 5 six sided dice) before 1296 rolls is 63%. The probability of rolling a yahtzee on any single roll is 1/1296. I know my math is not up to the level of you guys on here, I'm a programmer, but I couldn't get my mind around how 63% makes sense.. so I threw together a program to test it out and it is indeed the case. 63% of the time a yahtzee was rolled in a single roll before the 1296 roll. My program also reported that the average number of rolls to get a yahtzee is 1301 or 1302 after a few tests of 1,000,000 rolls.

Could someone please explain where that 63% comes from? And also, an average of 1301 or 1302 to get a yahtzee seems a bit strange to me as well given the 1/1296 probability. Although I put it together quickly, I'm fairly sure my program is working properly. Do those numbers make sense in terms of the math? And if so, why is the average not 1296?

share|improve this question
4  
63% is $1-1/e$. This is the leading order behavior for any rare event (if the probability in a single attempt $1/N$, then the probability in $N$ attempts is $1-1/e$ for large $N$). But the expected number of attempts should be exactly $N$. –  mjqxxxx Mar 8 '13 at 5:20
add comment

1 Answer

up vote 3 down vote accepted

Here are some figures:

Probability of rolling a yahtzee in a single roll: 1/1296

Probability of not rolling a yahtzee in a single roll: 1295/1296

Probability of a streak of length N where you do not roll a yahtzee: (1295/1296)^N

Probability that in N attempts at least one yahtzee is rolled: 1 - (1295/1296)^N

After 1296 rolls, here is the chance that you will have rolled a yahtzee: 1 - (1295/1296)^1296, which approximately evaluates to 63%.

share|improve this answer
    
(+1) Good summary. Do you plan to address the second question? –  Cameron Buie Mar 8 '13 at 5:44
    
Ah, you mean, why is this the average not 1296? ...no idea, I'll think on it, my first guess is rounding errors. I'll try to implement in C. –  meh Mar 8 '13 at 5:45
    
Thanks for the answer. Only implement it if you enjoy that sort of thing. It's possible I made a mistake in the calculation. It seems that the math shows it wouldn't be the case? –  Memento Mori Mar 8 '13 at 6:00
1  
Yes. My guess based on some of the things I thought might be messing up the program: You may have tried to compute a random integer between 1 and 6 (or 0 and 5) by using something like rand () % 6. But this fails to account for RAND_MAX % 6 not being equal to 5, which is what would be necessary to get a perfectly uniform distribution. This may make yahtzees marginally more probable. But that's a weird guess. So I'm probably wrong. –  meh Mar 8 '13 at 6:04
2  
Right, so I ran the simulation 100,000 times with a value of 1297.23. I think that: * your simulation does not do uniform rolls * your simulation does not implement precise enough rounding, or something * it's just law of large numbers acting up because 1301 is not that far from 1296. –  meh Mar 8 '13 at 6:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.