• 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

  • Thread starter Thread starter radosr
  • Start date Start date
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...
Peter, could you please explain your formula? IT seems that we both get the same answer to those problems but we solve them differently. I am interested in your solution.
Also, what is wrong with my solution to the probability problem?
 
conditional expectation...

\(E(\text{stopping time})=E\text{(stopping time}|\text{first two outcomes are identical)}P(\text{first two outcomes are identical})\)
\(+E(\text{stopping time}|\text{second outcome is different from first})P(\text{second outcome is different from first})\)

note that for the second term, the conditional expectation of the stopping time is just one more than the unconditional one because the problem essentially resets on the second roll if it is different from the first -- hence the \(T+1\) in my above equation.

as for your solution to the probability part, I'm not quite sure what you did... but you have alternating odds and evens, which doesn't seem to fit. also, I found a bijection argument (I think) which shows that evens are more likely... but I wanted to post it once I also figure out the actual probability
 
conditional expectation...

\(E(\text{stopping time})=E\text{(stopping time}|\text{first two outcomes are identical)}P(\text{first two outcomes are identical})\)
\(+E(\text{stopping time}|\text{second outcome is different from first})P(\text{second outcome is different from first})\)

note that for the second term, the conditional expectation of the stopping time is just one more than the unconditional one because the problem essentially resets on the second roll if it is different from the first -- hence the \(T+1\) in my above equation.

as for your solution to the probability part, I'm not quite sure what you did... but you have alternating odds and evens, which doesn't seem to fit. also, I found a bijection argument (I think) which shows that evens are more likely... but I wanted to post it once I also figure out the actual probability

Thank you Peter. Really nice. And my answer is wrong, I was adding the number of rolls and not the outcome.
 
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
Actually I made an awesome mistake here,

P(even) = P(rolling the same number in 1st 2 rolls) + P(even | 1st two rolls are different) = 1/6 + 5/6*1/2 = 7/12. P(odd) = 5/12.
 
okay, here we go...


Denote

\(p\): the probability of getting an even sum given that the first outcome is even.

\(q\): the probability of getting an even sum given that the first outcome is odd.

Then

\(p=\frac{1}{6}+\frac{1}{3}p+\frac{1}{2}q\)
\(q = \frac{1}{6}+\frac{1}{3}(1-q)+\frac{1}{2}(1-p)\)

from which \(p=\frac{26}{41},q=\frac{21}{41}\)

The probability we're looking for is then \(\frac{1}{2}(p+q)=\frac{47}{82}\)
 
Nicely done Peter. Now anyone know why my argument above doesn't work?
 
For the expectation over time, the solution given by peteruse is correct.

Let expected number of rolls be T.
T = 5/6(1+T) + 1/6(1+1)
So, T= 7

There are similar very interesting problems in coins space.
http://pratikpoddarcse.blogspot.com/2009/10/lets-say-keep-tossing-fair-coin-until.html

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...
 
Nicely done Peter. Now anyone know why my argument above doesn't work?

Koupparis,
The probability of getting even has to be more.
P(getting even | Game does not get over in first two chances) = P(getting odd | Game does not get over in first two chances)

But game can get over in first two chances. And then the sum is even. Hence, prob of getting even > 0.5

Cheers!

http://www.pratikpoddarcse.blogspot.com
 
I realize that my P(even) = 7/12 > .5 I'm curious to know where my logic fails.

Doing this using infinite series:

Let \(E_n\) = Match at nth roll and sum is even, and \(N_{n-1}\) = No match at roll n-1.
\(P(Even) = P(E_2) + P(E_3 \& N_2) + P(E_4 \& N_3) + ...\)
Now
\(P(E_n \& N_{n-1}) =\) P(match previous roll)*P(sum previous n-2 rolls even)*P(no matches up till time n-1)
\(P(E_n \& N_{n-1}) = 1/6 * 1/2 * (5/6)^{n-1} \)
hence
\(P(Even) = 1/6 + 1/6 * 1/2 * 5/6 + 1/6 * 1/2 * (5/6)^2 + ... = 7/12\)
 
