1

so $f(x,y) = 1/2$ on the region of the triangle. $f(x) = \int_0^{2-x}\cfrac{1}{2}dy = \cfrac{1}{2}(2-x)$ so $f(y|x) = \cfrac{1/2}{\cfrac{1}{2}(2-x)} = \cfrac{1}{2-x}$ So $E(Y|X=1/2) = \int_0^2y\cfrac{1}{3/2}dy = \int_0^2\cfrac{2}{3}ydy = [\cfrac{2}{6}y^2]^2_0 = 4/3$

But the answer is $3/4$

Where have I gone wrong?

2 Answers2

3

When $X = 1/2$, the support of the conditional density $$f_Y(y \mid x) = \frac{1}{2-x}$$ is not on $Y \in [0,2]$ as suggested by your integral, but rather, $Y \in [0, 2 - 1/2] = [0, 3/2]$. Therefore, the correct expression is $$\operatorname{E}[Y \mid X = 1/2] = \int_{y=0}^{3/2} y \cdot \frac{1}{3/2} \, dy = \frac{3}{4}.$$

You would not have been led astray had you used indicator functions:

$$f_Y(y \mid x) = \frac{1}{2-x} \mathbb 1 (0 \le y \le 2-x).$$

heropup
  • 135,869
  • Why does $y$ range from $0$ to $2-x$? Shouldn't a function of $y$ not depend on $x$? –  Apr 19 '21 at 23:02
  • @idk21 You stated that $(X,Y)$ is uniform on a triangle. When $X = 1/2$, how does that restrict the values of $Y$? Draw a triangle with vertices at $(0,0), (2,0), (0,2)$. Now draw the line $X = 1/2$ through that triangle. At what points does that line intersect the triangle? Outside the triangle, the joint density is zero. – heropup Apr 19 '21 at 23:07
0

The triangle is $0\leqslant y\leqslant 2-x\leqslant 2$.

Therefore when given $x=1/2$, we are tasked with integrating over the domain $0\leqslant y\leqslant 3/2$.

$Y$ is uniformly distributed over this domain, so the conditional expectation we seek will be $3/4$.


$$\mathsf E(Y\mid X=1/2)~=~\dfrac{\int_0^{3/2} y f(1/2, y)\,\mathrm dy}{\int_0^{3/2} f(1/2, y)\,\mathrm dy}$$

Graham Kemp
  • 129,094