Consider the following experiment. I roll a die repeatedly until the die returns 6, then I count the number of times 3 appeared in the random variable X. What is E[X]?

Thoughts:I expect to roll the die 6 times before 6 appears (this part is geometric), and on the preceding 5 rolls each roll has a 1/5 chance of returning a 3. Treating this as binomial, I therefore expect to count 3 once, so E[X]=1.

Problem:Don’t know how to model this problem mathematically. Hints would be appreciated.

**Answer**

We can restrict ourselves to dice throws with outcomes 3 and 6. Among these throws, both outcomes are equally likely. This means that the index Y of the first 6 is geometrically distributed with parameter 12, hence E(Y)=2. The number of 3s occuring before the first 6 equals Y−1 and has expected value 1.

**Attribution***Source : Link , Question Author : nettle , Answer Author : user133281*