1
$\begingroup$

Given two arbitrary positive constants $A$ and $B$, and two independent random variables $X$ and $Y$, I want to find out the pdf of $$Z=\frac{A+X}{B+Y}.$$


My process is as follows:

\begin{align} F_Z(z) &= \Pr\left\{Z \le z \right\} = \Pr\left\{\frac{A+X}{B+Y}\le z\right\}\\ &=\Pr\left\{X \le z(B+Y)-A \right\}\\ &= \int_{-\infty}^{\infty}\int_{-\infty}^{z(B+y)-A} f_{X,Y}(x,y)\,dx\,dy\\ &= \int_{-\infty}^{\infty}\int_{-\infty}^{z(B+y)-A} f_X(x) \cdot f_Y(y)\,dx\,dy.\\ \end{align}

By the Leibniz integral rule, \begin{align} f_Z(z) &= \frac{\partial}{\partial z} F_Z(z)\\ &= \int_{-\infty}^{\infty}\left(\frac{\partial}{\partial z}\int_{-\infty}^{z(B+y)-A}f_X(x) \cdot f_Y(y)\,dx\right)dy\\ &= \int_{-\infty}^{\infty}(B+y)\cdot f_X\left(z(B+y)-A\right) \cdot f_Y(y)\,dy\\ &= B\int_{-\infty}^{\infty}f_X\left(z(B+y-A\right)\cdot f_Y(y)\,dy + \int_{-\infty}^{\infty} y\cdot f_X\left(z(B+y)-A\right)\cdot f_Y(y)\,dy\\ \end{align}

Actually, if the process above is correct, $f_Z(z)$ must be non-negative whatever $A$, $B$, $z$ are, and $$\int_{-\infty}^{\infty}f_Z(z)\,dz$$ must be one. However, when I suppose that $X$ and $Y$ are i.i.d. Gaussian RVs, $f_Z(z)$ becomes negative despite having calculated $f_Z(z)$ three times. Is this just my calculation mistake? Is the process above correct?

$\endgroup$
  • $\begingroup$ There is the possibility that $B+Y$ can be negative when you calculate $F_Z$. Of course, this is assuming there is no further restriction on $A,B$. $\endgroup$ – StubbornAtom Aug 12 '18 at 11:35
  • $\begingroup$ @StubbornAtom Sorry, I edited my post from "arbitrary constraints $A$ and $B$" to "arbitrary positive constraints $A$ and $B$". $\endgroup$ – Danny_Kim Aug 12 '18 at 11:37
1
$\begingroup$

You cannot write $\frac {A+X} {B+Y} \leq z$ as $X \leq z(B+Y)-A$ so the first step is itself wrong. You have to write $\{\frac {A+X} {B+Y} \leq z \}$ as $\{X\leq z(B+Y)-A, B+Y>0\} \cup \{X\geq z(B+Y)-A, B+Y<0\}$ assuming that $Y$ is a continuous random variable ( so that $P\{B+Y=0)\}=0$).

$\endgroup$
  • $\begingroup$ Thus, \begin{align}\Pr\left\{\frac{A+X}{B+Y}\le z\right\} &= \Pr\left\{Y>-B\right\}\times\Pr\left\{X\le z(B+Y)-A : Y>-B\right\}\\ &+ \Pr\left\{Y<-B\right\}\times\Pr\left\{X\ge z(B+Y)-A : Y<-B\right\}.\end{align} Do I have to solve this above equation, right? $\endgroup$ – Danny_Kim Aug 12 '18 at 11:47
  • $\begingroup$ You are now on the right track. $\endgroup$ – Kavi Rama Murthy Aug 12 '18 at 11:52
  • $\begingroup$ Thank you so much, if so lastly, is it correct if I solve the following equation? \begin{align} f_Z(z) &= \Pr\left\{Y\ge-B\right\}\int_{-B}^{\infty} \frac{\partial}{\partial z} \int_{-\infty}^{(B+y)z-A} f_{X,Y}(x,y)\,dx\,dy\\ &+ \Pr\left\{Y<-B\right\}\int_{-\infty}^{-B} \frac{\partial}{\partial z} \int_{(B+y)z-A}^{\infty} f_{X,Y}(x,y)\,dx\,dy, \end{align} where $X\sim\mathcal{N}(0,\sigma^2)$, $Y\sim\mathcal{N}(0,\sigma^2)$, and $f_{X,Y}(x,y) = f_X(x) f_Y(y)$. $\endgroup$ – Danny_Kim Aug 12 '18 at 12:00
  • $\begingroup$ Once again, you are doing everything right. $\endgroup$ – Kavi Rama Murthy Aug 12 '18 at 12:05
0
$\begingroup$

The values of $X,Y$ that contribute to the same $Z$ are such that

$$Y=Z(A+X)-B.$$

Then taking $X$ as the independent variable

$$f_Z(z)=\int_{-\infty}^\infty f_X(x)\,f_Y(z(A+x)-B)\,dx.$$

$\endgroup$
  • $\begingroup$ I do not understand your answer, can you state your answer in a bit more detail? $\endgroup$ – Danny_Kim Aug 12 '18 at 11:54
  • $\begingroup$ @Danny_Kim: you add the product of probabilities of all $x,y$ combinations that give $z$. $\endgroup$ – Yves Daoust Aug 12 '18 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.