Two points are randomly and independently located on a stick of length $1$ m.

$(a)\quad$ Find the expected distance between the two points.

$(b)\quad$ Find the expected distance from the left end of the stick to the point which is closest to that end.

$(c)\quad$ Find the expected distance from the left end of the stick to the first of the two points, given that that point is closer to the left end than to the right end.

My working

$(a)\quad$ Let $X\sim U(0, 1)$ and the two points be $X_1$ and $X_2$.

$\implies f_{X_1, X_2}(x_1, x_2) = 1,\quad 0 < x_1 < 1\quad, \quad 0 < x_2 < 1$

$\begin{aligned}[t] \mathbb{E}(\lvert X_1 - X_2 \rvert) & = \int^{\infty}_{-\infty}\int^{\infty}_{-\infty} (\lvert x_1 - x_2 \rvert) f_{X_1, X_2}(x_1, x_2)\ \mathrm{d}{x_1}\ \mathrm{d}{x_2} \\[1 mm] & = \int^1_0\int^{x_1}_0 (x_1 - x_2)\ \mathrm{d}{x_2}\ \mathrm{d}{x_1} + \int^1_0\int^1_{x_1} (x_2 - x_1)\ \mathrm{d}{x_2}\ \mathrm{d}{x_1} \\[1 mm] & = \frac 1 3 \end{aligned}$

$(b)\quad \frac 1 3$

$(c)\quad \frac 1 3$

I know my answer to $(a)$ is correct and it also follows intuition - if two points are chosen randomly and independently along a distance of $1$ m, one would naturally expect them to be spaced out at equal distances.

However, I am unsure if my answers to $(b)$ and $(c)$ are correct - I used intuition here as well, but how would one derive the answers to $(b)$ and $(c)$ mathematically?

Any intuitive explanations will be greatly appreciated :)

  • $\begingroup$ There is no essential difference with choosing randomly 3 points on a circle that has circumference of 1m and then using the first chosen point as the place where the circle is "opened" so that it receives a left end and a right end. In this described situation we can use symmetry and find directly $\frac13$ for expected (arc)distance between the points. Just like you I have the impression that the questions (b) and (c) are actually the same. $\endgroup$ – drhab May 4 at 12:09

(b) Let $Y=\min\{X_1,X_2\}$. Let's find the pdf of $Y$. Let $F$ be the cdf of $X$ and $f$ be the pdf.

$$\begin{split}\Pr(Y> y)&=\Pr(X_1> y)\Pr(X_2>y)\\ &=\left(1-F(y)\right)^2\end{split}$$

Then the cdf of $Y$ is

$$\begin{split}G(y)&=1-\Pr(Y>y)\\ &=1-(1-F(y))^2\end{split}$$

The pdf of $Y$ is the derivative

$$\begin{split}g(y)&=-2(1-F(y))(-f(y))\\ &=2f(y)(1-F(y))\\ &=2(1-y)\end{split}$$

(These are fairly standard computations/results, but I repeated them here anyway.)

This has expected value $\int_0^12(y-y^2)dy=2\left[\frac {y^2}{2}-\frac{y^3}{3}\right]\bigg|_0^1=\frac 13$

(c) We seek $\mathbb E(Y|Y<\frac 12)$. This will involve a reweighing of the density using $\int_0^{1/2}2(1-y)dy=2\left[y-\frac{y^2}2\right]_0^{1/2}=\frac 34$. Then the density of $Y|Y<1/2$ is $$\frac{2(1-y)}{3/4}, 0<y<1/2\\=\frac 83(1-y)$$

This has expectation $\int_0^{1/2}\frac 83(y-y^2)dy=\frac 83\left[\frac{y^2}2-\frac{y^3}{3}\right]_0^{1/2}=\frac 83\left(\frac 18-\frac 1{24}\right)=\frac 29$

If we know the minimum is closer to the left end, then the expectation is slightly closer to the left end.

  • $\begingroup$ Thank you for your answer! I understand everything except, ironically, the very first part. How did you get $\mathbb{P}(Y > y) = \mathbb{P}(X_1 > y)\mathbb{P}(X_2 > y)$? Apologies if this is supposed to be trivial... $\endgroup$ – Ethan Mark May 4 at 15:44
  • $\begingroup$ you're welcome! It's from: $\mathbb P(Y>y)=\mathbb P(\min\{X_1, X_2\}>y)=\mathbb P(X_1>y, X_2>y)=\mathbb P(X_1>y)\mathbb P(X_2 >y)$, due everything having to be bigger than the value if the minimum is to be bigger, and then independence of $X_1, X_2$. $\endgroup$ – Stacker May 4 at 16:35
  • 1
    $\begingroup$ Right! That makes sense! :) $\endgroup$ – Ethan Mark May 4 at 16:53
  • 1
    $\begingroup$ (Definition of minimum actually I think) $\endgroup$ – Stacker May 4 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.