\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION A continuous random variable X is uniformally distributed
in the
  interval $-1 \leq x \leq 1$. Find E(X) and Var(X). The random
  variable Y is defined by $Y=X^2$, Use the cdf of X to show that
  $P(Y \leq y)=\sqrt{Y},\ o \leq y\leq 1$ and obtain the pdf of Y.
  Hence or otherwise evaluate E(Y) and Var(Y).


ANSWER $f(x)=\frac{1}{2}\ \ -1\leq x\leq 1\\
  E(X)=0 \textrm{( by symmetry)}=\int_{-1}^1\frac{1}{2}x\,dx\\
  E(X^2)=Var(X)=\int_{-1}^1\frac{1}{2}x^2\,dx=
  [\frac{1}{6}x^3]_{-1}^1=\frac{1}{3}$\\

  \begin{eqnarray*}
  F(x)&=&\int_{-1}^x\frac{1}{2}\,ds\\
  &=&\frac{1}{2}(x+1)\\
  &=&P(-\sqrt{y} \leq X \leq \sqrt{y})\\
  &=&F(\sqrt{y})-F(-\sqrt{y})=\sqrt{y}, \ \ 0 \leq y \leq 1
  \end{eqnarray*}

  $g(y)=\frac{d}{dy}P(Y \leq y)=\frac{1}{2\sqrt{y}},\ \ 0 \leq y
  \leq 1\\
  E(Y)=E(X^2)=\frac{1}{3}=\int_0^1 \frac{1}{2}\sqrt{y}\,dy\\
  E(Y^2)=EX(X^4)=\frac{1}{5}=\int_0^1\frac{1}{2}y^{\frac{3}{2}}\,dy$
  Therefore Var(Y)$=\frac{1}{5}-\frac{1}{9}=\frac{4}{45}$

\end{document}
