Monday, May 11, 2026

Classic Random-Ade Recipe

I’m preparing a mixture of “random-ade” using a large, empty pitcher and two 12-ounce glasses.

First, I fill one glass with some amount of lemon juice chosen randomly and uniformly between 0 and 12 ounces. I fill the other glass with some amount of water, also chosen randomly and uniformly between 0 and 12 ounces. Next, I pour an equal amount from each glass into the pitcher until one of the glasses is empty.

At this point, I refill that empty glass with yet another random amount of the same liquid it previously contained. Once again, I pour an equal amount from each glass into the pitcher until one of the glasses is empty.

On average, how much random-ade can I expect to prepare? (Note that all three random amounts in this problem are chosen independently of each other.)

Let's first define some terms. Let $L \sim U(0,12)$ be the random volume of lemon juice in ounces first poured into the lenom juice glass. Let $W \sim U(0,12)$ be the random volumn of water in ounces first poured into the water glass. Let $V \sim U(0,12)$ be the random volume poured into the empty glass after the first volume of random-ade was poured into the pitcher. By desing with have $L,$ $W,$ and $V$ independent.

There are two volumes of random-ade that are generated. First, the amount $\min \{ L, W \}$ is poured into the pitcher. After $V$ is poured into the now empty glass, the two glasses have volumes of $|L - W|$ and $V$. So the second volume of random-ade that is poured is $\min \{ V, |L - W | \}.$ Therefore, the total amount of random-ade that is generated is $$R(L, W, V) = \min \{ L, W \} + \min \{ V, |L - W |\}.$$ The only thing left to do is to take the average.

We can do this by first taking the conditional average based on the value of $V.$ This gives us a nice two dimensional integral, \begin{align*} R(V) = \mathbb{E} \left[ R( L, W, V ) \mid V \right] &= \int_0^{12} \int_0^{12} R( L, W, V ) \, \frac{dW}{12} \frac{dL}{12} \\ &= 2 \int_0^{12} \int_L^{12} R(L, W, V) \frac{dW}{12} \frac{dL}{12},\end{align*} where we second inequality is based on the symmetry about the line $L = W.$ We can break this further down into three cases:

  • $A = \{ (L, W) \mid 0 \leq L \leq 12 - V, L + V \leq W \leq 12 \},$ where we have $R(L, W, V) = L + V;$
  • $B = \{ (L, W) \mid 0 \leq L \leq 12 - V, L \leq W \leq L + V \},$ where we have $R(L, W, V) = L + (W-L) = W;$
  • $C = \{ (L, W) \mid 12 - V \leq L \leq 12, L \leq W \leq 12 \},$ where we have $R(L, W, V) = L + (W-L) = W.$

Therefore, we see that \begin{align*}A(V) &= \iint_A R(L, W, V) dA = \int_0^{12-V} \int_{L+V}^{12} (L+V) \,\frac{dW}{12} \frac{dL}{12} \\ &= \frac{1}{144} \int_0^{12-V} (L+V)(12 - L - V) \,dL \\ &= \frac{1}{144} \int_V^{12} u(12-u) \,du \\ &= \frac{1}{144} \left[ 6u^2 - \frac{u^3}{3} \right]_{u=V}^{u=12} \\ &= 2 - \frac{1}{24}V^2 + \frac{1}{432}V^3\end{align*} along with \begin{align*}B(V) &= \iint_B R(L, W, V) dA = \int_0^{12-V} \int_{L}^{L+V} W \, \frac{dW}{12} \frac{dL}{12} \\ &= \frac{1}{144} \int_0^{12-V} \left[\frac{W^2}{2} \right]^{W=L+V}_{W=L} \,dL \\ &= \frac{1}{144} \int_0^{12-V} \left( \frac{(L+V)^2 - L^2}{2} \right) \,dL \\ &= \frac{1}{288} \int_0^{12-V} 2LV + V^2 \,dL \\ &= \frac{1}{288} \left( V(12-V)^2 + V^2(12-V) \right) \\ &= \frac{1}{2}V - \frac{1}{24} V^2,\end{align*} and finally \begin{align*}C(V) &= \iint_C R(L,W,V) dQ = \int_{12-V}^{12} \int_L^{12} W \,\frac{dW}{12} \frac{dL}{12} \\ &= \frac{1}{144} \int_{12-V}^{12} \left(72 - \frac{L^2}{2} \right) \,dL \\ &= \frac{1}{144} \left[ 72L - \frac{L^3}{6} \right]_{L=12-V}^{L=12} \\ &= \frac{1}{144} \left( \left(72 \cdot 12 - \frac{12^3}{6} \right) - \left( 72 \cdot (12 - V) - \frac{(12-V)^3}{6} \right) \right) \\ &= \frac{1}{144} \left( 6V^2 - \frac{V^3}{6} \right) = \frac{1}{24} V^2 - \frac{1}{864} V^3. \end{align*} So putting this altogether we see that \begin{align*}R(V) &= \mathbb{E}\left[ R(L, W, V) \mid V \right] \\ &= 2 \left( A(V) + B(V) + C(V) \right) \\ &= 2 \left( 2 + \frac{1}{2} V - \frac{1}{24} V^2 + \frac{1}{864} V^3 \right) \\ &= 4 + V - \frac{1}{12} V^2 + \frac{1}{432} V^3.\end{align*} Therefore, taking the expected value we get that the average volume of random-ade made with this Classic recipe is \begin{align*}\mathbb{E}[R] &= \int_0^{12} R(V) \, \frac{dV}{12} \\ &= \frac{1}{12} \int_0^{12} \left( 4 + V - \frac{1}{12} V^2 + \frac{1}{432} V^3 \right) \,dV \\ &= \frac{1}{12} \left( 4 \cdot 12 + \frac{12^2}{2} - \frac{12^3}{36} + \frac{12^4}{1728} \right) \\ &= 4 + 6 - 4 + 1 = 7\end{align*} ounces.

No comments:

Post a Comment