This is from Ross.

I know how to solve everything but (d).

The book answer is $\frac{123}{35}$.

There are $4$ different types of coupons, the first $2$ of which compose one group and the second $2$ another group. Each new coupon obtained is type $i$ with probability $p_i$, where $p_1 = p_2 = 1/8$ and $p_3 = p_4 = 3/8$. Find the expected number of coupons that one must obtain to have at least one of

(a) all 4 types; (b) all the types of the first group; (c) all the types of the second group;

(d) all the types of either group.

My attempt

Let $X =$ number of coupons needed to collect all the types of either group.

Let's number the coupons $1$ through $4$ where $1$ and $2$ are part of the first group and $3$ and $4$ are part of the second. Let's say that the notation $4132$ represents the order of newest types seen. For example if you observe $44111332$ then the order of newest types seen was $4132$.

To get the $E[X]$ I'll condition on every arrangements where the game stops once you have all the types of either group.

$$E[X] = E[X \mid 12]P(12) + E[X \mid 132]P(132) + E[X \mid 134]P(134) + E[X \mid 142]P(142) + E[X \mid 143]P(143) + E[X \mid 21]P(21) + E[X \mid 231]P(231) + E[X \mid 234]P(234) + E[X \mid 241]P(241) + E[X \mid 243]P(243) + E[X \mid 312]P(312) + E[X \mid 314]P(314) + E[X \mid 321]P(321) + E[X \mid 324]P(324) + E[X \mid 34]P(34) + E[X \mid 412]P(412) + E[X \mid 413]P(413) + E[X \mid 421]P(421) + E[X \mid 423]P(423) + E[X \mid 43]P(43)$$

For example to get the first term, $E[X \mid 12] = 1 + \frac{2}{1}$ where the logic is given that you know the coupon types will appear as $12$, the number of coupons needed to get $1$ must be one and then to get $2$ it's the expected value of a geometric RV with $p=\frac{1/8}{1/8+1/8} = \frac{1}{2}$.

To get $P(12)$ we use the multiplication rule. $P(12) = P(1) P(1 \mid 2) = \frac{1}{8} \frac{1}{7} = \frac{1}{56}$. So $E[X \mid 12]P(12) = (1 + \frac{2}{1}) \frac{1}{56}$.

To get the second term, $E[X \mid 132] = 1 + \frac{4}{3} + \frac{4}{1}$ where you know the number of coupons needed to collect $1$ and $2$ is one and to get the middle it's a geometric RV with $p = \frac{3/8}{3/8+1/8} = 3/4$.

To get $P(132) = P(1) P(3 \mid 1) P(2 \mid 13) = \frac{1}{8} \frac{3}{7} \frac{1}{4}$.

Next put it in a python script and get the answer.

Unfortunately I get $3.4 \neq \frac{123}{35} = 3.51428$.

My questions

Can you point out where I'm going wrong? Also, what is the more elegant approach? Thanks.

  • $\begingroup$ FYI - the two different approaches below by Ross M and joriki are great and work. The attempt written in the original post by me is wrong and also the least elegant but it can be fixed. $E[X \mid 12] = 1 + \frac{1}{1-\frac{1}{8}} = 15/7$ and not $1+\frac{2}{1}$. (Thanks to joriki for pointing out how to fix it in question 2923059) $\endgroup$ – HJ_beginner Sep 21 '18 at 5:06

I would say there are five states, $a,b,c,d,e$, where $a$ has no coupons, $b$ has one coupon from group $1$ and none from group $2$, $c$ has one coupon from group $2$ and none from group $1$, $d$ has one coupon from each group, and $e$ has two coupons from one group and is final.

If you are in state $d$ you finish with probability $\frac 12$ so the expected number of draws from $d$ is $2$.

If you are in state $c$ you finish with probability $\frac 38$, go to $d$ with probability $\frac 14$ and stay in $c$ with probability $\frac 38$. The expected number of draws from $c$ is $$E(c)=1\cdot \frac38 + (1+E(d))\cdot \frac14 +(1+E(c))\cdot \frac 38\\ \frac 58E(c)=\frac 32\\E(c)=\frac {12}5$$ If you are in state $b$ you finish with probability $\frac 18$, go to $d$ with probability $\frac 34$ and stay in $b$ with probability $\frac 18$. The expected number of draws from $b$ is $$E(b)=1\cdot \frac 18+(1+E(d))\cdot \frac 34+(1+E(b))\frac 18\\ \frac 78E(b)=\frac 52\\E(b)=\frac {20}7$$ Finally from $a$ you go to $b$ with probability $\frac 14$ and to $c$ with probability $\frac 34$ so $$E(a)=(1+E(b))\frac 14+(1+E(c))\frac 34\\=\frac {27}{28}+\frac {51}{20}\\=\frac {123}{35}\approx 3.514$$