I realize that my P(even) = 7/12 > .5 I'm curious to know where my logic fails.

Doing this using infinite series:

Let \(E_n\) = Match at nth roll and sum is even, and \(N_{n-1}\) = No match at roll n-1.
\(P(Even) = P(E_2) + P(E_3 \& N_2) + P(E_4 \& N_3) + ...\)
Now
\(P(E_n \& N_{n-1}) =\) P(match previous roll)*P(sum previous n-2 rolls even)*P(no matches up till time n-1)
\(P(E_n \& N_{n-1}) = 1/6 * 1/2 * (5/6)^{n-1} \)
hence
\(P(Even) = 1/6 + 1/6 * 1/2 * 5/6 + 1/6 * 1/2 * (5/6)^2 + ... = 7/12\)

I am intrigued. Can someone please find a flaw in koupparis solution?
 
Nicely done Peter. Now anyone know why my argument above doesn't work?

One of the flaws is where you say \(P(\text{sum of previous } n-2 \text{ rolls is even})=1/2\)

Also, your probabilities are not conditional, so they don't quite multiply that way.
 
Last edited by a moderator:
One of the flaws is where you say \(P(\text{sum of previous } n-2 \text{ rolls is even})=1/2\)
Can you elaborate on both points? Given that n>2 then P(sum previous n-2 rolls is even) = 1/2 isn't it?

Also I'm missing how the probabilities are not independent/conditional?
 
Can you elaborate on both points? Given that n>2 then P(sum previous n-2 rolls is even) = 1/2 isn't it?

No. For instance, if \(n=4\), you want the first 2 rolls to have an even sum *and* be different, so you want to multiply the probability of them being different by the probability that their sum is even given that they're different. The latter is \(\frac{12}{30}\neq \frac{1}{2}\).
 
Peter, shouldn’t the second equation for q be:
q = 1/6 + 1/3*q + 1/2*p

which is equivalent to:
q = 1/6 + 1/3*(1-p) + 1/2*(1-q)

Let me know if I am missing something.

okay, here we go...

Denote

\(p\): the probability of getting an even sum given that the first outcome is even.

\(q\): the probability of getting an even sum given that the first outcome is odd.

Then

\(p=\frac{1}{6}+\frac{1}{3}p+\frac{1}{2}q\)
\(q = \frac{1}{6}+\frac{1}{3}(1-q)+\frac{1}{2}(1-p)\)

from which \(p=\frac{26}{41},q=\frac{21}{41}\)

The probability we're looking for is then \(\frac{1}{2}(p+q)=\frac{47}{82}\)
 
Peter, shouldn’t the second equation for q be:
q = 1/6 + 1/3*q + 1/2*p

which is equivalent to:
q = 1/6 + 1/3*(1-p) + 1/2*(1-q)

Let me know if I am missing something.

Conditional on the first toss being odd, either 1) the second toss is the same as the first (the 1/6 part) or 2) the second is an odd number different from the first toss (with probability 2/6=1/3) after which the sum starting with the second toss has to be odd (probability 1-q) or 3) the second is an even number (probability 1/2) after which the sum starting with the second toss is odd (probability 1-p)

also note that p+q is not 1.
 
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?

Answer: Probability of Sum being Even is 4/7 and Probability of Sum Being Odd is 3/7.

Here's why:

Let p denote the probability of the sum being even when the game stops.

Upon the first throw, we have Case (O) an odd roll with probability 1/2, and Case (E) an even roll with probability 1/2.

Under Case (O), we have three subsequent cases:

Case (O-SO) where the second roll is the same as first (odd and the same) with probability 1/6, at which point the process ends with an even sum. So, we reach this ending point with a net probability of (1/2)*(1/6)=1/12.

Case (O-DO) where the second roll is different but odd with probability 2/6, from which point onwards the probability of getting an even sum when the process ends is p as the first two rolls, both being odd, have an even sum. Thus, the net probability for this point is (1/2)*(2/6)*p=2p/12.

