Continuous Uniform distribution of 2 trees.

34 Views Asked by At

There are 2 trees that their heights (X,Y) distribute as follows $X$~$U(1,2)$ , $Y$~$U(1,3)$ (both continuous). X and Y are independent. The question is to find P(X>Y).

My solution is as follows:

$P(X>Y) = \int _1^3\:P\left(X>Y|Y=y\right)f_Y\left(y\right)dy=\int _1^3\:P\left(X>y\right)f_Y\left(y\right)dy=\int _1^3\frac{\left(1-\frac{y-1}{2}\right)}{2}dy=\frac{1}{2}$

The solution doesn't really makes sense to me , because one tree is clearly taller , but I can't really find a mistake.

One thing that I thought about was the boundaries of the integral , but I'm not sure if that's the mistake.

2

There are 2 best solutions below

1
On

You can give a very simple graphical proof:

enter image description here

Due to independence, this issue amounts to consider ratio of areas (favorable area over total area).

  • The total area is the area "covered" by a random point $(X,Y) \in [1,2] \times [1,3]$ rectangle ($X,Y$ being the respective heights) which is $2$.

  • The favorable part is the subset of points situated below the line with equation $y=x$ whose area is $1/2$.

The ratio is $1/2$ divided by the total area $2$, giving the final probability $1/4$.

0
On

Your solution uses the formula $$\mathbb{P}[{X>y}]=1-\frac{y-1}{2}$$

In particular, this implies $$\mathbb{P}[{X>2}]=1-\frac{2-1}{2}=\frac{1}{2}$$ But clearly $\mathbb{P}[{X>2}]=0$.

To find the correct formula, try working from first principles: $$\mathbb{P}[{X>y}]=\int_y^{\infty}{\mathrm{pdf}_X(x)\,dx}=\int_y^{\infty}{\left(\begin{cases} 1 & 1\leq x\leq2 \\ 0 & \text{otherwise} \end{cases}\right)\,dx}$$