| cite | improve this answer | |
  • 1
    $\begingroup$ No, I am not the same Ross that is the source of the problem. $\endgroup$ – Ross Millikan Sep 18 '18 at 18:30
  • $\begingroup$ Thanks for your solution... very clever... it makes sense though I will need to meditate on it. Small point, but I think the final equality should be an approximation... that is $\frac{27}{28}+\frac{51}{20} \approx \frac{25}{7}$ but whatever you have the right answer. By any chance do you have any thoughts on what was wrong with my approach? Instead of thinking about it in general states like you did I just conditioned on every state. $\endgroup$ – HJ_beginner Sep 18 '18 at 18:47
  • 1
    $\begingroup$ Actually, $\frac {27}{28}+\frac {51}{20}={123\over 35}$ the same answer the other Ross gets. $\endgroup$ – saulspatz Sep 18 '18 at 18:56
  • $\begingroup$ @saulspatz: thanks. I misrecognized the decimal when I calculated the sum $\endgroup$ – Ross Millikan Sep 18 '18 at 19:14
  • 2
    $\begingroup$ When you compute E(132) the waiting time for the $2$ is $5$ because you are guaranteed to draw a $1,2,$ or $3$ and the $2$ accounts for $\frac 15$ of the probability. $\endgroup$ – Ross Millikan Sep 18 '18 at 19:32

Let $N_1$, $N_2$, $N_\land$ and $N_\lor$ denote the numbers of coupons you need to draw to get all types of the first group, of the second group, of both groups and of either group, respectively. Then

\begin{eqnarray*} \mathsf E[N_\lor] &=& \sum_{n=0}^\infty\mathsf P(N_\lor\gt n) \\ &=& \sum_{n=0}^\infty\mathsf P(N_1\gt n\land N_2\gt n) \\ &=& \sum_{n=0}^\infty\left(\mathsf P(N_1\gt n)+\mathsf P(N_2\gt n)-\mathsf P(N_1\gt n\lor N_2\gt n)\right) \\ &=& \sum_{n=0}^\infty\left(\mathsf P(N_1\gt n)+\mathsf P(N_2\gt n)-\mathsf P(N_\land\gt n)\right) \\ &=& \mathsf E[N_1]+\mathsf E[N_2]-\mathsf E[N_\land]\;. \end{eqnarray*}

These are the results of parts (a) through (c) that you've already solved; the result is

$$\mathsf E[N_\lor]=12+4-\frac{437}{35}=\frac{123}{35}\;.$$

| cite | improve this answer | |
  • $\begingroup$ Hmmm very nice... I figured when doing part (d) that the results from part (b) and (c) would come into play. It looks like you used inclusion exclusion rule and the one property for expected value (your first equality) that I would not be clever enough to think of using for this problem. Question... should the second row be $N_1 > n \cup N_2 > n$? Where it's $\cup$ vs $\cap$? I could be totally off... $\endgroup$ – HJ_beginner Sep 18 '18 at 21:00
  • 1
    $\begingroup$ @HJ_beginner: No, I think it's the right way around. We haven't completed either group if we haven't completed the first group and we haven't completed the second group. As regards thinking of this property of the expected value: Keep that in mind; it often comes in useful in coupon collection problems. I went through my answers to coupon collection problems and found that $7$ out of $32$ (including this one) use this property: $\endgroup$ – joriki Sep 18 '18 at 21:16
  • 1
    $\begingroup$ math.stackexchange.com/a/1842984, math.stackexchange.com/a/1824331, math.stackexchange.com/a/1454749, math.stackexchange.com/a/1836308, math.stackexchange.com/a/1786978, math.stackexchange.com/a/1794043 (where the last one confirms the connection you draw to inclusion-exclusion) $\endgroup$ – joriki Sep 18 '18 at 21:17
  • 1
    $\begingroup$ As always thank you for your help. I will check those out! I believe your answer is in line with what Sheldon Ross (the author) was thinking. But I already gave other Ross the check mark and his answer was great too. I would give multiple checks if I could. #greencheck $\endgroup$ – HJ_beginner Sep 18 '18 at 22:10
  • $\begingroup$ @HJ_beginner: You might also want to check out this answer, where I reapplied the two approaches Ross and I took here. Whereas I agree that here my approach is probably what Sheldon Ross was aiming for, in that other case Ross's approach requires quite a bit less computation than mine. $\endgroup$ – joriki Sep 20 '18 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.