problem on conditioning in total variance law

95 Views Asked by At

I faced a problem while conditioning to compute the variance, the problem states that there are two random variables $X,Y$ described by joined PDF which is constant within the area within vertices $(0,0),(0,1),(1,1),(1,2)$ and I supposed to find $var(X+Y)$ using total variance law, So I started defining $Z = X+Y$, as $var(Z) = E[var(Z|Y)] + var(E[Z|Y])$,
Note : I know that conditioning on X will make the problem easier but I went through conditioning on Y

$$E[Z|Y=y] = E[X+Y|Y=y]=E[X+y|Y=y]= E[X|Y=y]+y$$ so trying to compute $E[X|Y=y]$ I said that $E[X|Y=y] = E[X|Y=y,Y>=1]P(Y>=1) + E[X|Y=y,Y<1]P(Y<1)= \quad \mathbf{2y}$

as $f_{X|Y,Y>=1}(x|y)$ is uniformly distributed such that $x \in [y-1,1]$ as $x$ is bounded by $x=1$ and $x=y-1$ so $f_{X|Y,Y>=1}(x|y)={1 \over 2-y}$,
Also $f_{X|Y,Y<1}(x|y)$ is uniformly distributed such that $x \in [0,y]$, bounded by $x=0$ and $x=y$ so $f_{X|Y,Y<1}(x|y)={1 \over y}$, and $P(Y<1)=P(Y>=1) = {1 \over 2}$

$var(Z|Y=y)=var(X+Y|Y=y)=var(X+y|Y=y) = var(X|Y=y)$

So how could I compute $var(X|Y=y)$ as there are $f_{X|Y,Y>=1}(x|y),\space and\space f_{X|Y,Y<1}(x|y)$?

1

There are 1 best solutions below

0
On BEST ANSWER

There are indeed easier ways to do this, but if you must go down this route, express the functions using indicators or such, to better keep track of the pieces.

Since $f_{X\mid Y}(x\mid y) = \frac 1y\mathbf 1_{y\in[0;1), x\in[0;y]}+\frac 1{2-y}\mathbf 1_{y\in [1;2], x\in[y-1;1]}$, by virtue of being uniformly distributed along segment of the horizontal line at $y$ passing through the rhombus, therefore: $$\displaystyle\mathsf E(X\mid Y=y) ~{= \mathbf 1_{y\in[0;1)}\int_0^y \frac xy\operatorname d x + \mathbf 1_{y\in [1;2]}\int_{y-1}^1 \frac x{2-y}\operatorname d x \\ = \frac y2\mathbf 1_{y\in [0;1)}+\frac y2\mathbf 1_{y\in[1;2]}\\= \frac 12y\,\mathbf 1_{y\in[0;2]}}$$

And similarly, $$\displaystyle\mathsf {Var}(X\mid Y=y) ~{= \mathbf 1_{y\in[0;1)}\int_0^y \frac {(x-y/2)^2}y\operatorname d x + \mathbf 1_{y\in [1;2]}\int_{y-1}^1 \frac {(x-y/2)^2}{2-y}\operatorname d x \\ = \frac {y^2}{12}\mathbf 1_{y\in [0;1)}+\frac {y(13y^2-24y+12)}{2-y}\mathbf 1_{y\in[1;2]}}$$


Now, using $f_Y(y)= y\mathbf 1_{y\in[0;1)}+(2-y)\mathbf 1_{y\in[1;2]}~$ find $\mathsf {Var}(\mathsf {E}(X+Y\mid Y))$ and $\mathsf E(\mathsf {Var}(X+Y\mid Y))$