Expected value of the number of die rolls for both 1 and 2 appeared? Given a faired 6 faces die.
I known the number of rolls to get 1 twice is followed by negative binomial distribution which is $\frac{2}{\frac16}=12$.
But what if the question change to both 1 and 2 appeared? Does it also considered as 2 independent geomitric distributions?
 A: In that case you are dealing with $X=N+M$ where $N$ has geometric distribution with parameter $\frac13$ and $M$ has geometric distribution with parameter $\frac16$.
Here $N$ denotes the number of trials needed to arrive at $1$ or $2$.
$M$ denotes the number of remaining trials needed to arrive at the element of $\{1,2\}$ that has had no appearance yet in the first $N$ trials.
Consequently $$\mathbb EX=\mathbb EN+\mathbb EM=3+6=9$$
A: You need to do a tiny bit of inclusion–exclusion for this. The probability for $1$ not to have appeared after $n$ rolls is $\left(\frac56\right)^n$, and likewise for $2$. The probability for neither to have appeared after $n$ rolls is $\left(\frac46\right)^n$. Thus by inclusion–exclusion the probability that at least one has not appeared after $n$ rolls is
$$
P(N\gt n)=2\left(\frac56\right)^n-\left(\frac46\right)^n\;,
$$
so the expected number of rolls until both have appeared is
\begin{eqnarray}
\sum_{n=0}^\infty P(N\gt n)
&=&
\sum_{n=0}^\infty\left(2\left(\frac56\right)^n-\left(\frac46\right)^n\right)
\\
&=&
2\cdot6-3
\\
&=&
9\;.
\end{eqnarray}
