# Functions of random variables

Please consider Example 4.8 on http://www.probabilitycourse.com/chapter4/4_1_3_functions_continuous_var.php

Would someone mind explaining how $P(X^2≤y)=P(−\sqrt{y}≤X≤\sqrt{y})$ and how $R_y=[0,1]$ (essentially if $-1<x<1$ how does it become $0<y<1$)?

Thanks.

For your first question, we have $$P\left(X^2\leq y\right)$$ $$=P\left(\sqrt{X^2}\leq \sqrt y\right)$$ $$=P\left(\left|X\right|\leq \sqrt y\right)$$ $$=P\left(−\sqrt{y}\leq X\leq\sqrt{y}\right)$$ For your second question, we have $$-1\lt x\lt 1$$ Which can be rewritten as $$\left|x\right|\lt 1$$ Or $$0\leq\left|x\right|\lt 1$$ Have a look at absolute value.
Clearly $\mathsf P(X^2\leq y) = \mathsf P({-}\surd y\leq X\leq \surd y)$ (for any real-valued random-variable $X$, and any non-negative real-value $y$), because if $0\leq X^2\leq y$ , then either $0\leq X\leq \surd y\;$ or $\;{-}\surd y\leq X\leq 0$, and vice versa.
Likewise if $-1 < X < 1$ then $0\leq X^2 < 1$; because the square of a negative real-value is a positive real-value, and so is the square of a positive real-value.
Hence $X\in (-1;1) \iff X^2\in [0;1)$.