Conditional Probability Cupcakes

Defining events:

$v_1$: a vanilla cupcake is selected at first

$v_2$: a vanilla cupcake is selected at second

$b_1$: a vanilla cupcake is selected from box 1

$b_2$: a vanilla cupcake is selected from box 2

It is asked about $P(v_2|v_1)=\frac{P(v_1 \cap v_2)}{P(v_1)}$

$P(v_1 \cap v_2)$: Probability, that two vanilla cupcakes are selected.

It is impossible to select two cupcakes from box 1.

Thus $P(v_1 \cap v_2)=p(b_2)\cdot P(v_1)\cdot p(v_2|v_1)=0.5\cdot \frac{2}{4}\cdot \frac{1}{3}=\frac{1}{12}$

$P(v_1)=P(b_1)\cdot P(v_1|b_1)+ P(b_2)\cdot P(v_1|b_2)=\frac{1}{2}\cdot \frac{1}{4}+\frac{1}{2}\cdot \frac{1}{2}=\frac{3}{8}$

Therefore $P(v_2|v_1)=\frac{1}{12}\cdot \frac{8}{3}=\frac{2}{9}$


Let's define the following events: the event that first box is chosen is $B_1$, the event that the second box is chosen is $B_2$, the event that the first cake is vanilla is $V_1$, the event that the second cake (from the same box) is vanilla is $V_2$. What you want to find is exactly $\Pr(V_2 | V_1)$.

First, we have, by definition, \begin{align} &\Pr(V_2 | V_1) = \frac{\Pr(V_1, V_2)}{\Pr(V_1)} \end{align}

Next, we find those two probabilities on RHS, \begin{align} \Pr(V_1, V_2) &= \Pr(V_1, V_2, B_1) + \Pr(V_1, V_2, B_2) \\ &= \Pr(V_1, V_2 | B_1) \cdot \Pr(B_1) + \Pr(V_1, V_2 | B_2) \cdot \Pr(B_2) \\ &= 0 + \frac{1}{6} \cdot \frac{1}{2} \\ &= \frac{1}{12} \end{align} and \begin{align} \Pr(V_1) &= \Pr(V_1 | B_1)\cdot\Pr(B_1) + \Pr(V_1 | B_2)\cdot\Pr(B_2) \\ &= \frac{1}{4} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} \\ &= \frac{3}{8} \end{align}


Working under condition that the first cake chosen is vanilla: let $E$ denote the event that the box picked at random contains another vanillacake.

There are $3$ vanillacakes that can have been chosen with equal probability and in $2$ of these cases the box contains another vanillacake (exactly one).

This tells us that $P\left(E\right)=\frac{2}{3}$.

If $V$ denotes the event that the second selected cake is a vanillacake. Then $$P\left(V\right)=P\left(V\mid E\right)P\left(E\right)+P\left(V\mid E^{c}\right)P\left(E^{c}\right)=\frac{1}{3}\frac{2}{3}+0\frac{1}{3}=\frac{2}{9}$$

Here $P(V\mid E)=\frac13$ because under event $E$ exactly $1$ of the $3$ cakes left to be chosen is vanilla.


This is in fact your own approach, wich is okay except that you failed completing it.