Probability of 2 sevens before 6 evens

But I don't know how to do this.In summary, the problem is asking for the probability of getting two sevens before six even numbers when rolling a pair of fair die. The correct interpretation is that the sum of the two die is seven or even. The probability of getting a sum of seven is 1/7, and the probability of getting a sum of even is 12/21. However, the size of the sample space is not 21, since we need to distinguish between different outcomes. Using the equation P(2 sevens before 6 evens) = P(2 sevens)/(P(2 sevens) + P(6 evens)) gives an answer of 1/2, which is close
  • #1
CAF123
Gold Member
2,948
88

Homework Statement


In successive rolls of a pair of fair die, what is the probability of getting 2 sevens before 6 even numbers?

The Attempt at a Solution


So, I read this once and then twice and then a third time. You can't get a seven on a fair die (assuming the die is six sided)? I proceeded on the assumption the question means the sum of the two die is seven and sum of two die is even
Let E be the event of rolling seven: E = {(1,6),(2,5),(3,4)} => P(E) = 3/21 = 1/7.
I believe the size of the sample space, |s| = 21, since we don't want to distinguish between, say, (1,6) and (6,1).
Let F be the event that you get 6 even numbers: F = {(1,1),(1,3),(1,5),(2,2),(2,4),(2,6),(3,3),(3,5),(4,4),(4,6),(5,5),(6,6)} => P(F) = 12/21.

Given that the number of rolls can be infinite, P(2 sevens) = 1 and P(6 even numbers) = 1, since there is no limit on the number of rolls and if something can happen, it will happen. Using the eqn P(2 sevens before 6 evens) = P(2 sevens)/(P(2 sevens) + P(6 evens)) gives an answer of 1/2, which is close to the actual answer. Why does this not work?

Also, I am aware the above is quite a 'mechanical' way of doing this question. I tried it using summations with the probabilities I got above (1/7 and 12/21), but I don't get far.
Many thanks for any advice.
 
Physics news on Phys.org
  • #2
I believe the size of the sample space, |s| = 21, since we don't want to distinguish between, say, (1,6) and (6,1).
Not all possible pairs have the same probability. If you combine (6,1) and (1,6) to a single case, they have a higher probability than (4,4) (which just has one case).
There is a better (and more direct) way to get those probabilities. Do not combine cases. Once you have the probabilities for "sum 7" and "sum even", you can ignore all those individual cases.

1/7 and 12/21 are wrong.

Using the eqn P(2 sevens before 6 evens) = P(2 sevens)/(P(2 sevens) + P(6 evens)) gives an answer of 1/2, which is close to the actual answer.
Why do you expect this to work? What is P(2 sevens) after all? The probability to get 2 sevens in an infinite series?
This way, you would get 1/2 for all probability question. Even the question "how likely is it to have 100 times the sum 2 before getting the sum 7 once".
 
  • #3
CAF123 said:
I proceeded on the assumption the question means the sum of the two die is seven and sum of two die is even
That is the correct way to interpret the meaning of a "roll of a pair of fair die".

Let E be the event of rolling seven: E = {(1,6),(2,5),(3,4)} => P(E) = 3/21 = 1/7.
I believe the size of the sample space, |s| = 21, since we don't want to distinguish between, say, (1,6) and (6,1).
That is incorrect. You absolutely do need to distinguish (1,6) from (6,1). To make it a bit simpler, consider the outcomes from flipping a pair of coins, one a quarter, then other a nickel. There are four possible outcomes: Both coins come up heads, the quarter comes up heads while the nickel comes up tails, the quarter comes up tails while the nickel comes up heads, and both come up tails. These are equiprobable events.

Getting back to the problem of rolling the dice, look at rolling a sum of two versus rolling a sum of three. Both dice need to come up as one to roll a sum of two. The probability of this happening is 1/6*1/6, or 1/36. Now look at rolling a sum of three. It might help to imagine that the dice are colored, one red, the other green. You can roll a three by having the red die come up as one and the green die as two OR by having the red die come up as two and the green one as one. These are two independent events, each with probability 1/36, so the probability of rolling a sum of three with these colored dice is 2/36.

