Finding expected value of remaining piece

$\def\d{\mathrm{d}}\def\peq{\mathrel{\phantom{=}}{} }$As is pointed out by @AndreaL, conditional probability should be used to calculate to desired probability.

Suppose the elder son eats an angle of $X_1$ and the younger son eats an angle of $X_2$. Translating to probabilistic notation, there is $X_1 \sim U(0, 2π)$ and $X_2 \mid X_1 \sim U(0, 2π - X_1)$, and what needs to be found is $E(2π - X_1 - X_2 \mid X_1 \leqslant π, X_2 \leqslant π)$.

The joint density of $(X_1, X_2)$ is$$ f_{X_1, X_2}(x_1, x_2) = f_{X_2 \mid X_1}(x_2 \mid x_1) f_{X_1}(x_1) = \frac{1}{2π(2π - x_1)}, \quad \forall x_1, x_2 > 0, x_1 + x_2 \leqslant 2π $$ thus\begin{align*} &\peq P(X_1 \leqslant π, X_2 \leqslant π)\\ &= \iint\limits_{0 < x_1, x_2 \leqslant π} \frac{1}{2π(2π - x_1)} \,\d x_1\d x_2 = \frac{1}{2π} \int_0^π \int_0^π \frac{1}{2π - x_1} \,\d x_2\d x_1\\ &= \frac{1}{2π} \int_0^π \frac{π}{2π - x_1} \,\d x_1 = \frac{\ln 2}{2}, \end{align*} and\begin{align*} &\peq E(2π - X_1 - X_2 \mid X_1 \leqslant π, X_2 \leqslant π)\\ &= 2π - E(X_1 + X_2 \mid X_1 \leqslant π, X_2 \leqslant π)\\ &= 2π - \iint\limits_{0 < x_1, x_2 \leqslant π} (x_1 + x_2)·\frac{f_{X_1, X_2}(x_1, x_2)}{P(X_1 \leqslant π, X_2 \leqslant π)} \,\d x_1\d x_2\\ &= 2π - \frac{1}{π\ln 2} \int_0^π \int_0^π \frac{x_1 + x_2}{2π - x_1} \,\d x_2 \d x_1\\ &= 2π - \frac{1}{π\ln 2} \int_0^π \frac{π x_1 + \frac{π^2}{2}}{2π - x_1} \,\d x_1\\ &= 2π - \frac{1}{π\ln 2}·\frac{1}{2} (5 \ln 2 - 2) π^2 = \frac{2 - \ln 2}{2\ln 2} π. \end{align*}


Let $x$ be the fraction of pie that the first son eats, and $y$ be the fraction of the remaining pie that the second one eats.

$x$ and $y$ are both taken uniformly in $[0;1]$.

Let $\theta_1 = x$ and $\theta_2 = y(1-x)$ be the fraction of the pie eaten by son 1 and 2 respectively.

You want to find out the expected value of $(1-x)(1-y)$ given that $\theta_1 \le \frac 12$ and $\theta_2 \le \frac 12$.

Let us try to find out the law of $(\theta_1,\theta_2)$ given those two inequalities.

for $z_1,z_2 \le \frac 12$,
$P_{z_1,z_2} = P(\theta_1 \le z_1 \land \theta_2 \le z_2) = P(x \le z_1 \land y(1-x) \le z_2)$ is the area of the corresponding shape inside the unit square, so it is :

$P_{z_1,z_2} = \int_{x=0}^{z_1}\int_{y=0}^{\min(1,z_2/(1-x))} dydx = \int_0^{z_1} \min(1,\frac {z_2}{1-x}) dx$

$1 < \frac {z_2}{1-x} \iff 1-x < z_2 \iff x > 1-z_2$.
Since $x \le z_1 \le \frac 12$ and $1-z_2 \ge \frac 12$, this is impossible, and so

$P_{z_1,z_2} = \int_0^{z_1} \frac {z_2}{1-x} dx = - \ln(1-z_1) z_2$.

Then, $P_{\frac 12,\frac 12} = \frac 12 \ln 2$, and so we finally have

