2

The problem is the same as here.

A stick of 1m is divided into three pieces by two random points. Find the average length of the largest segment.

I tried solving it in a different way, and the logic seems fine, however I get a different result to $\frac{11}{18}$.

Here is my solution. Please let me know what I did wrong.

Let $X$ be the length of the stick from the beginning to the first cut. $Y$ be the length of the stick between the first and second cut and $1-X-Y$ the length between the second cut and the end of the stick.

We want to find the CDF of the following random variable: $Z=\max(X,Y,1-X-Y)$. (I believe that if anything is wrong, this might be it).

$$\begin{split} F_Z(z) = P(Z\leq z) & = P(\max(X,Y,1-X-Y) \leq z)\\ & = P(X\leq z, Y\leq z, 1-X-Y\leq z)\\ &= P(1-Y-z\leq X \leq z, Y\leq z) \end{split} $$

Since we have $1-Y-z\leq z$ we deduce that $Y\geq 1-2z$. Hence: $$\begin{split} F_Z(z) &= \int_{1-2z}^z\int_{1-y-z}^z 1 dx dy = \int_{1-2z}^z (z-1+y+z) dy\\ &= (2z-1)(z-1+2z) + \left. \frac{y^2}{2}\right|_{y=1-2z}^{y=z} \\ &=(2z-1)(3z-1) + \frac{1}{2}(z^2- (2z-1)^2) \\ & = (2z-1)(3z-1) +\frac{1}{2}(-3z^2 + 4z -1) \\ & = \frac{1}{2}(3z-1)^2 \end{split} $$ Now, the pdf of $Z$ is : $$f_Z(z) = \frac{d}{dz}F_Z(z) = 9z-3 $$

And now, in order to find the expected value of the largest length, we need to integrate over $(\frac{1}{3},1)$ as the largest piece needs to be greater than $\frac{1}{3}$. Hence

$$\begin{split} E[Z] = \int_{\frac{1}{3}}^{1} z f_Z(z) dz = \int_{\frac{1}{3}}^{1} z (9z-3) dz = \frac{14}{9} \end{split} $$ The result is obviously wrong as it needs to be something between $0$ and $1$, however after going over the solution multiple times, and checking the calculations with Wolfram, I cannot seem to figure out what went wrong.

  • Offhand, it looks like your setup allows $1-X-Y$ to be negative. – Barry Cipra Jun 14 '18 at 15:54
  • 2
    What are $X,Y$ supposed to represent? If they're the lengths of two of the parts, those are not uniformly distributed. I would set $X,Y$ to the coordinates of the two points, and then find the expectation of $\max(\min(X,Y), |X-Y|, 1-\max(X,Y))$. – Daniel Schepler Jun 14 '18 at 15:54
  • Note that $F_Z(1)=\frac 12\times 4=2>1$. For that matter $F_Z(0)=\frac 12$ which is already absurd. As a suggestion, walk through the calculation of $F_Z(0)$ to see where you go awry. – lulu Jun 14 '18 at 15:55
  • @DanielSchepler $X$ is the length of the segment from $0$ to the first cut, and $Y$ is the length from the first cut to the second cut. – Probability-Stats-Optimisation Jun 14 '18 at 15:58
  • @lulu we must have $z\geq \frac{1}{3}$, as it is the largest part – Probability-Stats-Optimisation Jun 14 '18 at 16:01
  • Right. I am just pointing out that your formula implies $F_Z(0)=\frac 12$ so you are seeing a $\frac 12$ chance that all three segments have $0$ length, which (as you remark) is not possible. – lulu Jun 14 '18 at 16:05
  • @lulu agree. It means the surface over which I integrated is wrong. – Probability-Stats-Optimisation Jun 14 '18 at 16:06
  • http://www.wolframalpha.com/input/?i=integrate+(Boole%5Bmax(min(x,y),%7Cy-x%7C,1-max(x,y))+%3C+z%5D)+over+x%3D0+to+1+and+y%3D0+to+1 seems to show the correct cdf should be $(3z-1)^2$ for $1/3 \le z \le 1/2$ and $-3z^2 + 6z + 2$ for $1/2 \le z \le 1$. – Daniel Schepler Jun 14 '18 at 16:11
  • @AndreiCrisan, I think it will help people point out what's wrong if you edit your post to include a explanation of your understanding of what the variables $X$, $Y$, and $1-X-Y$ refer to. (Kudos, incidentally, for recognizing the result is "obviously wrong." Not every student bothers to think about the meaning of the numbers they compute.) – Barry Cipra Jun 14 '18 at 16:15
  • In that case, the joint distribution of $X,Y$ would be gotten by: $p(x_0 \le X \le x_0 + \epsilon, y_0 \le Y \le y_0 + \delta) \approx 2 p(x_0 \le P_1 \le x_0 + \epsilon, y_0 \le P_2 - P_1 \le y_0 + \delta) \approx 2 \epsilon \delta$ if $X < Y$ and 0 if $X > Y$; so the joint distribution density would be $2 \chi_{X < Y}$. (Here, $P_1$ is the random variable representing one of the points, and $P_2$ is for the other; in the former case, the region is a parallelogram with base $\delta$ and height $\epsilon$.) – Daniel Schepler Jun 14 '18 at 16:30
  • @BarryCipra, yes, thanks for pointing it out that i did not write what $X$ and $Y$ were. Edited to include what they mean. – Probability-Stats-Optimisation Jun 14 '18 at 16:36
  • So, you really want to integrate 2, and restrict integration also to the region where $x \le y$. – Daniel Schepler Jun 14 '18 at 16:38
  • Sorry, I guess it should actually be the joint distribution density of $X,Y$ is $2 \chi_{X+Y \le 1}$ and thus integrate 2 over the region you have intersected with the region where $x+y \le 1$. – Daniel Schepler Jun 14 '18 at 16:41
  • Yes, you are absolutely right, this makes a lot of sense, forgot to make the constraint that $x+y\leq 1$. I will add this and see what the result will be. I'll come back with updates. – Probability-Stats-Optimisation Jun 14 '18 at 16:49
  • Note that in terms of the two random points, if $1/3 \le z \le 1/2$ then the region is a union of two triangles, e.g.: http://www.wolframalpha.com/input/?i=implicit+plot+of+max(min(x,y),%7Cy-x%7C,1-max(x,y))+%3C%3D+0.4,+0+%3C%3D+x+%3C%3D+1,+0+%3C%3D+y+%3C%3D+1 and if $1/2 \le z \le 1$ the region is the unit square minus two squares and two triangles, e.g.: http://www.wolframalpha.com/input/?i=implicit+plot+of+max(min(x,y),%7Cy-x%7C,1-max(x,y))+%3C%3D+0.7,+0+%3C%3D+x+%3C%3D+1,+0+%3C%3D+y+%3C%3D+1 so that might simplify calculations in the end. – Daniel Schepler Jun 14 '18 at 16:55
  • Simulation in R: big = replicate(10^6, max(diff(sort(c(0,runif(2),1))))); mean(big) returns 0.6108739 and $11/18 = 0.6111111.$ In analytic solution it also seems wise to use the two uniformly distributed cut points directly. – BruceET Jun 15 '18 at 03:49