Now suppose you used two white dice. Does the color of the dice change the probabilities one bit?
 
  • #4
D H said:
Now suppose you used two white dice. Does the color of the dice change the probabilities one bit?
No, the probabilities remain the same. So to get the sum =7, I use the joint prob;
P(sum =7) = P(X=1,Y=6) + P(X=2,Y=5) +... including one of the terms being P(X=6,Y=1), for example. Similarly to get sum=even. How should I compute P(2 sevens) and P(6 evens)?
 
  • #5
CAF123 said:
No, the probabilities remain the same. So to get the sum =7, I use the joint prob;
P(sum =7) = P(X=1,Y=6) + P(X=2,Y=5) +... including one of the terms being P(X=6,Y=1), for example. Similarly to get sum=even. How should I compute P(2 sevens) and P(6 evens)?

Each toss has three possible outcomes: O1 = '7', O2 = 'even', O3 ='other' (= odd but not 7). You have probabilities for each outcome on each toss, and the successive tosses are independent. So, you need to compute the probability of getting two O1's before 6 O2's.

One way to approach this is to ask what is the probability Pk that the game ends on toss k; that is, on toss k we have our second O1 and have fewer then 6 O2's. Can you see how to get that? Of course, you then need to sum over k.
 
  • #6
So this is what I have. Assuming the game ends on round n, which means on the nth throw we have the second seven, out of the preceding n-1 throws we have to have one seven and less than 6 evens. So for the one seven we have (n-1 choose 1). P(seven).

I am not really sure how to compute P(less than 6 evens). I would say this is P(1 even) + P(2evens) +..+ P(5 evens), but I can't compute these individual terms

In the end, I want $$\sum_{n=1}^{∞} [\text{ (n-1 choose 1) . P(seven)}. \text{P(less than 6 evens)}]^{n-1} P(seven) $$
 
  • #7
Here is a hint:
P(n-2 throws, 1 even)=P(1 throw, 1 even)*P(n-3 throws, 0 even)*(n-2 choose 1)
The last (n-2) corresponds to the number of ways to have that "1 even" in your series. n-2 is chosen because you need that in your formula ;).
 
  • #8
mfb said:
Here is a hint:
P(n-2 throws, 1 even)=P(1 throw, 1 even)*P(n-3 throws, 0 even)*(n-2 choose 1)
The last (n-2) corresponds to the number of ways to have that "1 even" in your series. n-2 is chosen because you need that in your formula ;).

Does this not assume that we want only 1 even in the n-2 throws?
 
  • #9
CAF123 said:
Does this not assume that we want only 1 even in the n-2 throws?

For n ≤ 6 it is fairly straightforward to calculate Pn (= probab. of a win on toss n) because in the first (n-1) tosses there cannot be 6 'evens'. Thus, if p_7 = Prob of a 7, p_e = prob of an 'even' and p_o = prob. of an 'other', Pn = p_7*Prob of 1 '7' in n-1 tosses. However, for n ≥ 7 it is a bit trickier: we must look only at those events in which there are ≤ 5 'evens' in (n-1) tosses. You can always do it the lengthy way: Pn = p_7*Q, where Q = P{ 1 seven and ≤ 5 evens in n-1 tosses} = Q0+Q1+Q2+Q3+Q4+Q5, where Qi = P{1 seven and i 'evens' in n-1 tosses}. Doing this by hand would be time-consuming, but it would not be too bad on a computer.
 
  • #10
Ray Vickson said:
For n ≤ 6 it is fairly straightforward to calculate Pn (= probab. of a win on toss n) because in the first (n-1) tosses there cannot be 6 'evens'. Thus, if p_7 = Prob of a 7, p_e = prob of an 'even' and p_o = prob. of an 'other', Pn = p_7*Prob of 1 '7' in n-1 tosses. However, for n ≥ 7 it is a bit trickier: we must look only at those events in which there are ≤ 5 'evens' in (n-1) tosses. You can always do it the lengthy way: Pn = p_7*Q, where Q = P{ 1 seven and ≤ 5 evens in n-1 tosses} = Q0+Q1+Q2+Q3+Q4+Q5, where Qi = P{1 seven and i 'evens' in n-1 tosses}. Doing this by hand would be time-consuming, but it would not be too bad on a computer.

