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
  • 8,662
  • 1
  • 21
  • 67
noog4
  • 23
  • 3
  • Use [MathJax](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) for formatting math. – StubbornAtom Feb 02 '20 at 14:54
  • LOTUS seems irrelevant here: you aren't asking about the expectation of a random variable, but only for the value of a ratio of integrals involving a density function. – whuber Feb 02 '20 at 16:55

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
  • 49,700
  • 3
  • 39
  • 75
  • 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