I can't seem to grasp my mind around this question.
My attempt: P(roll 7) = 6/36 P(roll 4) = 3/36 P(roll 5) = 4/36
There are three combinations:
1) 4,5,7
2) 4,5
3) 7,4,5
I am stuck here.
I can't seem to grasp my mind around this question.
My attempt: P(roll 7) = 6/36 P(roll 4) = 3/36 P(roll 5) = 4/36
There are three combinations:
1) 4,5,7
2) 4,5
3) 7,4,5
I am stuck here.
It seems that you would need to use the negative binomial distribution here.
The first time you get a number that's either a $4$, a $5$, or a $7$, what's the probability that it's a $4$ or a $5$? In other words, you want the conditional probability that what you get is either a $4$ or a $5$, given that it's either a $4$, a $5$, or a $7$.
Amended to inset "$|\text{no } 7 \text{s}$" and recalculate
There is probably a simpler way than this, but you might look at the probability of $k$ failures to roll $7$ before the second success which is $(k+1)(6/36)^2(30/36)^k$
\Pr( \text{roll } 4 \text{ and } 5 \text{ in } k \text{ rolls}|\text{no } 7 \text{s}) = 1- \Pr( \text{don't roll } 4 \text{ or don't roll } 5 \text{ in } k \text{ rolls}|\text{no } 7 \text{s})
= 1 - \Pr( \text{don't roll } 4 \text{ in } k \text{ rolls}|\text{no } 7 \text{s}) - \Pr( \text{don't roll } 5 \text{ in } k \text{ rolls}|\text{no } 7 \text{s})
+ \Pr( \text{don't roll } 4 \text{ and don't roll } 5 \text{ in } k \text{ rolls}|\text{no } 7 \text{s})
$= 1 - (27/30)^k - (26/30)^k + (23/30)^k.$
So your answer is
$\sum_{k=0}^\infty (k+1)(6/36)^2(30/36)^k(1 - (27/30)^k - (26/30)^k + (23/30)^k)$
You could work this out. I make it $15536/38025 \approx 0.4085733$.
If you do it following Michael Hardy's suggestion of ignoring all rolls except 4,5 and 7 this becomes
$\sum_{k=0}^\infty (k+1)(6/13)^2(7/13)^k(1 - (3/7)^k - (4/7)^k + (0/7)^k)$ where $(0/7)^k =0$ unless $k=0$ in which case $(0/7)^0 =1$. You then get the same result.
I think this is the same answer as Henry's:
Imagine that you roll two six-dided dies and record the sum. Repeat this process. Let $A$ be the event that a sum of 5 and a sum of 4 is obtained before two sums of 7 are obtained.
A straightforward (maybe) way to do this is to compute for each $k\ge2$ the probability of the event $ A_k= \text{the second 7 occurs on the }k\text{th roll, and the first }(k-1)\text{rolls did not have both 5 and 4} $
Then $P(A)=1-\sum\limits_{k=2}^\infty P(A_k)$.
Each event $A_k$ can be broken down into the events $F_k$, $G_k$, and $H_k$ where, in addition to the $k$th roll having a sum of 7:
$\ \ \ F_k$ is the event that in the first $k-1$ rolls, there was exactly one sum of 7 and no sums of 4's
$\ \ \ G_k$ is the event that in the first $k-1$ rolls, there was exactly one sum of 7 and no sums of 5's
$\ \ \ H_k$ is the event that in the first $k-1$ rolls, there was exactly one sum 7 and no sums of 5's nor 4's
Then $P(A_k)=P(F_k)+P(G_k)-P(H_k)$.
Lets find $P(F_k)$. Note here that: exactly one 7 occurred in the first $(k-1)$ rolls, no 4's occurred in the first $(k-1)$-rolls, and the $k$th roll was a 7. So (note the first 7 could occur in any one of $k-1$ places): $ P(F_k)= (k-1)\cdot(6/36)^2\cdot(27/36)^{k-2 } $
Similarly $ P(G_k)= (k-1)\cdot(6/36)^2\cdot(26/36)^{k-2 } $ and $ P(H_k)= (k-1)\cdot(6/36)^2\cdot(23/36)^{k-2 } $
Thus $ P(A_k)= (k-1)\cdot(6/36)^2\bigl[ (27/36)^{k-2 }+ (26/36)^{k-2 }-(23/36)^{k-2 } \bigr] $ and $\eqalign{P(A)&=1-\sum\limits_{k=2}^\infty (k-1)\cdot(6/36)^2\bigl[ (27/36)^{k-2 }+ (26/36)^{k-2 }-(23/36)^{k-2 } \bigr]\cr &= 1-\sum\limits_{k=2}^\infty (k-1)\cdot(1/36) \bigl[ (3/4)^{k-2 }+ (13/18)^{k-2 }-(23/36)^{k-2 } \bigr]\cr &= 1-{1\over36}\biggl[ \sum\limits_{k=2}^\infty (k-1) (3/4)^{k-2 }+ \sum\limits_{k=2}^\infty (k-1) (13/18)^{k-2 }- \sum\limits_{k=2}^\infty(k-1) (23/36)^{k-2 } \biggr]\cr &= 1-{1\over36}\biggl[ {1\over\bigl( 1-(3/4)\bigr)^2}+ {1\over\bigl( 1-(13/18)\bigr)^2}- {1\over\bigl( 1-(23/36)\bigr)^2}\biggr]\cr &= 1-{1\over36}\biggl[ 16+ {18^2\over 25}- {36^2\over 13^2}\biggr]\cr &= 1- {22489\over38025} \cr &={15536\over 38025}\cr &\approx 0.4085733} $
In the above we used, for $|x|<1$: $ \sum_{k=2}^\infty x^{k-1}={x\over 1-x} $ $ \Downarrow $ $ \sum_{k=2}^\infty (k-1) x^{k-2} = {d\over dx}{x\over 1-x}={1\over (1-x)^2}. $