0
$\begingroup$

I have this experiment,

  • Throw a six-sided dice until you get N times one number, let's say 5 for example.

Now, the main question is, what's the variance of the number of times that another number, 6 for example, appears.

Any help is welcome!

  • 0
    A specific other number, or any other number? (It sounds like a specific other number, but I wanted to be sure.)2017-01-31
  • 0
    @Brian Tung A specific one2017-01-31

1 Answers 1

1

Just to be specific let's say that the "ending number" was $5$ and that the number you are counting is $6$.

Method I (direct): Let $p_n$ denote the probability that you observe exactly $n$ occurrence of $6$ before you stop. Considering the possible consequences of the first toss we obtain the recurrence: $$p_n=\frac 16\times p_{n-1}+\frac 16 \times 0+\frac 46 \times p_n\implies p_n=\frac 12 p_{n-1}$$ We remark that $$\sum_{0}^{\infty}p_n=1 \implies p_0 \sum_{0}^{\infty}\frac 1{2^n}=1\implies p_0=\frac 12$$ Thus we get $$p_n=\frac 1{2^{n+1}}$$

Sanity Check: by symmetry, there is a $\frac 12$ chance that we see $5$ before we see $6$, so $p_0=\frac 12$ as calculated.

It is easy now to compute the mean, $$\mu=\sum_{0}^{\infty}n p_n = 1$$ (Note: this too was easy to compute directly).

To conclude we simply compute the variance directly $$\sum_{0}^{\infty} (n-1)^2\frac 1{2^{n+1}}=\fbox 2$$

Method II (Geometric Distribution):

Note that the only relevant tosses are $5,6$...we can ignore all the others. As these two tosses are equally probable, the problem is equivalent to asking "what is the variance of the number of Heads you toss before you get a Tails?". Thus, this is just the variance of the standard geometric distribution with $p=\frac 12$ and it is well known that this is $\frac {1-p}{p^2}$, or $2$ in this case.

  • 0
    For the full question (if I understand it correctly), where you might want to stop only when you have tossed $5$ for the fourth time, we just take the variances of "number of $6$s before the $k$th toss" and add them. So the variance for the entire procedure is $2M$ (stopping when we toss $5$ for the $M$th time).2017-01-31
  • 0
    Thanks! It's nice to have many ways to reach the answer. Both are really good ways to reach an answer, i'd have never thought about something like the first method, and I'm ashamed about not thinking on something like the second. Thank you very much!2017-01-31
  • 0
    @DavidK Thanks for pointing that out. I missed that part of the question.2017-01-31
  • 0
    @DavidK I've forgotten to write that part of the experiment on the text of the question, and just left it on the title. Thanks David.2017-01-31