2

This is Q4.41 of Heard on the Street (2021 edition). I know that the answer is $\frac{11}{18}$, but am trying to find out what is wrong with my solution - ideally would want to do that without looking at their reference solution. There are posts asking the same question, but none with my exact approach (and I'm trying to find out the mistake with my approach).

The question

Take a stick and break it randomly into three pieces (i.e., two randomly placed breaks on the stick). What is the expected length of the longest piece?

My attempt

Let $x$ and $y$ be the length of the first and second piece respectively. Then the length of the third piece is $1 - x - y$.

Let $P_1$ represent the constraints that we can assume are satisfied. These include

  • $0 < x < 1$
  • $0 < y < 1$
  • $x + y < 1$

Let $P_2$ represent the constraints that we want to satisfy. We want

  • $x > y$ (first piece greater than the second)
  • $x > (1 - x - y)$ (first piece greater than the third). This is equivalent to $2x + y > 1$.

Now consider a graph: https://www.desmos.com/calculator/ranldhsm3r or the below image:

Graph representation (do not have the reputation to embed an image)

Firstly, notice that if $x \geq \frac{1}{2}$, it must be the case that $x$ is the largest side; similarly, when $x \leq \frac{1}{3}$, there is no way that $x$ can be the the largest side. Hence the focus now is to consider the case when $\frac{1}{3} < x < \frac{1}{2}$.

What I did then is to consider

  • what's the length of a line perpendicular to a given $x$ which is purely in the constrained region? This would be the distance between the lines $2x + y = 1$ and $x = y$ (or the points $(x, x)$ and $(x, 1 - 2x)$). An application of the distance formula tells that it is $3x - 1$.
  • what is the range of possible values of $y$? $1 - x$.

I validated this with an example. Suppose that $x = 0.4$. Then, $y$ can be anywhere from 0 to 0.6. But if $y < 0.2$, $1 - x - y > x$. Similarly, if $y > 0.4$, $y > x$. Hence the region where $x$ would be the greatest is 0.2, and the range of values $y$ can take is 0.6.

Now, to find expectations. This is

$$ E(X) = \int_{\frac{1}{3}}^{\frac{1}{2}} \frac{x(3x - 1)}{1 - x} + \frac{1}{2} $$

(because the probability that $x$ is the greatest side is 1 when $x > \frac{1}{2}$)

There are many ways to perform the outer integral, which I won't mention. The point is that the answer is 0.03369747823689519, and hence the final answer is ~0.53, which is not equal to $\frac{11}{18}$.

I'm not sure on what I'm missing, and would appreciate assistance.

1 Answers1

2

Let x and y be the length of the first and second piece respectively.

:

I'm not sure on what I'm missing, and would appreciate assistance.

The first thing I spotted was that these variables are not uniformly distributed. They are based on the order statistics for a sample of two uniformly distributed random variables. $$X=U_{(1)}, Y=U_{(2)}-U_{(1)}$$

That and your constraint set $P_1$, obtain the joint pdf:

$$\begin{align}f_{X,Y}(x,y) &=2\,\mathbf 1_{0\leq x}\,\mathbf 1_{0\leq y}\,\mathbf 1_{x+y\leq 1}\\ f_X(x)&=2\,(1-x)\,\mathbf 1_{0\leq x\lt 1}\\ f_Y(y)&=2\,(1-y)\,\mathbf 1_{0\leq y\lt 1}\\f_{Y\mid X}(y\mid x) &=\dfrac 1{1-x}\,\mathbf 1_{0\leq y\leq 1-x}\,\mathbf 1_{0\leq x\leq 1} \end{align}$$


Next you are using symmetry to argue $\mathsf E(\max\{X,Y,1-X-Y\} = 3\mathsf E(X\mathbf 1_{X=\max\{X,Y,1-X-Y\}})$ . Good.

You seem to be attempting:

The probability that $X$ is the largest value, for a particular value of $X$, is...

$$\begin{align}G(x) &= \mathsf P(\max\{Y, 1-x-Y\}\leq x\mid X=x)\\&=\mathsf P(1-x-Y\leq Y\leq x\mid X=x)+\mathsf P(Y\leq 1-x-Y\leq x\mid X=x)\\&=\mathsf P((1-x)/2\leq Y\leq x\mid X=x)+\mathsf P(1-2x\leq Y\leq (1-x)/2\mid X=x)\\&=\int_{(1-x)/2}^x f_{Y\mid X}(y\mid x)\,\mathrm d y+\int_{1-2x}^{(1-x)/2}f_{Y\mid X}(y\mid x)\,\mathrm d x\\&=\dfrac 1{1-x}\,\mathbf 1_{0\leq x\leq 1}\left(\int_{\max\{0,(1-x)/2\}}^{\min\{x,1-x\}} \mathrm d y+\int_{\max\{0,1-2x\}}^{\min\{1-x,(1-x)/2\}}\mathrm d y\right)\\&={\dfrac 1{1-x}\left(\mathbf 1_{1/3\leq x\lt 1/2}\left(x-(1-x)/2+(1-x)/2-(1-2x)\right)\\\qquad +\mathbf 1_{1/2\leq x\leq 1}\left(1-x-(1-x)/2+(1-x)/2\right)\right)}\\&={\dfrac {3x-1}{1-x}\,\mathbf 1_{1/3\leq x\lt 1/2} +\mathbf 1_{1/2\leq x\leq 1}}\end{align}$$

So, since $f_X(x)=2~(1-x)\,\mathbf 1_{0\leq x\leq 1}$, therefore $$\begin{align}\mathsf E(\max\{X,Y,1-X-Y\})&=3\,\mathsf E(X\,\mathbf 1_{X=\max\{X,Y,1-X-Y\}})\\&=3\int_0^1 x\,G(x)\,f_X(x)\,\mathrm d x\\&=3\,\left(\int_{1/3}^{1/2}\dfrac{3x^2-x}{1-x}f_X(x)\,\mathrm d x+\int_{1/2}^1 x\,f_X(x)\,\mathrm d x\right)&&\color{red}\bigstar\\&=\int_{1/3}^{1/2}18x^2-6x\,\mathrm d x+\int_{1/2}^1 6x(1-x)\,\mathrm d x\\&={\bigl[6x^2-3x^2\bigr]}_{x=1/3}^{x=1/2}+{\left.\bigl[3x^2-2x^3\bigr]\right.}_{x=1/2}^{x=1}\\&=\dfrac 19+\dfrac 12\\&=\dfrac{11}{18}\end{align}$$


Here's how I'd do it.

Now $x=\max\{x,y,1-x-y\} \implies x>\max\{y,(1-y)/2\}$.

Also $y=\max\{y,(1-y)/2\}\implies y>1/3$

So you want to calculate: $$\begin{align}&\mathsf E(\max\{X,Y,1-X,Y\}) \\&= 3\mathsf E(X\mathbf 1_{X=\max\{X,Y,1-X-Y\}})\\&=3\mathsf E(\mathsf E(X\mathbf 1_{X>\max\{Y,(1-Y)/2\}}\mid Y))\\&=3\mathsf E(\mathsf E(X\mathbf 1_{(1-Y)/2<X}\mid Y)\mathbf 1_{Y\lt 1/3}+\mathsf E(X\mathbf 1_{Y<X}\mid Y)\mathbf 1_{1/3\leq Y}) \\&= 6\int_0^{1/3} \int_{(1-y)/2}^{1-y} x \mathrm d x\,\mathrm d y+6\int_{1/3}^{1/2}\int_y^{1-y} x \,\mathrm d x\,\mathrm dy\\&~~\vdots\\&=\dfrac{11}{18}\end{align}$$

That's all

Graham Kemp
  • 129,094
  • I am confused with some of your notation. For example, consider $\textbf{1}$. I normally understand this to be the vector of 1s, but then I do not know what you mean by $\textbf{1}_{0 \leq y \leq 1 - x}$ - as we aren't working with vectors unless I am missing something. and I am not sure what you are trying to say. – Leaderboard May 18 '22 at 16:09
  • (separate comment due to character limits)

    Also, to try to see if I can expand on my reasoning. What I was trying to do is find the probability that $x$ would be the greatest - which I found to be $f(x) = \frac{3x - 1}{1 - x}$ for $\frac{1}{3} < x < \frac{1}{2}$ (and gave an example above to validate my reasoning). Then, the expectation would be $\int{x\times f(x)}$ which is $\int{x \times \frac{3x - 1}{1 - x} dx}$.

    Would help if you could clarify/let me know what you don't understand - thanks in advance. I am trying to figure out whether my reasoning itself is faulty (or not).

    – Leaderboard May 18 '22 at 16:13
  • 1
    It is an Indicator function: a piecewise function equalling 1 when the subscript is true, and otherwise equalling 0 .$$\mathbf 1_{x\in A}=\begin{cases}1&:&x\in A\0&:&x\notin A\end{cases}$$ – Graham Kemp May 18 '22 at 21:58
  • 1
    @Leaderboard Ah... Got it. Re: $\color{red}\bigstar$ I can confirm your probability for $X$ being the maximum length for a given $X$, but as I first noticed you were treating $X$ as being uniformly distributed. Use the right marginal density function, and you get the correct answer. – Graham Kemp May 19 '22 at 09:08
  • How did you get the marginal densities $f_X(x)$ and $f_Y(y)$? I can't seem to replicate the expression you get - as the region $P_1$ is a triangle, I am simply getting $x$ (clearly incorrect).

    Also, I am not fully sure I understand the observation about the random variables not being uniform. Isn't $x$ uniform? I can see that $y$ (and $1 - x - y$) have a dependency on the value of $x$, but not sure if I am getting the concept correctly. Thanks in advance.

    – Leaderboard May 20 '22 at 17:03
  • $X$ is the minimum value of two random points on the stick. The break points are iid uniformly distributed, but $X$ is not ; for instance it is more likely to be small than large. The event for $X$ being a value is the event that on break point is there and the other somewhere rightward. So$$f_X(x)= 2,f_U(x),(1-F_U(x))$$ – Graham Kemp May 20 '22 at 22:39
  • Why can we not take $X$ as the break points themselves, instead of taking the minimum value (which I understand is not uniform)?

    (that is, why can't $X$ represent $x$ literally, unless I have misunderstood your response)

    BTW: my reputation does not allow me to upvote you, hence the 0 on your answer as of writing.

    – Leaderboard May 25 '22 at 17:34
  • 1
    @Leaderboard It is because when selecting two points at random on the segment, one half of the time the first point will be further along the stick than the second. Thus length $X$ measures from $0$ to the nearest of the two points (the minimum). – Graham Kemp May 26 '22 at 00:21
  • To be clear, is $f_U$ the uniformly generated break point? I do not see that function referenced in your answer.

    Also, can you explain on where the 2 is coming from in your computation of the joint and marginal densities? Because I can't seem to replicate that in my (unsuccessful) attempts.

    – Leaderboard May 27 '22 at 17:14
  • 1
    There are two breakpoints; each iid uniformly distributed. One will be the minimum. So the density of the minimum will be: $$\begin{align}f_X(x) & = f_{U_1}(x)~(1-F_{U_2}(x))+ (1-F_{U_1}(x)),f_{U_2}(x)\&= 2~(1-x)~\mathbf 1_{0\leqslant x\leqslant 1}\end{align}$$ – Graham Kemp May 28 '22 at 00:57
  • 1
    For the other marginal $$\begin{align}f_Y(y) &= \int_{\Bbb R} f_{U_2-U_1, U_1}(y, x)+f_{U_1-U_2, U_2}(y, x),\mathrm dx\&=\int_\Bbb R f_{U_2}(x+y)~f_{U_1}(x)+f_{U_1}(x+y)~f_{U_2}(x),\mathrm d x\&=\int_0^{1-y}2,\mathrm d x\&= 2~(1-y)~\mathbf 1_{0\leqslant y\leqslant 1}\end{align}$$ – Graham Kemp May 28 '22 at 01:08
  • 1
    Of course the joint pmf is$$\begin{align}f_{X,Y}(x,y) &= f_{U_1}(x) f_{U_2}(x+y)+ f_{U_1}(x+y) f_{U_2}(x)\&= 2,\mathbf 1_{0\leqslant x\leqslant x+y\leqslant 1}\end{align}$$ – Graham Kemp May 28 '22 at 01:22
  • What exactly is $f_{U_1}$ though? I don't see that defined, but could be missing something. – Leaderboard May 28 '22 at 17:59
  • The density of a uniform random variable over $[0;1]$ – Graham Kemp May 29 '22 at 04:44
  • Is that not just

    $$ f_{U_{1/2}} = \int_{0}^{1} dx = x $$

    If so, the problem is that I'm getting the wrong result for the marginal:

    $f_x(x) = x(1 - x) + (1 - x)x = 2x(1 - x)$

    and am not sure what I could be missing.

    – Leaderboard May 30 '22 at 20:32
  • 1
    The probability density function for a uniformly distributed random variable over $[0;1]$ is just $f_U(x)=\mathbf 1_{x\in[0;1]}$. – Graham Kemp May 30 '22 at 21:23