I haven't done anything with a computer as of yet, so I will have to do this by hand. Everything you wrote above makes sense, I am just finding it difficult to actually compute,s ay P(2 evens in n-1 tosses). I think this may be correct: $$\text{P(2 evens in n-1 tosses)} = \text{(n-1 choose 2)}.(1/2)^2(1-1/2)^{n-1-2}$$ and in general $$ \text{P(i evens in n-1 tosses)} = \text{(n-1 choose i)}.(1/2)^i (1-1/2)^{n-1-i}$$

EDIT: SHould I replace n-1 by n-2 since we already have a 'slot' for the first seven?
 
Last edited:
  • #11
CAF123 said:
I haven't done anything with a computer as of yet, so I will have to do this by hand. Everything you wrote above makes sense, I am just finding it difficult to actually compute,s ay P(2 evens in n-1 tosses). I think this may be correct: $$\text{P(2 evens in n-1 tosses)} = \text{(n-1 choose 2)}.(1/2)^2(1-1/2)^{n-1-2}$$ and in general $$ \text{P(i evens in n-1 tosses)} = \text{(n-1 choose i)}.(1/2)^i (1-1/2)^{n-1-i}$$

Actually, you need things like P{2 evens and 1 seven in n-1 tosses}. This is easy enough once you have seen the "trinomial" distribution, but may be pretty hard otherwise. The trinomial (or, in general, the multinomial) is a generalization of the binomial distribution to handle more than two 'types' of outcomes. So, the probability of exactly 'a' sevens, 'b' evens and c = r-a-b 'others' in r tosses is
[tex] {r \choose a,\, b,\, c}\: p_7^a \, p_e^b \, p_o^c \equiv \frac{r!}{a! \, b! \, c!} \:p_7^a \, p_e^b \, p_o^c \; (c = r - a - b).[/tex]

The real problem with this approach is the need to do this for all n and to sum; a much easier approach would be to try to determine the following: let x(i,j) = probability of winning given there are i 7's and j evens up to now. You can develop a set of linear equations for the x(i,j) by looking at how you can after going from (i,j) to somewhere in 1 toss. You only need the x(i,j) for i = 0 and 1 and for j <= 5, for when you have these you can get P{win} = x(0,0).

For example, x(0,2) = p_7*x(1,2)+ p_o * x(0,2) + p_e*x(1,2) and x(1,3) = p_7 + p_o*x(1,3) + p_e*x(1,4), etc. The second of these equations is obtained by noting that to win from (1,3), we can either win directly (if we get 7), or else stay at (1,3) (if toss an 'other') or else must win from (1,4) (if we toss an 'even').
 
Last edited:
  • #12
CAF123 said:
Does this not assume that we want only 1 even in the n-2 throws?
Right, that is just one part of the calculation. I don't see a simple way to combine those cases.
 
  • #13
Using the summation type approach, I have the following: $$ \sum_{n=2}^{\infty} {n-1 \choose 1} \frac{1}{6} (1-\frac{1}{6})^{n-1-1} \sum_{i=0, n=3}^{n= \infty , i=5} {n-2 \choose i} (\frac{1}{2})^{i} (\frac{1}{2})^{n-2-i} ,$$ the reason for choosing the different values of n so that the binomial coefficients don't go to zero.
 
  • #14
CAF123 said:
Using the summation type approach, I have the following: $$ \sum_{n=2}^{\infty} {n-1 \choose 1} \frac{1}{6} (1-\frac{1}{6})^{n-1-1} \sum_{i=0, n=3}^{n= \infty , i=5} {n-2 \choose i} (\frac{1}{2})^{i} (\frac{1}{2})^{n-2-i} ,$$ the reason for choosing the different values of n so that the binomial coefficients don't go to zero.

