In: Statistics and Probability
Find the probability that the totals 5 and 9 both appear before two 7s appear when rolling a pair of dice repeatedly.
The correct answer is 0.463673.
P(total is 5 in 1 roll) = 4/36 = 1/9; Cases: 1,4 and 4,1 and 2,3 and 3,2
P(total is 9 in 1 roll) = 4/36 = 1/9 ; Cases: 5,4 and 4,5 and 6,3 and 3,6
P(total is 7 in 1 roll) = 6/36 = 1/6 ; Cases: 3,4 and 4,3 and 6,1 and 1,6 and 2,5 and 5,2
--
P(At N rolls, 5 AND 9 occur before 2 7s occur)
= 2*(1/9)* [
{ (1 - 1/9 - 1/6)^(N-1) - (1 - 1/9 - 1/9 - 1/6)^(N-1) }
<-- 0 7-sum occurs; n = 2 ONWARDS
+
{N-1}*{1/6}*{ (1 - 1/9 - 1/6)^(N-2) - (1 - 1/9 - 1/9 - 1/6)^(N-2)}
<-- 1 7-sum occurs; n = 3 ONWARDS
]
The first term "2" is choosing between 5 and 9 which one occurs
at the last roll (where we win if we win when 5 and 9 occur before
2 7s appear)
Let us say, for simplicity to calculate terms with brackets [],
that we chose case where 5 occurs at last
Now, two cases arise, either 0 7s occur before we win or 1 7-sum
roll occurs before we win (as denoted above)
The first term in both these cases is: chances of last N-1 rolls
having 0 or more 9s
The second term (which is subtracted from 1st term) is : chances of
last N-1 rolls having 0 9s (removed to get at least 1 9s =>
required to win!)
--------
= 2*(1/9)* [
{ (13/18)^(N-1) - (11/18)^(N-1) } <-- 0 7-sum occurs; n
= 2 ONWARDS
+
{N-1}*{1/6} * { (13/18)^(N-2) - (11/18)^(N-2)} <-- 1
7-sum occurs; n = 3 ONWARDS
]
--------
Now, C1 = { (13/18)^(N-1) - (11/18)^(N-1) } <-- 0
7-sum occurs; n = 2 ONWARDS
This is a difference of two infinite GPs (N = 2 to infinity) AND
sum of infinite GPs with less-than-1 multiplying factor and
starting term = a is equal to a/(1-r) => Here, we can make first
term of both GPs 1 by adding 1 to each (this is fine as the
subtraction between the two will keep the overall value
constant)
=> C1 = {18/5 - 18/7}
---------------
Similarly, C2 = {N-1}*{1/6} * { (13/18)^(N-2) - (11/18)^(N-2)}
<-- 1 7-sum occurs; n = 3 ONWARDS
HERE WE NEED TO ADD THAT
Sum of n = 1 to infinity for (N-1)*a*r^N-2 gives the
following:-
= 1*a*r^0 + 2*a*r^1 + 3*a*r^2 + .... + so on
= 1*(sum of normal gp) + r*(sum of normal gp) + r^2 *(sum of normal
gp) + ... + so on
= (sum of normal gp)*(sum of normal gp)
= (2/9)* [ {18/5 - 18/7} + {1/6}*{ (18/5)*(18/5) - (18/7)*(18/7) }
]
= 0.46367346 [Answer]