# Find the CDF and PDF of $U^2$. Is the distribution of $U^2$ Uniform on $(0, 1)$?

I have the following problem:

Let $$U$$ be a $$\text{Unif}(−1,1)$$ random variable on the interval $$(−1,1)$$.

Find the CDF and PDF of $$U^2$$. Is the distribution of $$U^2$$ Uniform on $$(0, 1)$$?

The solution is as follows:

Let $$X = U^2$$, for $$0 < x < 1$$, $$P(X \le x) = P(−\sqrt{x} \le U \le \sqrt{x}) = P(U \le \sqrt{x}) - P(U \le -\sqrt{x}) = \dfrac{\sqrt{x} + 1}{2} - \dfrac{-\sqrt{x} + 1}{2} = \sqrt{x}$$ (Note that $$P(U \le u) = \dfrac{u + 1}{2}$$ for $$-1 \le u \le 1$$. The density is then given by $$f_X(x) = \dfrac{d}{dx} P(X \le x) = \dfrac{d}{dx}x^{1/2} = \dfrac{1}{2} x^{-1/2}$$. The distribution of $$X = U^2$$ is not Unif$$(0, 1)$$ on the interval $$(0, 1)$$ as the PDF is not a constant on this interval.

The first fact that I am confused about is how the author got that the interval is now $$0 < x < 1$$ instead of $$-1 < x < 1$$.

The second fact that I am confused about, which it seems is related to the first, is how the author calculated that $$P(U \le \sqrt{x}) - P(U \le -\sqrt{x}) = \dfrac{\sqrt{x} + 1}{2} - \dfrac{-\sqrt{x} + 1}{2}$$. Did they just insert the values into the formula for the CDF (since the formula for the CDF is $$\dfrac{x - a}{b - a}$$), or did they otherwise somehow calculate the CDF? I ask because I'm unsure if it's just a matter of memorization, or whether there is some mathematical understanding here that I am missing.

I would greatly appreciate it if people could please take the time to clarify this.

• Isn't it $X = |U|$? In this case for $0<x<1$ we have $P(X \leq x) = P(|U| \leq x) = P(-x \leq U \leq x)$ Commented Nov 1, 2019 at 15:23
• @G.Gare My apologies!!! I made a transcription error; it should be $U^2$. I'm really sorry!!! Commented Nov 1, 2019 at 15:25
• Then the square roots make more sense. There's another edit you missed: $P(-x\leq U^2 \leq x)$. Commented Nov 1, 2019 at 15:26
• @G.Gare How's that? Commented Nov 1, 2019 at 15:28
• It's ok now! Don't worry Commented Nov 1, 2019 at 15:28

Explaining fact 1: while $$U$$ has support $$[-1,\,1]$$, $$X=U^2$$ has support $$[0,\,1]$$.
• Thanks for the answer. Can you please explain the reasoning for how we go from support $[-1, 1]$ to $[0, 1]$? I ask because it is very simple to naively just reason that, since $X = U^2$, we have $(-1)^2$ and $1^2$, and so the new support is $[1, 1]$ (which is obviously nonsense). I recognize that this would be due to a misunderstanding of what "support" is, but I'm curious what explanation you would use to describe the reasoning behind how we get $[0, 1]$, so that it is clear in my mind as a person who is new to this concept. Commented Nov 1, 2019 at 15:32
• @ThePointer The support is the set of allowed values. Note that $\{u^2|u\in[-1,\,1]\}=[0,\,1]$. (For example, the graph $x=u^2$ has $x$-coordinates $\in[0,\,1]$ for $u\in[-1,\,1]$.)