How to calculate expected distance need to be covered to reach a vertex of right triangle from a section of opposite side?

76 Views Asked by At

Given a right triangle $\bigtriangleup BOC$ and distance $a, p, d$, what is the expected distance to needed to be traveled to reach $C$ from a point randomly selected on $AB$? (The distribution of point is uniform over $AB$)

$OB=p+a \\ AB=p \\ OC=d$

If I take the mean of $BC$ and $AC$ will the answer be correct? Also I tried,

$$\frac{\int_{a}^{a+p} \sqrt{x^2+d^2} dx}{p}$$

But, soon I realized I will be getting some area of $\bigtriangleup BAP$ not expected distance. Think about the case of $p=0$.

Expected distance to reach C from any random point from A to B

3

There are 3 best solutions below

2
On BEST ANSWER

The integration method is correct. You'll get: $$ \frac1{2p}\left(x \sqrt{d^2+x^2}+d^2 \log \left(\sqrt{d^2+x^2}+x\right)\right)_a^{a+p} $$

Update: In this expression, we cannot let $p=0$ because throughout our calculations it is implicit that $p\neq0$. If $p=0$, the point becomes deterministic and so the distance is $\sqrt{a^2+d^2}$. We can get this by taking the limit as $p\to0$, by applying L'Hopital to the integral as the others have explained or to this expression (which is essentially the same): $$ \lim_{p\to0} \text{distance}=\frac{\frac{d}{dp}\frac12\left((a+p) \sqrt{d^2+(a+p)^2}+d^2 \log \left(\sqrt{d^2+(a+p)^2}+(a+p)\right)\right)} {\frac{d}{dp}p}\\=\frac{\sqrt{a^2+d^2}}{1}={\sqrt{a^2+d^2}}. $$

0
On

Your integral is correct. The integrand is the distance given $x$, and you are taking the expectation given $x$ is $ U[a,a+p]$. For the case $p=0$, you get $\sqrt{a^2+d^2}$ by L'Hopitals rule.

0
On

Your approach is correct. Let me explain it.

If the point randomly picked on $AB$ is $D$ with $BD=x$, then $x\in \mathcal{U}(a,a+p)\implies$ the expected distance to be covered is $$\mathbb{E}(DC)=\mathbb{E}\left(\sqrt{x^2+d^2}\right)=\int_{a}^{a+p}\frac{1}{p}\sqrt{x^2+d^2}dx$$ For the case $p=0$, the expectation becomes, $$\lim_{p\to 0}\int_{a}^{a+p}\frac{1}{p}\sqrt{x^2+d^2}dx=\lim_{p\to 0}\frac{\sqrt{(a+p)^2+d^2}}{1}=\sqrt{a^2+d^2}$$I have used L'Hospital's rule here to find this.