Breaking a unit stick uniformly into two pieces

probability

I need help with the following question:
A unit stick is broken at a point chosen at random (uniformly), what is the expected value of the longer piece?

I tried this:
X – the point chosen, $X\sim Uni[0,1]$
Y – the longer piece.
if $X>\frac12$ then $Y=X$, else if $X\le\frac12$ then $Y=1-X$
I wanted to calculate $P(Y\le y)$ but I'm having trouble with that.
$P(Y\le y)=P(\max(X,1-X)\le y) = P(1-y\le X\le y)$
(I wanted to calculate PDF, then find density and calculate the expected value)

Can give me a hint on how to procced from here?

I have seen some similar questions asked here but I could not understand the solutions suggested

Best Answer

As you always take the greater piece it's the same as taking the expected value of a uniformly distributed random variable between $0.5$ and $1$. Why?

You can write your expected value as $$ E[Y] = \frac 1 2 \cdot E[Y|X\geq 0.5] + \frac 1 2 \cdot E[Y|X \leq 0.5] $$ because $X$ is uniform, so $P(X\geq 0.5) = P(X\leq 0.5) = \frac 1 2$.

However, $E[Y|X\geq 0.5]=E[Y|X\leq 0.5]$, because each possibility for $Y$ on the LHS has a correspondence on the RHS (just the shorter and longer stick switch places). So we get $$ E[Y] = E[Y|X\geq 0.5] = E[X|X\geq 0.5] = E[Z] = \frac 3 4 $$ where $Z$ is a uniformly distributed random variable on $[0.5,1]$, because given that $X\geq 0.5$ we already know that $X$ is the biggest stick and uniformly distributed between $0.5$ and $1$.

Related Question