# A proof about random variables

How to prove that given a random variable $X$ deﬁned on a sample space $W$ and $Y = X^2$ is also a random variable defined on the sample space $W$.

I tried to use some definitions of random variables but I am not familiar with mapping.

Can someone explain how to construct a formal proof?

-
A random variable is simply a mapping $X : W \to \mathbb R$. So $Y : W \to \mathbb R$ is just the composition of $X$ with the square function $z \mapsto z^2$, and hence is also a random variable. Other than understanding the definition of a RV and function composition, there's nothing very deep to prove here. – Srivatsan Oct 28 '11 at 21:09
That explains a lot. Sorry I never learned linear algebra before. I can get really confused on mapping. – geraldgreen Oct 28 '11 at 21:18
Oops, I slipped a bit in my previous comment. There's something to prove here, depending on the context in which you saw this question. If you are taking a course in measure theory or probability, then a random variable is not any old mapping $W \to \mathbb R$. It must be measurable. Assuming this definition, you should prove that the composition of a measurable function $X$ with the square map $z \mapsto z^2$ is also measurable. What is your background w.r.t. measure theory? – Srivatsan Oct 28 '11 at 21:34

A random variable $X$ is a mapping from $W$ to $\mathbb{R}$, that is for $\omega \in W$, $X(\omega) \in \mathbb{R}$.
$Y(\omega) = X(\omega)^2$, thus $Y$ is also a mapping from $Y: W \mapsto \mathbb{R}$.
The measure for random variable $X$ is defined by cumulative distribution function, i.e. $F(x) = \mathbb{P}(X \le x)$.
Consider, for $y>0$, $F_Y(y) = \mathbb{P}(Y \le y) = \mathbb{P}(X^2 \le y) = \mathbb{P}( -\sqrt{y} \le X \le \sqrt{y}) = F_X(\sqrt{y}) - F_X(-\sqrt{y}) + \mathbb{P}(X = \sqrt{y})$.
Thus $Y(\omega)$ is also measurable and is a random variable defined on the sample space $W$.