-1

I know this question has already been asked and answered here:Average length of the longest segment But I am trying to determine the answer in the following way. Let $X$ and $Y$ be two independent uniform variables on $[0,1]$ (the length of the stick is assumed to be equal to 1). If we suppose $Y>X$, then the three lengths of the stick are $X$, $Y-X$ and $1-Y$, so we just have to determine the cdf of $M=\max(X,Y-X,1-Y)$. Let $t\in[0,1]$, then: $$\mathbb{P}(M\leq t)=\mathbb{P}(X\leq t,Y-X\leq t,1-Y\leq t).$$ However, when I try to determine this probability graphically in the unit square, I find $0.5t^2+t-0.5$. I know this is a slightly different approach than the one used in the link above, as I am not going through the laws of $\min(X,Y)$ and $\max(X,Y)$, but rather considering the two symmetric cases where $X<Y$ and $X>Y$. Does anyone understand where I am making a mistake? Thanks.

  • 1
    Initially you have let $X, Y$ be two i.i.d. random variables, but later you make a big suppose that $Y > X$ - which contradict to the i.i.d. assumption. If you are considering something like $Y > X$, then you are essentially considering $Y$ as the maximum of two i.i.d. uniform. – BGM Aug 09 '16 at 04:06
  • I’m voting to close this question because OP has abandoned it – Snoop Oct 09 '22 at 18:23

2 Answers2

1

By your method, you should be calculating :

$$\begin{align}\mathsf P(M\leq t, Y>X) ~=~& \mathsf P(X\leq t, Y-X\leq t, 1-Y\leq t, \color{blue}{Y>X})\\[1ex]~=~& \left(\int_0^1\int_0^1 \mathbf 1_{y-t\leq x\leq t\,,\, x<y\,,\, 1-t\leq y}\;\mathrm d\, x\;\mathrm d\,y\right)\mathbf 1_{0< t< 1}+\tfrac 1 2\mathbf 1_{1\leq t} \\[1ex] ~=~& \left(\int_{1-t}^1\int_{\max\{0,y-t\}}^{\min\{y,t\}}\;\mathrm d\, x\;\mathrm d\,y\right)\mathbf 1_{0< t< 1} +\tfrac 1 2\mathbf 1_{1\leq t}\\[1ex] =~& \left(\int_{\min\{t,1-t\}}^t\int_{0}^{y}\;\mathrm d\, x\;\mathrm d\,y +\int_{\max\{t,1-t\}}^1\int_{y-t}^t\;\mathrm d\, x\;\mathrm d\,y \right)\mathbf 1_{0< t< 1}+\tfrac 1 2\mathbf 1_{1\leq t}\\[1ex] =~& \left(\int_{\min\{t,1-t\}}^ty\;\mathrm d\,y +\int_{\max\{t,1-t\}}^1 2t-y\;\mathrm d\,y\right)\mathbf 1_{0< t< 1}+\tfrac 1 2\mathbf 1_{1\leq t} \\[1ex] =~& \left(\int_{1-t}^1 2t-y\;\mathrm d\,y \right)\mathbf 1_{0< t< 1/2}+ \left(\int_{1-t}^ty\;\mathrm d\,y +\int_{t}^1 2t-y\;\mathrm d\,y\right)\mathbf 1_{1/2\leq t< 1}+\tfrac 1 2\mathbf 1_{1\leq t} \\[1ex] =~& (\tfrac 5 2 t^2-t)\,\mathbf 1_{0 < t < 1/2}+ (-\tfrac 32 t^2+3t-1)\,\mathbf 1_{1/2\leq t < 1}+\tfrac 1 2\mathbf 1_{1\leq t} \\[4ex] \mathsf P(M\leq t) ~=~& (5t^2-2t)\,\mathbf 1_{0 < t < 1/2}+ (-3 t^2+6t-2)\,\mathbf 1_{1/2\leq t < 1}+\mathbf 1_{1\leq t}\end{align}$$

Graham Kemp
  • 129,094
  • many thanks for your post, I have computed the expectation using the density of $M$ derived from your cdf expression, and I find an expected value of 2/3, but I believe the correct answer is 11/18. I will try again to see if I made a mistake. – user223935 Aug 09 '16 at 04:58
  • @GrahamKemp $P(M\leq t)$ is not valid for $t<0.4$ – Snoop Oct 09 '22 at 18:25
1

Note Graham Kemp's answer is wrong. For t=0.2, we get $P(M\lt t)$ negative... However, his method is correct. Below I give the answers if his method is applied properly.

First, by symmetry:

$(\leq) = 2(\leq, \gt )$

Then, we compute

$(\leq,\gt) = (\leq,−\leq,1−\leq,\gt)$ using integrals method which yields:

  • $(\leq)= 0$ if $t\leq1/3$

  • $(\leq) = 9t^2 -6t + 1$ if $1/3 \leq t\leq1/2$

  • $(\leq) = -3t^2 +6t - 2$ if $1/2 \leq t\leq1$

Finally, integrate $tP'(M<=t)$ for $t \in [0,1]$, which yields 11/18

PH Rmz
  • 11
  • 1
    Hi! Please typeset your mathematics using MathJax. Doing so will prevent your answer from being poorly received. Of course, MathJax has a learning curve, but if you make an honest initial attempt, experienced users will generally be happy to help you improve and fix whatever errors you experience. – Brian Tung Oct 08 '22 at 16:33
  • 1
    For example, $P(M \leq t) = 9t^2 - 6t + 1$ yields $P(M \leq t) = 9t^2 - 6t + 1$. – Brian Tung Oct 08 '22 at 16:33
  • 1
    hey @BrianTung, thanks for the advice! Let me know if better now – PH Rmz Oct 09 '22 at 17:21