If you use the recursive approach I suggested before, it leads you to a useful insight; after having that insight, you can dispense with the recursion (although is is still a useful method). Before, I introduced x(i,j) = Prob of winning, given i 7s and j evens already tossed, but it is easier to use instead y(i,j) = probability of winning, given i 7s and j evens left to go (that is, y(i,j) = x(2-i,6-j)). The case y(1,1) is easy: the game is over if 7 or an even is tossed, and it continues (from the same starting point) if 'other' is tossed. Thus, y(1,1) = p_7 + p_o y(1,1), so y(1,1) = p_7/(1 - p_o) = p_7/(p_7 + p_e). You can recognize this last quantity as P{7|7 or even}. That makes perfect sense when you think about it: the only 'relevant' outcomes are 7 or 'even', so the probability that the next 'relevant' outcome is a 7 is P{7|7 or even}.

So, if we let
p = P{&|7 or even} = p_7/(p_7 + p_e_)
and
q = P{even|7 or even} = p_e/(p_7 + p_e) = 1-p,
we have: y(1,1) = p.

Similarly, y(1,2) = p + p*q, y(1,3) = p+p*q + p*q^2, etc. These make perfect sense too, because when there are i 'evens' left to go we win if <= (i-1) 'evens' are obtained, followed by the winning '7'.

Our problem is like asking for 2 'heads' before 6 'tails' in coin tossing with a biased coin having P{H} = p and p{tail} = q. When we have just 1 H and i T's left to go, the probability we win (that is, get heads) is p*[1+q+q^2 + --- + q^(i-1)], because we can have <= i-1 tails followed by a head.

When we have 2 heads and i tails left to go, the first toss can be a head (leaving us with 1 head and i tails left to go) or it can be a tail, leaving us with 2 heads and (i-1) tails left to go. Thus, y(2,i) = p*y(1,i) + q*y(2,i-1). We already know all the y(1,i), so starting from y(2,1) = p^2 we can get y(2,2), y(2,3), y(2,4) and y(2,5). The answer to the original question is y(2,5).
 
  • #15
Ray Vickson said:
The answer to the original question is y(2,5).
I think you meant y(2,6), not y(2,5). Initially there are 2 sevens, 6 evens to go to finish the game. y(2,6) agrees nicely with a Monte Carlo simulation.

Very, very nice analysis.
 
  • #16
@RGV I am still in the process of understanding all that you wrote, but just to clarify: is what I wrote correct but difficult looking infinite sum, not correct but can be tweaked a little or somewhere incorrect? (thanks for those replies)
 
  • #17
This is a classic random walk in two dimensions with two absorbing barriers.
Let (v,s) be the state of having v evens and s sevens so far, and vm=6, sm=2 be the absorbing boundaries.
For v<vm and s<sm, what are the transition probabilities to (v+1,s) and (v,s+1)?
How many paths are there to the point (s,v) where v<vm and s<sm?
So what is the probability of visiting (s,v) where v<vm and s<sm?
What are the possible prior states for (v,sm) where v<vm?
So what is the probability of being absorbed at (v,sm) where v<vm?
 
  • #18
haruspex said:
This is a classic random walk in two dimensions with two absorbing barriers.
Let (v,s) be the state of having v evens and s sevens so far, and vm=6, sm=2 be the absorbing boundaries.
For v<vm and s<sm, what are the transition probabilities to (v+1,s) and (v,s+1)?
How many paths are there to the point (s,v) where v<vm and s<sm?
So what is the probability of visiting (s,v) where v<vm and s<sm?
What are the possible prior states for (v,sm) where v<vm?
So what is the probability of being absorbed at (v,sm) where v<vm?

There are infinitely many paths from (s,v) to the boundary, because the state (s,v) (and subsequent states) can be visited any number of times, due to the finite probability of 'no change' (when tossing an odd non-7). Of course, all we need to do is apply standard equations for absorption probabilities, and that is exactly what the 'recursive' approach I suggested is doing--but without mentioning using the word Markov, etc. By a bit of manipulation we can eliminate the 'self-loop' effects, and that is what my last posting was about.
 
  • #19
