Expected distances relating to points on a stick

conditional-expectationexpected valueprobabilitystatisticsuniform distribution

Question

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 🙂

Best Answer

(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.

Related Question