What is the expected number of rolls until outcomes 1 and 2 are both observed. They can be in any order. I assume this is something related to a geometric distribution.
-
2Welcome to MSE. Your question is phrased as an isolated problem, without any further information or context. This does not match many users' quality standards, so it may attract downvotes, or closed. To prevent that, please [edit] the question. This will help you recognise and resolve the issues. Concretely: please provide context, and include your work and thoughts on the problem. These changes can help in formulating more appropriate answers. – José Carlos Santos Apr 10 '20 at 07:41
2 Answers
This is indeed related to the geometric distribution. The first number (either $1$ or $2$) will come up with probability $\frac26$ on each roll, and the number of rolls needed follows a geometric distribution, so $3$ rolls are expected. Then the remaining number comes up with probability $\frac16$, and similar to the first number, the reciprocal number of rolls are expected, or $6$ rolls.
Thus $9$ rolls are expected on average.
- 103,344
-
do we need to add the probability of the remaining numbers? because we are only looking for the expected number of rolls until 1 and 2 both are observed. – shadow walker Apr 10 '20 at 07:53
-
@shadowwalker The remaining numbers may be ignored. It's either a one or two or it's not. – Parcly Taxel Apr 10 '20 at 07:53
-
-
-
@Parcly Taxel, I don't understand what do you mean. Could you pls explain? – ForumWhiner Apr 10 '20 at 17:57
-
@ForumWhiner There's nothing about it. You first wait for the first number, and then you wait for the second. You cannot wait for both at the same time. As such, by linearity of expectation, we add the expectations together to get the final result. – Parcly Taxel Apr 10 '20 at 18:06
-
@Parcly Taxel, Expected number of rolls to get 1 is 6. The expected number of rolls to get 2 is 6. By linearity of expectations it's 12. So the expected number of rolls to get 1 and 2 is 12. My question is why should one bother about expected number of not getting a 1 or 2. – ForumWhiner Apr 10 '20 at 18:12
-
@ForumWhiner Your calculation would be correct if we were waiting for a one first and then a two, but here the two might come before the one. Both cases must be taken into account. – Parcly Taxel Apr 10 '20 at 18:14
-
Let $X$ the random variable "first moment when both $1$ and $2$ appeared". (The space is the space of all sequence of possible tosses. ) We'll find $$P(X\ge k)$$ Let $Y_{1,k-1}$ the event that $i$ did not appear in the first $k-1$ tosses. Then $$P(X\ge k) = P(Y_{1,k-1}\cup Y_{2,k-1})= P(Y_{1,k-1})+P(Y_{2,k-1})-P(Y_{1,k-1}\cap Y_{2,k-1}) =2(5/6)^{k-1}-(4/6)^{k-1}$$ We have now $$E(X)=\sum_{k=1}^{\infty} k P(X=k)= \sum_{k=1}^{\infty}P(X\ge k) = 2\cdot 6 - 3 = 9$$
Note that the probability $$p_k =P(X\le k) = 1 - P(X\ge k+1) = 1 -(2 (5/6)^k -(4/6)^k)$$
Some values: $p_1=0$, $p_2=0.055\ldots$, $p_7=0.50036\ldots$ (just breaking even), $p_9=0.6383\ldots$, $p_{20}=0.948\ldots$
- 53,909