How do I compute the density of the random variable $\frac{U}{\sqrt R}$?

65 Views Asked by At

Let $R$ be a positive random variable with density $$g(r)=\frac{1}{\sqrt{ \pi r }}e^{-r}~~~~,~~~~r>0$$Let $U$ be uniformly distributed on $[0,1]$ and independent of $R$. Let me define $X=\frac{U}{\sqrt R}$. We need to compute the density of $X$.

My idea was the following.

Let $f$ be a measurable bounded function. Then consider $$\Bbb{E}(f(X))=\Bbb{E}\left(f\left(\frac{U}{\sqrt R}\right)\right)=\int_{\Bbb{R}^2}f\left(\frac{u}{\sqrt r}\right)P_{(U,R)}(du~dr)\stackrel{independent}{=}\int_0^\infty \int_0^1 f\left(\frac{u}{\sqrt r}\right)g(r)~~du~dr$$Now let me substitute $x=\frac{u}{\sqrt r}$ Then I get $$\Bbb{E}(f(X))=\frac{1}{\sqrt \pi}\int_0^\infty \int_0^{\frac{1}{\sqrt r}} f(x)e^{-r}~~dx~dr=\frac{1}{\sqrt \pi}\int_0^\infty \int_0^{\frac{1}{x^2}} f(x)e^{-r}~~dr~dx=\int_0^\infty f(x)h(x)~dx$$where $h(x)=\int_0^{\frac{1}{x^2}} \frac{1}{\sqrt \pi}e^{-r}~~dr$ for $x>0$ and $h(x)=0$ else. Then I can explixitly compute $h(x)$ and get $$h(x)=\left(\frac{1}{\sqrt \pi}-\frac{e^{-\frac{1}{x^2}}}{\sqrt \pi}\right)\Bbb{1}_{\{x>0\}}(x)$$
Then this $h$ is our density. Now I wanted to ask if this is correct like this or if I did something wrong.

Thanks for your help.

1

There are 1 best solutions below

2
On BEST ANSWER

I use the definition:

$$F_X(x)=\Pr(X\le x)=\Pr(\frac{U}{\sqrt{R}}\le x)=\Pr(R\ge \frac{1}{x^2}U^2)$$

$$F_X(x)=\int_0^{\frac{1}{x^2}}\int_0^{x\sqrt{r}} \frac{1}{\sqrt{\pi r}} e^{-r} du dr+\int_{\frac{1}{x^2}}^\infty \int_0^1 \frac{1}{\sqrt{\pi r}}e^{-r} du dr$$

$$F_X(x)=\frac{x}{\sqrt{\pi}}(1-e^{-\frac{1}{x^2}})-\int_\infty^{\frac{1}{x^2}} \frac{1}{\sqrt{\pi r}}e^{-r} dr$$

$$f_X(x)=\frac{d F_X(x)}{dx}=\frac{1}{\sqrt{\pi}}(1-e^{-\frac{1}{x^2}})+\frac{x}{\sqrt{\pi}}e^{-\frac{1}{x^2}}\cdot\frac{-2}{x^3}-\frac{x}{\sqrt{\pi}}e^{-\frac{1}{x^2}}\cdot\frac{-2}{x^3}$$

$$f_X(x)=\frac{1}{\sqrt{\pi}}(1-e^{-\frac{1}{x^2}}),~~ \text{where}~~ x\in (0,\infty)$$