1

I am currently trying to solve a problem and can't figure it out. I have done this before, but I can't remember all of the details and can't find a reference example.

Let's say I have a pdf

$$f(x)=\frac{x^2}{16}\,\,\text{ for }-2\le x\le 2\,;\,0\text{ otherwise }$$

and I want to find the expected value for $Y = X^2$.

With LOTUS I would do the following

$$E[X^2]=\int_{-\infty}^\infty x^2f_X(x)\,dx$$

So in this specific case, I would calculate

$$E[Y]=E[X^2]=\int_{-2}^2 x^2\cdot\frac{x^2}{16}\,dx=\int_{-2}^2 \frac1{16}x^4\,dx=\left(\frac1{80}2^5-\frac1{80}(-2)^5\right)$$

However, there are two things I am confused with and I can't remember or find a good example:

  1. I do have the feeling I need to transform the boundaries. Maybe I am wrong...

  2. If the the boundaries go from negative to positive, I have the feeling that the last term $\left(\frac1{80}2^5-\frac1{80}(-2)^5\right)$ is wrong. The closest thing I could find was Find expected value using CDF but maybe you could shed some light on it.

Thanks for the help!

StubbornAtom
  • 11,143
  • 1
  • 28
  • 84
noog4
  • 23

1 Answers1

1

Your PDF doesn't integrate to $1$, so you need a suitable scalar in front of it, e.g. $3/16$ instead of $1/16$. But, let's assume it's valid.

  1. You don't need to transform boundaries because the integration is in terms of $x$.
  2. The last term is also correct because both your boundaries and the integral $x^2f(x)$ is calculated correctly.
gunes
  • 57,205
  • Thanks for your answer! Yes, I just made up an example with x^2 and didn't take into consideration that it doesn't integrate to 1. – noog4 Feb 02 '20 at 13:20