Compute $E[X^2]$ for a random variable $X∼Unif(0,3)$?

732 Views Asked by At

So since $Var(X)=E[X^2]-E[X]^2$ and that $E[X]^2=\left(\frac{a+b}{2}\right)^2 $

and that $Var(X)=\left(\frac{b-a}{12}\right)^2 $ it implies that $Var(X)=\frac{3^2}{12}=\frac{3}{4} $

and that $E[X]^2=\left(\frac{3}{2}\right)^2=\frac{9}{4} $

which implies that $E[X^2]=Var(X)+E[X]^2=\frac{3}{4}+\frac{9}{4}=\frac{12}{4}=3$

Is this correct way to solve this problem?

2

There are 2 best solutions below

3
On BEST ANSWER

That's ok, though I'd just integrate $x^2$ against the PDF $1/3$ giving $$ E(X^2) = \int_0^3\frac{1}{3}x^2dx=3 $$

0
On

This is one way to solve the problem. When you have a table of expected values and variances, this is a very slick way to calculate higher moments like $E(X^2)$.