• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

another die question

radosr

Baruch MFE Faculty
Joined
7/18/07
Messages
660
Points
73
A fair, six–sided die is rolled repeatedly and the rolls recorded. When two consecutive rolls are identical, the process is ended. Let S denote the sum of all the rolls made. Is S more likely to be even, odd or just as likely even as odd?
 
The last two rolls don't matter as their sum is even, so whatever the sum was before that, it will retain it's parity. Hence we're only looking for the probability of a sum of random dice rolls being odd or even. 1/2
 
The fact that you cannot stop after the first roll but can stop after the second one makes S slightly more likely to be even I think.
 
Good point ... Back to the drawing board. I guess you can just separate out the case where n=2 and then get P(even) = P(rolling the same number in 1st 2 rolls) + P(even | 1st two rolls are different) = 1/36 + 1/2*(35/36) = 37/ 72, whereas P(odd) = 35/72
 
P(even) = 6/11 and P(odd) = 5/11.

You can calculate it by using infinite geometric series.
 
Primus can you show some details to the calculations?
 
P(n) = The game ending at throw n = 1/6 * P(the game reaching the n-stage)
and
P(the game reaching the n-stage) = (5/6)^(n-2)
so
P(n) = 1/6*(5/6)^(n-2)
For n going to infinity this should add to 1. Let's check: Infinite sum of 1/6*(5/6)^(n-2) for n going from 2 to infinity = 1/6 * 1/(1-5/6) = 1

We now have:
P(even) = 1/6*(1+[5/6]^2+[5/6]^4+[5/6]^6+[5/6]^8+…) = 1/6*(1+[25/36]^1+[25/36]^2+[25/36]^3+[25/36]^4+…) = 1/6 * 1/(1-25/36) = 6/11

And P(odd) = 1 – P(even) = 5/11

Btw.: Note that P(odd) = P(even) * 5/6

For more info: http://en.wikipedia.org/wiki/Geometric_progression :)
 
Hello guys! I just came here and found this interesting thread. I started simulating directly since I got exactly the same answer. The attachment is here, done in C# VS2010.

There is a simulation conducted on the outcome vector quite many times (but my PC could handle). If your PC has any trouble decrease the amount of simulations (where 10000000) is written. Increasing the amount of simulation approaches 6/11 for evens.
 

Attachments

  • DieRolling.zip
    25.2 KB · Views: 25
P(n) = The game ending at throw n = 1/6 * P(the game reaching the n-stage)
and
P(the game reaching the n-stage) = (5/6)^(n-2)
so
P(n) = 1/6*(5/6)^(n-2)
For n going to infinity this should add to 1. Let's check: Infinite sum of 1/6*(5/6)^(n-2) for n going from 2 to infinity = 1/6 * 1/(1-5/6) = 1

We now have:
P(even) = 1/6*(1+[5/6]^2+[5/6]^4+[5/6]^6+[5/6]^8+…) = 1/6*(1+[25/36]^1+[25/36]^2+[25/36]^3+[25/36]^4+…) = 1/6 * 1/(1-25/36) = 6/11

And P(odd) = 1 – P(even) = 5/11

Btw.: Note that P(odd) = P(even) * 5/6

For more info: http://en.wikipedia.org/wiki/Geometric_progression :)
Nice Solution.
 
P(n) = The game ending at throw n = 1/6 * P(the game reaching the n-stage)
and
P(the game reaching the n-stage) = (5/6)^(n-2)
so
P(n) = 1/6*(5/6)^(n-2)
For n going to infinity this should add to 1. Let's check: Infinite sum of 1/6*(5/6)^(n-2) for n going from 2 to infinity = 1/6 * 1/(1-5/6) = 1

We now have:
P(even) = 1/6*(1+[5/6]^2+[5/6]^4+[5/6]^6+[5/6]^8+…) = 1/6*(1+[25/36]^1+[25/36]^2+[25/36]^3+[25/36]^4+…) = 1/6 * 1/(1-25/36) = 6/11

And P(odd) = 1 – P(even) = 5/11

Btw.: Note that P(odd) = P(even) * 5/6

For more info: http://en.wikipedia.org/wiki/Geometric_progression :)

you answered the wrong question. the question is about the parity of the sum of the outcomes, not the parity of the number of rolls.
 
you answered the wrong question. the question is about the parity of the sum of the outcomes, not the parity of the number of rolls.
Right, good catch.
I will take from Primus the p(n), bec its calculation was correct.
P(n) = The game ending at throw n = 1/6 * P(the game reaching the n-stage)
and
P(the game reaching the n-stage) = (5/6)^(n-2)
so
P(n) = 1/6*(5/6)^(n-2)

Now:
n=2 sum=3 odd
n=3 sum=6 even
n=4 sum=10 even
n=5 sum=15 odd
n=6 sum=21 odd
n=7 sum=28 even
n=8 sum=36 even
n=9 sum =45 odd