$Q_{z_1,z_2} = P(\theta_i \le z_i \mid \theta_i \le \frac 12) = P_{z_1,z_2}/P_{\frac 12,\frac 12} = - \frac {\ln (1-z_1)}{\ln 2} (2 z_2)$.

Since $Q_{z_1,z_2} = f(z_1)g(z_2)$, you were surprisingly right when you said that $\theta_1$ and $\theta_2$ were independent. You were also right when you said that $\theta_2$ was uniformly distributed in $[0 ; \frac 12]$.
(those were your two statements where I immediately thought you were obviously wrong, which says something about how I am still dumb at probabilities)

However, $\theta_1$ (after conditioning) is not uniformly distributed in $[0 ; \frac 12]$ : if $\theta_1$ is small, there is a higher chance of the second son getting an indigestion than if $\theta_1$ is large. Conditioning on the second son not getting an indigestion then skews the distribution into a not uniform one.

Let us compute the expected fraction of pie eaten by the first son : Since $f'(t) = \frac 1{(1 - t)\ln 2}$,

this is $\int_0^{\frac 12} \frac t{(1 - t)\ln 2} dt = \frac 1 {\ln 2}\int_0^{\frac 12} (-1 + \frac 1{1-t})dt = \frac 1 {\ln 2}(\ln 2 - \frac 12) = 1 - \frac 1{2\ln 2} \approx 0.279 > \frac 14$.

And finally the expected fraction of remaining pie is $1 - (1 - \frac 1{2\ln 2}) - \frac 14 = \frac 1{2\ln 2} - \frac 14 \approx 0.471 < \frac 12$


This post only addresses (hopefully intuitively, without integration) WHY the two distributions are not independent $U(0, \frac{1}{2})$.

One can think of conditional probability as: try the experiment, then if the result doesnt fit the condition, ignore the result and retry the experiment; repeat until the result fits the condition.

Experiment A:

(Step A1) First son eats fraction $x$ of the pie, where $x \sim U(0, 1)$. If $x > \frac{1}{2}$, ignore the result, and retry (Step A1).

(Step A2) At this point we have $x < \frac{1}{2}$. Now second son eats fraction $y$ of the pie, where $y \sim U(0, 1-x)$. If $y > \frac{1}{2}$, ignore the result and retry (Step A2).

In experiment A, it is true that the final $x \sim U(0, \frac{1}{2})$, and the final $y$ also $\sim U(0, \frac{1}{2})$, and $x$ & $y$ are independent. HOWEVER this is not what the OP problem statement says! The OP says conditioned on both $x < \frac{1}{2}$ and $y < \frac{1}{2}$, so the correct experiment is:

Experiment B:

(Step B1) First son eats fraction $x$ of the pie, where $x \sim U(0,1)$.

(Step B2) Second son eats fraction $y$ of the pie, where $y \sim U(0,1-x)$.

(Step B3) If either $x > \frac{1}{2}$ or $y > \frac{1}{2}$, then retry from (Step B1).

The two experiments are NOT equivalent, and only B is the correct interpretation of the wording of the OP.

In particular, in experiment B, the final $x$ does NOT $\sim U(0, \frac{1}{2})$. This can be intuitively seen as follows. If the final $x$ is slightly less than $\frac{1}{2}$ after (Step B1), then chance of $y > \frac{1}{2}$ is $\approx 0$ in (Step B2) and so the chance the whole result needs to be discarded in (B3) is $\approx 0$. Meanwhile, if the final $x$ is almost $0$ after (B1), then the chance of $y > \frac{1}{2}$ is $\approx \frac{1}{2}$ in (B2) and so the chance the whole result needs to be discarded in (B3) is $\approx \frac{1}{2}$. Basically, after (B1), a larger $x$ has a SMALLER chance of being discarded in (B3). So the final $x$ has a better chance to be large (close to $\frac{1}{2}$) than to be small (close to $0$), and E[final $x$] strictly $> \frac{1}{4}$, so clearly final $x$ does not $\sim U(0, \frac{1}{2})$.