4 Answers4

1

The first integral is wrong, because it assumes that $X,Y$ are uniform and independent on $[0,1]^2$. They are not (for one thing, $X \le Y$).

leonbloy
  • 63,430
0

This is just a suggestion not an answer but could you try solving it keeping the distance of first division as x and second as y making the lengths of the segments as x, y-x ,1-y

Pi_die_die
  • 107
  • 6
0

Here is how I would do it.

Lets define $x$ to be the short stick, $y$ to be the medium stick and $z$ to be the long stick.

$x\le y\le z\\ z = 1-x-y\\ x\le y \le \frac {1-x}{2}\\ x\le \frac 13$

$$ \bar z = \frac {\displaystyle\int_0^\frac 13\int_x^{\frac {1-x}{2}} 1-x-y\ dy\ dx}{\displaystyle\int_0^\frac 13\int_x^{\frac {1-x}{2}} 1\ dy\ dx}$$

Doug M
  • 57,877
  • Would you care to explain the numerator and denominator of your fraction please? – Probability-Stats-Optimisation Jun 15 '18 at 10:07
  • I understand the surface over which you are integrating, however I do not get the existence of the $dz$ terms, given that you only have a double integral. The bottom would simply be the CDF of the $\min(X,Y)$? – Probability-Stats-Optimisation Jun 15 '18 at 10:13
  • Thanks, only integrating over 2 dimensions (and fixed above). $z = 1-x-y$ The numerator gives the average value of z per unit of surface area, and the denominator is the surface such that $x<y<z.$ – Doug M Jun 15 '18 at 16:10
  • I have tried computing this. And it didn’t work, but I don’t trust my arithmetic, Chat GPT didn’t help much either. Has anybody had success using the above expressions? – Martin Geller Jun 15 '23 at 09:12
0

Say the stick is $1$ m long and has 3 points (dividing the stick into 4 equal parts, each 0.25 m long).

Two points are chosen (dividing the stick into 3 parts).

Points are |--A--B--C--|

The number of ways 2 points can be chosen = $^3C_2 = 3$
$P(AB) = P(BC) = P(AC) = \frac{1}{3}$

$X$ = The length of the longest segment.

$E(X) = P(AB) \cdot 0.5 + P(BC) \cdot 0.5 + P(AC) \cdot 0.5 = 0.5$