Probability uniform distribution on interval Suppose that $X$ is uniform distributed on $(-2,2)$ let $Y=X^2$ what is the density of $Y$
Anyone have any suggestions on how to get started on this problem?
 A: As $X=\pm \sqrt Y$ the density of each $Y$ value is the sum of the contribution of two $X$ values.   The change of variable transformation will be:
$$f_Y(y) = \left(f_X(-\surd y)\left\lvert\frac{\mathrm d (-\surd y)}{\mathrm d y\qquad}\right\rvert + f_X(+\surd y)\left\lvert\frac{\mathrm d (+\surd y)}{\mathrm d y\qquad}\right\rvert\right)\;\mathbf 1_{y\in(0;2^2)}$$

Which can be obtained from:
$$f_Y(y) = \frac{\mathrm d \;}{\mathrm d y}\mathsf P\Big(-\surd y \leq X\leq +\surd y\Big)\quad\mathbf 1_{y\in(0;2^2)}$$
A: let $p(a)da$ be the probability that Y lies in the interval $a<Y<a +da$
this equals the probability that $X$ lies in either of the intervals
$\sqrt a < X < \sqrt{ a + da}$ or $-\sqrt {a+da} < X < -\sqrt{ a}$
since $X$ is uniform on $[-2,2]$ the probability that $X$ lies in some interval is just $\frac 14$ times the width of the interval 
the width of both these intervals is given by 
$$ \sqrt {a+da}-\sqrt{ a} = \sqrt{a} ( (1+\frac{da}{a})^\frac12 -1 )=\frac{da}{2\sqrt a} $$
so
$$ p(a) da = \frac{da}{4\sqrt a} $$
so $Y$ is distributed on the interval $[0,4]$ with pdf = $$\frac{1}{4\sqrt x}$$
A: Distribution of the Square of UNIF(-2, 2)
You already have two correct answers to this question. But given
that you were having trouble with it, I would like to
take a more conversational approach.
You are asked to find the distribution of $Y = X^2,$ where
$X \sim Unif(-2,2).$ Your first step is to recognize that this
is not a one-to-one transformation: for example both $\pm 1$
give $Y = 1.$ Because of this, the problem can't likely be answered
by just plugging into formulas in your book, because the formulas
in most books are for one-to-one transformations.
You should be able to see that the support of $Y$ (the interval
on the line where $Y$ puts its probability) is $(0, 4).$ The
smallest value of $Y$ is 0, corresponding to $X = 0;$ and the largest
value of $Y$ is 4, corresponding to $X = \pm 2.$
Then you need to look at the distribution of $X$ carefully,
because it contains the information you need to find the distribution
of $Y.$ Notice that the CDF of $X$ is $F_X(x) = P(X \le x) = (x+2)/4,$ for
$-2 < x < 2.$ [Reality check: $F_X(-2) = 0$ and $F_X(2) = 1.$]
Also, because of symmetry, $P(-b < X < b) = 2b/4,$ for $0 < b <2.$
Ready now to find the CDF of $Y:$ 
$$F_Y(y) = P(Y \le y) = P(Y < y) = P(X^2 < y)\\ = 
P(-\sqrt{y} < X < \sqrt{y}) = 2\sqrt{y}/4 = y^{1/2}/2,$$
for $0 < y < 4.$
Differentiate to find the PDF of Y:
$$f_Y(y) = F^\prime_Y(y) = y^{-1/2}/4 = \frac{1}{4\sqrt{y}},$$
for $0 < y < 4.$
If you have R software available (free from r-project.org), the following code will show you
a histogram of simulated values of $Y$ with the PDF $f_Y$ running
right through the tops of the histogram bars. It is always nice
to have a visual check on your mathematical manipulations.
 m = 10^5;  x = runif(m, -2, 2);  y = x^2
 hist(y, ylim=c(0,1.5), prob=T)
 curve(1/(4*sqrt(x)), 0, 4, col="blue", add=T)

Note: In the last line of code 'x' is a mandatory plotting
argument for 'curve', having nothing to do with random variable $X$.
