To check # rolls to get first "6" = E(X1) = 6
First roll is 6 = p(X1=1) = 1/6, n+1 and E(X1) = 0
First roll is not 6 = p(X1 =! 1) = 5/6, k+1 and E(X1) = 6
[If (EX1 = 1), n increases by 1
If E(X1 =! 1), n increases by 1 but E(X1) = 6]
Represent "lost" n by k.
Rolls are independent, failing the first roll has no effect on the second (aka, expectation remains the same).
=>
E(X1) = p(X1 =! 1) * (k + E(X1)) + p(X1 = 1) * (n)
E(X1) = 5/6 * (1 + 6) + 1/6 * (1) = 6
=>
E(X1) = (1-p) * (1 + E(X1)) + (p) * (1)
E(X1) = 1 - (p) + E(X1) - (p)*E(X1) + (p) = 1 - (p)*E(X1) + E(X1)
0 = 1 - (p)*E(X1)
(p)*E(X1) = 1
E(X1) = 1 / (p)
=>
E(X1) = 1 / (1/6) = 6
Now, find second in sequence (X2)
First roll is 6 = p(X1=1) = 1/6
First roll is not 6 = p(X1 =! 1) = 5/6
If E(X1 =! 1), n increases by 1 but E(X1) = 6, k+1
If E(X1 = 1), n increases by 1, n+1
But this time, it does affect future rolls.
Now, E(X2) = 6 = E(X1)
Second roll following is a 6 = p(X2 = 2) = 1/6, n+1, E(X2) = 0
Second roll following is not a 6 = p(X2 =! 2) = 5/6, k+1, E(X1) = 6
E(X2) = p(X1 =! 1) * (k + E(X1)) + p(X1 = 1)^2 * (n) + p(X1 = 1)*p(X2 =! 2) * (n+k + E(X1))
E(X2) = (1-p) * (1 + E(X1)) + (p)^2 * (2) + (p)*(1-p) * (1 + 1 + E(X1))
E(X2) = 2*p^2 + 1 - p + E(X1) - p*E(X1) + p*2 - 2*p^2 + p*E(X1) - E(X1)*p^2
E(X2) = 1 + E(X1) + p - E(X1)*p^2 = 1 + p + E(X1)*(1 + p^2)
E(X2) = 5/6 * (1+6) + (1/6)^2 * (2) + 1/6*5/6 * (1+1 + 6) = 7