Ray Vickson said:
There are infinitely many paths from (s,v) to the boundary, because the state (s,v) (and subsequent states) can be visited any number of times, due to the finite probability of 'no change' (when tossing an odd non-7). Of course, all we need to do is apply standard equations for absorption probabilities, and that is exactly what the 'recursive' approach I suggested is doing--but without mentioning using the word Markov, etc. By a bit of manipulation we can eliminate the 'self-loop' effects, and that is what my last posting was about.
Is this an approach using Markov chains? We covered part of this in an interest lecture at the end of our course. Just to check though: is my infinite sum correct that I had a few posts ago?
 
  • #20
Ray Vickson said:
There are infinitely many paths from (s,v) to the boundary, because the state (s,v) (and subsequent states) can be visited any number of times, due to the finite probability of 'no change'
But we don't care how long we spend in a state, so you can elide those out. Having defined the states as I did, all we care about are the transitions. The probabilities are easily calculated.
CAF123 said:
is my infinite sum correct that I had a few posts ago?
I couldn't make sense of it. Are the ranges right on the double sum? Looks like it includes the combination n=3, i=5, which looks strange when you plug those numbers into the terms inside.
 
Last edited:
  • #21
haruspex said:
But we don't care how long we spend in a state, so you can elide those out. Having defined the states as I did, all we care about are the transitions.
That's essentially what Ray did in post #14, which, if you read between the lines, spells things out very nicely.

I couldn't make sense of it.
I concur.
 
Last edited:
  • #22
D H said:
Whoa there. Please keep in mind that this is a homework problem. Don't give away the store!
Edited my post to remove. Would you mind editing yours to remove the quote?
 
  • #23