Case (O-E) where the second roll is even with probability 3/6, from which point onwards the probability of getting an even sum when the process ends is (1-p) as the first two rolls, one being odd and the other even, have an odd sum. The net probability for this point is (1/2)*(3/6)*(1-p)=(3/12)(1-p).

Under Case (E), we have three subsequent cases:

Case (E-SE) where the second roll is the same as first (even and the same) with probability 1/6, at which point the process ends with an even sum. So, we reach this ending point with a net probability of (1/2)*(1/6)=1/12.

Case (E-DE) where the second roll is different but even with probability 2/6, from which point onwards the probability of getting an even sum when the process ends is p as the first two rolls, both being even, have an even sum. Thus, the net probability for this point is (1/2)*(2/6)*p=2p/12.

Case (E-O) where the second roll is odd with probability 3/6, from which point onwards the probability of getting an even sum when the process ends is (1-p) as the first two rolls, one being even and the other odd, have an odd sum. The net probability for this point is (1/2)*(3/6)*(1-p)=(3/12)(1-p).

Combining all the above cases we have:

p=(1/12)+(2p/12)+(3/12)(1-p)+(1/12)+(2p/12)+(3/12)(1-p).

Solving the above equation, we get p=4/7.
 
@quantyst,

the values 4/7 and 3/7 are wrong, as you'd have seen if you'd read the earlier posts; it would have saved you a lot of typing ;) read my solution above; the correct values are P(even)=47/82 and P(odd)=35/82.
 
@quantyst,

the values 4/7 and 3/7 are wrong, as you'd have seen if you'd read the earlier posts; it would have saved you a lot of typing ;) read my solution above; the correct values are P(even)=47/82 and P(odd)=35/82.

You are committing a classic fallacy. You say that because my method and answer are different from yours, then my answer must be wrong. By your own logic, why shouldn't your answer be wrong precisely because it is different from mine?

So, what's the resolution here? How do we go about determining who's right, who's wrong?

Even if I show yours to be wrong, it does not imply that mine must be right. But first I will show why yours is wrong. And let's not forget that you've provided no explanation for your equations, and probably you've not bothered to look at my explanations leading to my answer, either. If you had done so, you might have pointed to the errors in my thinking.

Look at your second equation for q:

q=(1/6)+(1/3)*(1-q)+(1/2)*(1-p).

The quantity (1-q) in the equation is the probability of getting an odd sum given that the first number is odd. But by this time you already have two different odd numbers in a row whose sum (which is really what matters) is even, and so you are back to a situation as if you are just about starting the game. Please think about this before you enthusiastically jump into conclusion. And take a moment and ACTUALLY read my explanations and solution. Also do a tree diagram both for your approach and my approach, then you will see the light. Thanks.
 
You are committing a classic fallacy. You say that because my method and answer are different from yours, then my answer must be wrong. By your own logic, why shouldn't your answer be wrong precisely because it is different from mine?

So, what's the resolution here? How do we go about determining who's right, who's wrong?

Even if I show yours to be wrong, it does not imply that mine must be right. But first I will show why yours is wrong. And let's not forget that you've provided no explanation for your equations, and probably you've not bothered to look at my explanations leading to my answer, either. If you had done so, you might have pointed to the errors in my thinking.

Look at your second equation for q:

q=(1/6)+(1/3)*(1-q)+(1/2)*(1-p).

The quantity (1-q) in the equation is the probability of getting an odd sum given that the first number is odd. But by this time you already have two different odd numbers in a row whose sum (which is really what matters) is even, and so you are back to a situation as if you are just about starting the game. Please think about this before you enthusiastically jump into conclusion. And take a moment and ACTUALLY read my explanations and solution. Also do a tree diagram both for your approach and my approach, then you will see the light. Thanks.

the truth is I didn't bother reading your post because I know it's wrong. i'll leave it to other people to confirm it to you that P(even) is in fact 47/82.
 
Back
Top