# Given X that is unif(0,1), find the pdf of Y=1/sqrt(X)

I have this problem which I would like to discuss whether my solution is accurate. There are no solved examples like this one in my text book, so I want to ask anyone if they think my solution is correct or not.

"Let $X$~ $unif(0,1)$. Find the pdfs of the following random variables (be careful with ranges): (b) $Y=1/\sqrt{X}$."

I begin to note that because $X$ ~ $unif(0,1)$ we have that the cdf is $F_X(x) = x$, for $x \in [0,1]$.

Then we can express the cdf for $Y$ via

$F_Y(x) = P(Y \leqq x) = P(\frac{1}{\sqrt{X}} \leqq x) = ...= 1-P(X \leqq \frac{1}{x^2}) = 1-F_X(\frac{1}{x^2}) = 1-\frac{1}{x^2}$

Now it should be pretty straight forward, but because of the hint in the problem formulation I get a bit unsure in my reasoning:

We can easily differentiate the expression above to get the pdf for $Y$. In doing so, we note that we obtain a pdf $f_Y(x) = 2x^{-3}$. By definition, the pdf $f(x) \geqq 0 \forall x$ which is clearly not the case right now. So a restriction of the function to let it be defined such that

$f_Y(x) = 2x^{-3} , x > 0$ and zero elsewhere, would meet this requirement

However, this doesnt meet the requirement that $\int_{- \infty}^{\infty} f_Y(x) dx = 1$.

If we do, however, choose to restrict the function even further such that

$f_Y(x) = 2x^{-3} , x > 1$ and zero elsewhere,

this condition is fulfilled and thus $f_Y(x)$ is a pdf to $Y$. And this is the right answer according to my text book. But i wonder, is there something faulty with my arguments above? Is there a better way of solving this?

Thanks!

## 2 Answers

Your approach is fine but it can be shortened very much.

The restrictions are natural: if $X$ takes values in $(0,1)$, $Y=\frac{1}{\sqrt{X}}$ takes values in $(1,+\infty)$.
By denoting as $f_X$ and $f_Y$ the PDFs of $X$ and $Y$ we have $f_X(u) = \mathbb{1}_{(0,1)}(u)$ and

$$\forall a>1,\qquad \int_{1}^{a}f_Y(u)\,du = \mathbb{P}\left[\frac{1}{\sqrt{X}}\leq a\right]=\mathbb{P}\left[X\geq \frac{1}{a^2}\right]=1-\frac{1}{a^2}$$ so $f_Y(u) = \frac{2}{u^3}\mathbb{1}_{(1,+\infty)}(u)$ by differentiation.

• Of course! I dont know why I didnt saw this right away. Thanks! – tarkovsky123 Apr 4 '18 at 17:01

Hint: if $X$ takes values between $0$ and $1$, where does $Y$ take values? You're correct that the pdf of $Y$ is $2 y^{-3}$ for some set of $y$, but it's not for all $y > 0$. Another way to think about this: for what $x$ is your statement $$1 - F_X(1/x^2) = 1 - 1/x^2$$ valid?