Expected value and variance of a random point in a triangle

488 Views Asked by At

I've done some reading and googling for my problem below but I am still unable to solve this problem as the part where X is a continuous random variable is plaguing me.

A point S is randomly placed in triangle ABC. Let X be the be the continuous random variable representing the distance from S to AB. Find $E(X)$ and $Var(X)$.

Your help is greatly appreciated. Thank you!

1

There are 1 best solutions below

4
On BEST ANSWER

$\mathsf E[X]$ scales linearly with $X$, and $\mathsf{Var}(X)$ scales quadratically with $X$, so we can scale the triangle such that the height above $AB$ is $1$ and then rescale accordingly.

The probability of choosing a point at height $X$ above $AB$ is $0$ at $C$ and increases linearly towards $AB$. Thus its expected value is

$$ \mathsf E[X]=\frac{\int_0^1x(1-x)\mathrm dx}{\int_0^1(1-x)\mathrm dx}=\frac{\frac12-\frac13}{\frac12}=\frac13 $$

and the expected value of its square is

$$ \mathsf E\left[X^2\right]=\frac{\int_0^1x^2(1-x)\mathrm dx}{\int_0^1(1-x)\mathrm dx}=\frac{\frac13-\frac14}{\frac12}=\frac16\;, $$

so that the variance is

$$ \mathsf{Var}[X]=\mathsf E\left[X^2\right]-\mathsf E[X]^2=\frac16-\left(\frac13\right)^2=\frac1{18}\;. $$

Accordingly, for a triangle with height $h$ above $AB$, the expected distance from $AB$ is $\frac h3$, and the variance of the distance from $AB$ is $\frac{h^2}{18}$.