PDF of a uniform distribution

Let the random variable $X\sim\operatorname{unif}(0,1)$. Find the PDF of $Y=X^n$ where $n\in\Bbb N$.

Initially, I misread the problem, somehow mistaking the $n$ for a $2$. As a result, I ended up finding that the PDF for this was $$\frac{1}{2 \sqrt{x}}$$So my question is: is it logical to adapt my botched attempt by simply replacing the $2$'s with $n$'s? That is to say that the PDF of $Y=X^n$ is $$\frac{1}{2 (x^{(1/2)-n})}$$

Thanks!

• To directly answer your question, no, because of the power rule for differentiation. To indirectly answer your question, in the time you took to type up the question, you could have exactly replicated your methodology in the $n = 2$ case and solved the general $n$ case. To get you started, note that $x \mapsto x^n$ is a bijection from $[0,1]$ onto itself, so computing $P(X^n < x)$ should be straightforward. Now use the power rule. – user217285 Jun 27 '17 at 1:35
• Your general density will not integrate to $1$ for $n \not=2$ so is not a probability density – Henry Jun 27 '17 at 7:57

For general positive $n$, repeat what you did with $n=2$, presumably something like
• the density of $X$ is $f_1(x)=1$ for $0 \le x \le 1$
• so $P(X \le x)=x$ for $0 \le x \le 1$
• so $P(X^n \le x^n)=x$ for $0 \le x \le 1$
• so $P(X^n \le y)=y^{1/n}$ for $0 \le y \le 1$
• so the density of $X^n$ is $f_n(y)=\frac1ny^{\frac1n-1}$ for $0 \le y \le 1$
For $n=2$, the density of $X^2$ is $f_2(y)=\frac12y^{-\frac12}$ for $0 \le y \le 1$, as you have found