# CDF and PDF of $\sqrt X$ with uniform distribution

I would like to double check my approach to this problem: Let $$X$$ be uniform $$\sim [0,1]$$. For the random variable $$Y=\sqrt X$$, find the PDF and CDF. I got the CDF to be: $$F_Y(x) = \begin{cases}0 ,& \text{if }\; x ≤ 0,\\ x^2,& \text{if }\; 0 ≤ x≤ 1,\\ 1, &\text{if }\; x ≥ 1. \end{cases}$$ To find the PDF, differentiate the CDF, right? But I am a bit lost on how to do this. I have scoured my textbook for hours and would appreciate some sort of direction. Thank you!

• It's a piecewise function. You differentiate each piece to get $f'(x)$ over that piece. Commented Feb 6, 2023 at 0:19
• @Semiclassical So the PDF would be 2x? Also to clarify - the CDF is presented as piecewise but the PDF is not, right? Sorry if this is a really dumb question. I am just struggling to grasp the obvious and my teacher literally did not take us through any examples
– user1147005
Commented Feb 6, 2023 at 0:24
• For $0\leq x\leq 1$, yes. (Though to avoid ambiguity, I'd prefer to let $Y=\sqrt{X}$ and therefore $P(Y\leq y)=y^2\implies dP/dy = 2y$. It's the same function but emphasizes the transformation.) Commented Feb 6, 2023 at 0:26
• @Semiclassical For the other parts, the PDF is just zero I believe? Would I need to specify that on the solution? Sorry for all the questions, just want to clarify how a solution to this type of question should be presented.
– user1147005
Commented Feb 6, 2023 at 0:29

$$f_Y(x)=\frac{d}{dx} F_Y(x)=\begin{cases} 0 &\text{if } x<0;\\ 2x &\text{if } 0\le x\le 1;\\ 0 &\text{if } x>1 \end{cases} =\begin{cases} 2x &\text{if } 0\le x\le 1;\\ 0 &\text{otherwise}. \end{cases}$$