expected value, conflicting answers

36 Views Asked by At

I am having a problem trying to understand why the two methods for finding the expected are resulting in different solutions. I am not sure if I am doing a mistake somewhere. Your help is appreciated

And I was also wondering how I could use the given ( a third method maybe?) $E(Y)$

Question in short

Given

$f_Y(y) = 2y$, $E(Y) = 2/3$, $W = (Y - 2/3)^2$ Find $E(W)$

My method 1

Let $g(y) = w \Rightarrow g(y)=(y-2/3)^2 = y^2-(4/3)y+4/9$

$E(g(y)) = \int^1_0g(y)f_Y(y)dy = 2\int^1_0(y^3-(4/3)y^2+(4/9)y)dy = 1/18$

My method 2

$F_Y(y)=\int^y_0f_Y(y) = \int^y_02y= y^2$

Notice that $F_W(w) = P((Y-2/3)^2 \leq W) = P(Y \leq \sqrt W + 2/3) = F_Y(\sqrt W + 2/3) = w + (4/3)\sqrt w + 4/9$

Then

$f_W(w) = \frac {d} {dw} F_W(w) =\frac {d} {dw} (w + (4/3) \sqrt w + 4/9) = 1+(2/3)w^{-1/2} $

Hence

$E(W) = \int^1_0wf_W(w)dw = \int^1_0(w + (2/3)w^{1/2}) = (1/2)w^2|^1_0 + (2/3)^2w^{3/2}|^1_0 = $ 17/18

As you can see, the first method is 1/18 while the second 17/18.

Also, I wanted to ask if there was a way I could use the given $E(Y)$. For example, using $E(aY+b)=aE(Y)+b$ where $a,b$ are some constants

Thank you.

1

There are 1 best solutions below

1
On BEST ANSWER

Method 1 is correct.

In Method 2, it is not true that $P((Y-2/3)^2 \leq w) = P(Y \leq \sqrt{w}+2/3)$ because $Y \leq \sqrt{w}+2/3$ does not imply $(Y-2/3)^2 \leq w$. You have to be careful when taking the square root. What is true is that \begin{align*} (Y-2/3)^2 \leq w &\Longleftrightarrow Y-2/3 \leq \sqrt{w} \text{ AND } (Y-2/3) \geq -\sqrt{w}\\ &\Longleftrightarrow -\sqrt{w}+2/3 \leq Y \leq \sqrt{w}+2/3. \end{align*} So you should have \begin{align*} P((Y-2/3)^2 \leq w) &= P(-\sqrt{w}+2/3 \leq Y \leq \sqrt{w}+2/3) \\ &= P(Y \leq \sqrt{w}+2/3)-P(Y < -\sqrt{w}+2/3)\\ &=F_Y(\sqrt{w}+2/3)-F_Y(-\sqrt{w}+2/3) \end{align*} Now you also have to be careful about the bounds of your variables. You did not say it, but $f_Y(y)=2y$ only for $0 \leq y \leq 1$, so actually $$F_Y(y)=\begin{cases} 0 & y<0 \\ y^2 & 0 \leq y \leq 1 \\ 1 & y>1. \end{cases}$$ It is clear that for $w<0$, $P(W \leq w)=0$. If $0 \leq w\leq 1/9$, then $\sqrt{w}+2/3$ and $-\sqrt{w}+2/3$ are both between $0$ and $1$, so we can apply $F_Y(y)=y^2$. If $1/9 < W \leq 4/9$, then $\sqrt{w}+2/3$ is greater than $1$, so $F_Y(\sqrt{w}+2/3)=1$, but $-\sqrt{w}+2/3$ is still between $0$ and $1$ so we can apply $F_Y(y)=y^2$ to that. Finally, if $w >4/9$ then $\sqrt{w}+2/3>1$ and $-\sqrt{w}+2/3<0$. Bringing this all together, we get \begin{align*} F_W(w) &= \begin{cases} 0 & w<0 \\ (\sqrt{w}+2/3)^2-(-\sqrt{w}+2/3)^2 & 0\leq w\leq 1/9 \\ 1-(-\sqrt{w}+2/3)^2 & 1/9<w \leq 4/9 \\ 1 & w>4/9\end{cases}\\ &=\begin{cases} 0 & w<0 \\ \frac{8}{3}\sqrt{w} & 0\leq w\leq 1/9 \\ -w+\frac{4}{3}\sqrt{w}+5/9 & 1/9<w \leq 4/9 \\ 1 & w>4/9\end{cases} \end{align*} and then $$f_W(w) = \begin{cases} 0 & w<0 \text{ or } w>4/9 \\ \frac{4}{3\sqrt{w}} & 0 \leq w \leq 1/9 \\ \frac{2}{3\sqrt{w}}-1 & 1/9<w \leq 4/9. \end{cases}$$ If you integrate this density (piecewise) you will again get $E[W]=1/18$.

There is no method that will give you $E[W]$ using $E[Y]$ alone, since the density of $Y$ matters. However, you could have saved yourself a bit of calculation in Method 1 by noting: $$E[W]= \int_0^1 (y^2-(4/3)y+4/9)2y \ dy = \int_0^1 (y^2)(2y) \ dy - (4/3)E[Y]+4/9.$$