# Formula for expectation of $X$

I can't seem to find the formula in my notes. What is the formula for $\mathbb{E}(X_{1}^{2})$?

-
-1 Did you try looking in the index of the book whose page you have scanned in to see if Expectation is mentioned there? Try another, more elementary, book that you might have used earlier? Wikipedia? –  Dilip Sarwate Apr 23 '12 at 19:39
I did check the index/front of the book etc. but I didnt know how to apply it. A basic version was given but it was not a straightforward formula I could use to obtain the above answer. –  Richard Apr 23 '12 at 20:41
If $X$ has the probiability density $f_X\colon\mathbb R \to \mathbb R$ and $g\colon \mathbb R \to \mathbb R$ is measurable, then $\mathbb E[g(X)] = \int_{\mathbb R} g(x)f_X(x)\, dx$. In your case $f_X(x) = \frac 1{2a} \chi_{[T-a, T+a]}$ (the density of uniform distribution) and $g(x) = x^2$.
Thanks @martini, im just wondering, could you explain how you got $g(x) = x^2$ and the $\frac{1}{2a}$? The main part I was not sure, is how to get the $x^2$? –  Richard Apr 23 '12 at 20:42
The $^{2}$ comes from the fact that we are computing the exspectation of $X_1^{\mathbf 2} = g(X_1)$. And $2a$ is the length of $[T-a, T+a]$, so in order to have $\int_{T-a}^{T+a} f_X(x)\,dx = 1$ for a constant (uniform distribution) $f_X$ we have to divide 1 by the interval length. –  martini Apr 23 '12 at 20:50