# Find the PDF of $Y=X^2$ where $X\sim U(0, \theta)$

Find the PDF of $Y=X^2$ where $X\sim U(0, \theta)$

So I already know that $$F_X(x)=\cases {0 & x\le0 \\ \frac{x}{\theta} & 0<x<\theta \\ 1 & x > \theta}$$

My calculation for $f_Y(y)$:

$$F_Y(y) = F_{X^2}(y) = P(X^2\le y)=P(X\le \sqrt y)= F_X(\sqrt y) \\ = \cases {0 & \sqrt y\le0 \\ \frac{\sqrt y}{\theta} & 0<\sqrt y<\theta \\ 1 & \sqrt y > \theta}$$

To get the PDF from the CDF we evaluate the derivative:

$$\frac{d}{dy} F_Y(y) = \cases {\frac{1}{2\theta \sqrt y} & 0<\sqrt y<\theta \\ 0 & Otherwise}$$

Is that correct?

• I think there might be a mistake in your definition of $F_{X}(x)$. It should be $0$ after $\theta$ – Euler_Salter Dec 18 '16 at 15:21
• Oh no sorry, that's the cdf, my mistake – Euler_Salter Dec 18 '16 at 15:22
• yeah it all looks correct! – Euler_Salter Dec 18 '16 at 15:23

Similarly, you can use a formula. Call $w(Y) = \sqrt{Y}$ the inverse transformation. Then you have $$f_{Y}(y) = f_{X}(w(y))\left|\frac{dw(y)}{dt}\right|$$ which indeed gives you $$f_{Y}(y) = f_{X}(\sqrt{y})\left|\frac{dw(y)}{dt}\right| = \frac{1}{\theta}\frac{1}{2\sqrt{y}} = \frac{1}{2\theta\sqrt{y}}$$ for $y$ in the domain of course