so, beside the first one (n=2) it is even even odd odd...
Prob (odd sum) = p(2)+P(5)+p(6)+p(9)+p(10)+p(13)+p(14)...=1/6*(1+[5/6]^3+[5/6]^4+[5/6]^7+[5/6]^8+...)
=1/6*(1+([5/6]^3+[5/6]^4)*(1+[5/6]^4+[5/6]^8+[5/6]^12+[5/6]^16....)

1+[5/6]^4+[5/6]^8+[5/6]^12+[5/6]^16+...=I=1+[5/6]^4*I
I=1+(625/1296)I
I(1-625/1296)=1
671I=1296
I=1296/671

Prob (odd sum) = 1/6*(1+([5/6]^3+[5/6]^4)*I
=1/6*(1+([5/6]^3+[5/6]^4)*1296/671)=1/6*(1+(125/216+625/1296)*1296/671)
=1/6*(1+((750+625)/671)
=1/6*2046/671
=341/671=31/61

Prob (even sum)=1-31/61=30/61
 
Right, good catch.
I will take from Primus the p(n), bec its calculation was correct.
P(n) = The game ending at throw n = 1/6 * P(the game reaching the n-stage)
and
P(the game reaching the n-stage) = (5/6)^(n-2)
so
P(n) = 1/6*(5/6)^(n-2)

Now:
n=2 sum=3 odd
n=3 sum=6 even
n=4 sum=10 even
n=5 sum=15 odd
n=6 sum=21 odd
n=7 sum=28 even
n=8 sum=36 even
n=9 sum =45 odd

so, beside the first one (n=2) it is even even odd odd...
Prob (odd sum) = p(2)+P(5)+p(6)+p(9)+p(10)+p(13)+p(14)...=1/6*(1+[5/6]^3+[5/6]^4+[5/6]^7+[5/6]^8+...)
=1/6*(1+([5/6]^3+[5/6]^4)*(1+[5/6]^4+[5/6]^8+[5/6]^12+[5/6]^16....)

1+[5/6]^4+[5/6]^8+[5/6]^12+[5/6]^16+...=I=1+[5/6]^4*I
I=1+(625/1296)I
I(1-625/1296)=1
671I=1296
I=1296/671

Prob (odd sum) = 1/6*(1+([5/6]^3+[5/6]^4)*I
=1/6*(1+([5/6]^3+[5/6]^4)*1296/671)=1/6*(1+(125/216+625/1296)*1296/671)
=1/6*(1+((750+625)/671)
=1/6*2046/671
=341/671=31/61

Prob (even sum)=1-31/61=30/61

so it looks like you got that odd is more likely. finding the actual probability isn't quite that easy, but I think if you try some sort of a bijection approach you get that even is more likely.
 
so it looks like you got that odd is more likely. finding the actual probability isn't quite that easy, but I think if you try some sort of a bijection approach you get that even is more likely.
why should even be more likely?
the first one is odd, then it is even even, odd odd, even even....
If anything, odd should be more likely.
Check my solution.
 
The more interesting question is what is the average stopping time? In other words, on average how many rolls should be made until process ended?
 
The more interesting question is what is the average stopping time? In other words, on average how many rolls should be made until process ended?

I'll compute later but it should be less than 10. If you take a look at the simulation vector, you'll see that there is almost no probability of different outcomes within at most 15 outcomes.
 

Attachments

  • DieRolling.xlsm
    14 KB · Views: 15
There should be a way to calculate Expectation without simulation.
The series I am looking to add is 2 + 3r + 4r^2+5r^3+ 6r^4+7r^5+...when 0<r<1.
multiply each term in the series by r and divide by r in the outside.
r=5/6
E= 1/6 * (2 + 3r + 4r^2+5r^3+ 6r^4+7r^5) = 1/6r * (2r+3r^2+4r^3+ 5r^4+6r^5+...)
the sum in parenthesis is the derivative of 1+r+r^2+r^3... minus 1.
1+r+r^2+r^3 = 1/(1-r)
der (1/(1-r))=1/(1-r)^2
E=1/6 *6/5 * (1/(1-5/6)^2 - 1) = 1/5 * (36-1) = 7
Is that correct?
 
Yes it should be done without simulation, I'll do it later when I come back.
I've done it without simulation (see my solution above). Answer is 7. For some reason, I thought the average would be higher.
 
I've done it without simulation (see my solution above). Answer is 7. For some reason, I thought the average would be higher.

Yes I think your reasoning is correct but I'm thinking how to fit in binomial distribution.
 
actually I think getting the probability is the more interesting part -- and we still don't have a correct answer. getting the average stopping time is pretty easy...it lends itself easily to conditioning (how many times have I said that on this forum? lol) conditioning on the first two outcomes gives \(T=\frac{1}{6}\cdot 2+\frac{5}{6}(T+1)\), from which \(T=7\). maybe we can try this same approach to get the probability...
 
Back
Top