# Computation with a transformation of a random variable.

The random variable $$X$$ is uniformly distributed on the interval $$[-4,4]$$. Compute $$P(X^2 ≤ 9)$$.

I tried to define $$Y = X^2$$ and compute the density of this transformed variable. The PDF of the uniform distribution is $$f_x(x) = \frac{1}{8}$$. What I got as a transformed density is $$f_y(y) = \frac{1}{16\sqrt(y)}$$.

However, if I calculate the integral of that transformed density from $$0$$ to $$9$$, I get a wrong result. My guess is that it has something to do with the fact that the uniform can take negative values.

Your transformed density should be $$f_Y(y) = \dfrac{1}{8\sqrt{y}}$$ for $$0 \lt y \le 4$$.

You may have forgotten to account for two different values of $$X$$ corresponding to each value of $$Y$$

You then get $$\int_0^9 f_Y(y) \, dy = \frac34$$

Hint: $$P(X^2<9)=P(-3 where $$f$$ is the density function for $$X$$.

Now what you need is to find the correct density function for $$X$$ and then integrate it.

Notes.

It is fairly easy the see by intuitions of "uniform distribution" that $$P(-3

• Thanks, this works! Is there a way to do it through a transformation of the density?
– Luca
Commented Jan 19, 2021 at 21:58
• @Luca in principle yes. But that makes things more complicated than necessary. You do transformation only when things become easier.
– user9464
Commented Jan 19, 2021 at 21:59
• I see, unfortunately I usually don't realize how one can solve the problem in a simple, elegant way, without going through unnecessary maths. But thanks for the very quick response!
– Luca
Commented Jan 19, 2021 at 22:01
• @Luca the first thing to try is simply the definition :-)
– user9464
Commented Jan 19, 2021 at 22:02