haruspex said:
I couldn't make sense of it. Are the ranges right on the double sum? Looks like it includes the combination n=3, i=5, which looks strange when you plug those numbers into the terms inside.
@haruspex Sorry, I should probably try to explain. I assumed that n rolls were required to win. This means in the n-1 rolls, we must have one seven and less than 6 evens. The first sum I have deals with the 1 seven. Out of the n-1 rolls, we want 1 seven (that's where I get (n-1 choose 1). Then out of the n-2 rolls, we do not want a seven so that's the (1-1/6)^(n-2) part. Then we have the prob of actually getting this seven( which is the 1/6). Put this all together and sum to infinity (since there is no limit on the number of rolls) that's the first sum.

For the second sum, we want less than 6 evens. So consider each case separately (as mfb suggested too) that's why the sum goes from i=0 to i=5. Using similar reasoning to that above we arrive at the second sum. Perhaps the bit that's confusing you (and rightly so because it may not be correct) is the initial point for n. For the first sum, I have n from 2 to infinity, simply to not make the first binomial coefficient zero. Similarly for n=3 on the second sum so to make the (n-2 choose i) not trivially equal 0. Does it make sense?

This isn't actually a h/w problem, it is just self study. Thanks!
 
  • #24
CAF123 said:
I assumed that n rolls were required to win. This means in the n-1 rolls, we must have one seven and less than 6 evens. The first sum I have deals with the 1 seven. Out of the n-1 rolls, we want 1 seven (that's where I get (n-1 choose 1). Then out of the n-2 rolls, we do not want a seven so that's the (1-1/6)^(n-2) part. Then we have the prob of actually getting this seven( which is the 1/6). Put this all together and sum to infinity (since there is no limit on the number of rolls) that's the first sum.
Ok, but you cannot then multiply this sum by something else to take into account that you must not have 6 evens. The correction factor would be a function of n, so it affects different terms in the first sum differently.
Please try my way. (It's pretty much the same as Ray's, but I was trying to lead you through it by getting you to answer a series of questions.) Did you understand how I defined the states and the transitions between them?
 
  • #25
I would have happily tried your/Ray's approach, but I haven't covered that sort of material in my class yet (If it's Markov chains, then we only had one brief interest lecture on it at the end of the course. In that lecture we talked about weak/strong law of large numbers, Chebyshev's/Markov's inequality and some limit theorems) So I haven't really had that much practice using them.

Could you try to help me sort out my infinite sum? Or if that is looking too messy, then is there an alternate approach that is similar to mine (I.e something like failure on n-1, success on n) etc.

But thanks anyway for the alternative approaches - it is nice to know that there are other ways to solve these questions.
 
  • #26
Massive edit: I didn't like my original approach because I felt it was needlessly long.


So let's try this:
Part 1:
Step 1: Find out why we ignore every odd number that isn't 7.
Step 2: Find the Sampe Space for each throw
Step 3: Find the probability of rolling 7 in this new sample space and rolling an even in this sample space.

Part 2:
Probability of throwing 6 evens is?
Probability of throwing 1 seven and 5 evens followed by a 6th even?

Part 3
Put it all together.
 
Last edited:
  • #27
What I had before I reorganised it into the double sum I showed was: $$ \sum_{n=1, 0 \leq i \leq 5}^{\infty} {n-1 \choose 1} \frac{1}{6} (1-\frac{1}{6})^{n-2} {n-2 \choose i} (\frac{1}{2})^i (\frac{1}{2})^{n-2-i}.$$
 
  • #28
Forget the infinite series! Just follow, me play the game and we'll get through this. I want to make this clear, even the hardest way to solve this problem, all you need is conditional probability. No tricks, nothing super hard. In fact, this problem can be so straight forward that it can be solved on a test (it was on one of my test when I was an undergrad!) So with that said, tell me why we ignore odd numbers, give me the new sample space and the two probabilities I asked for.
 
  • #29
MarneMath said:
Forget the infinite series! Just follow, me play the game and we'll get through this. I want to make this clear, even the hardest way to solve this problem, all you need is conditional probability. No tricks, nothing super hard. In fact, this problem can be so straight forward that it can be solved on a test (it was on one of my test when I was an undergrad!) So with that said, tell me why we ignore odd numbers, give me the new sample space and the two probabilities I asked for.

I am not exactly sure why we need to deal with a reduced sample space in this problem. On anyone throw, the probability of getting a seven is 6/36 and for an even it is 18/36. Is it completely necessary to reduce the sample space? If so, why?
 
  • #30
On a side note, I don't think anything you did in regards to your infinite series is wrong, just not helpful.
 
  • #31
Because we are not interested in the odd numbers, correct? If you really cannot see why we can disregard the odd numbers except 7, then I can do this problem with just conditional probability and we can work on it like that...but it's tedious. The main put I want to stress is that the infinite series is hurting your understanding more than helping.
 
  • #32
MarneMath said:
On a side note, I don't think anything you did in regards to your infinite series is wrong, just not helpful.
That's good to know. Is it just that it is difficult to actually compute the sum?
 
  • #33
MarneMath said:
Because we are not interested in the odd numbers, correct? If you really cannot see why we can disregard the odd numbers except 7, then I can do this problem with just conditional probability and we can work on it like that...but it's tedious. The main put I want to stress is that the infinite series is hurting your understanding more than helping.
So reduced sample space is |s| = 18 and P(7) = 1/4 and P(even) = 3/4. We can reduce it because we are only interested in events where we have a seven or an even, right? Events such as an other odd number don't contribute anything to what we want.
EDIT: 18? I meant 24!
 
Last edited:
  • #34
Well, my main concern is with the binomial coefficient. It looks weird and I'm not entirely sure if it actually is correct, but I feel that it is based on experience. I just don't think it's particularly useful, but I DO KNOW that the double sum you posted initially is wrong.
 
  • #35
CAF123 said:
So reduced sample space is |s| = 18 and P(7) = 1/4 and P(even) = 3/4. We can reduce it because we are only interested in events where we have a seven or an even, right? Events such as an other odd number don't contribute anything to what we want.

Exactly. Next question, what's the probability of throwing 6 evens before a 7? What's the chance of throwing one 7 and five evens followed by a 6th even?
 

Similar threads

  • Precalculus Mathematics Homework Help
2
Replies
53
Views
5K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
826
  • Precalculus Mathematics Homework Help
Replies
34
Views
3K
Back
Top