Density of ratio of uniform random variable and exponential random variable

44 Views Asked by At

Excuse me for asking similar questions but as I couldn't find answer for this problem as well, I want to be sure that I solved this problem right and can use this result later.

Let $\xi \sim U(0,1)$, $\eta \sim Exp(\lambda)$.

$\textbf{1}_{A}(x)$ is the indicator function, it's equal $1$ if $x \in A$ and equal $0$ if $x \not\in A$.

Then $\rho_\xi(x)=\textbf{1}_{\{0\leq x \leq 1\}}(x)$,

$\rho_\eta(y) = \textbf{1}_{\{y\geq0\}}\lambda e^{-\lambda y}, \lambda > 0$.

$\rho_\frac{\xi}{\eta}(v) \stackrel{(1)}=\int_{-\infty}^{+\infty}\rho_\xi(uv)\rho_\eta(u)|u|du = \int_{-\infty}^{+\infty}\textbf{1}_{\{0\leq uv \leq 1\}}(u,v)\textbf{1}_{\{u\geq0\}}\lambda e^{-\lambda u}|u|du = \\= \int_{0}^{+\infty}\textbf{1}_{\{0\leq uv \leq 1\}}(u,v)\lambda e^{-\lambda u}udu = \textbf{1}_{\{v \geq 0\}}\int_0^{\frac{1}{v}}\lambda e^{-\lambda u}udu$

$(1)$ is just using of convolution of ratio.

Last integral I took using substitution and integration by parts and as the result I got:

$\rho_\frac{\xi}{\eta}(v) = \textbf{1}_{\{v \geq 0\}} \frac{1}{\lambda}(1-(\frac{\lambda}{v}+1)e^{-\frac{\lambda}{v}})$.

Is it the right answer? I integrated it from $-\infty$ to $+\infty$ and got $1$ so it is definitely somewhat's density.

1

There are 1 best solutions below

1
On BEST ANSWER

You're result is correct. Consider another way to get it. Let $Z=\xi/\eta$ with $\xi\sim\operatorname{Uniform}(0,1)$ and $\eta\sim\operatorname{Exponential}(\lambda)$. Now consider the conditioned random variable $$ Z|\eta\sim\operatorname{Uniform}(0,\tfrac{1}{\eta}) $$ The joint distribution for $(Z,\eta)$ is $f_{Z,\eta}(z,\eta)=f_{Z|\eta}(z|\eta)f_\eta(\eta)$. Integrating the joint density w.r.t. $\eta$ should then give the distribution for $Z$. We write $$ \begin{aligned} f_Z(z) &=\int_0^\infty f_{Z|\eta}(z|\eta)f_\eta(\eta)\,\mathrm d\eta\\ &=\int_0^\infty \eta\mathbf 1_{z\in(0,1/\eta)} \lambda e^{-\lambda\eta}\,\mathrm d\eta\\ &=\int_0^\infty \eta\mathbf 1_{\eta\in(0,1/z)} \lambda e^{-\lambda\eta}\,\mathrm d\eta\\ &=\int_0^{1/z} \lambda\eta e^{-\lambda\eta}\,\mathrm d\eta\\ &=\frac{1}{\lambda}\int_0^{\lambda/z} u e^{-u}\,\mathrm du\\ &=\frac{1}{\lambda}\left(1-(1+\lambda/z)e^{-\lambda/z}\right), \end{aligned} $$ which is the same solution you obtained.

As a sanity check I simulated observations of $Z$ in MATLAB for $\lambda=3$ and compared it to the solution. Here is the code:

lambda = 3;
Z = rand(1e6,1)./exprnd(1/lambda,1e6,1);

ax = linspace(0.001,40,256);
fZ = @(z) 1/lambda*(1-(1+lambda./z).*exp(-lambda./z));
figure
histogram(Z,linspace(0,40,128),'Normalization','pdf')
hold on
plot(ax,fZ(ax),'Linewidth',2)
ylabel('density')
xlabel('z')

And here is the resulting plot showing our data agrees with the computed density function:

enter image description here