PDF of $W = X/Y$ where $X,Y$ are continuous random variables having joint PDF $f$?

Let $(X,Y)$ be an Random Variable of the continuous type with PDF $f$.Let $W =\frac{X}{Y}$. Then how do we determine the PDF of $W$ ?

Let $Y = T$ so that $X = WT$ and the determinant of the absolute value of the Jacobian results in $|t|$.

So the PDF of $(W,T)$ is given by $f(w,t) = |t| f(wt,t)$ and as we are interested in calculating the Marginal PDF so integrating with respect to $t$

$$f_{W}(w) = \int_{-\infty}^{\infty} |t| f(wt,t) dt = \int_{-\infty}^{\infty} |t| f(wy,y) dy$$

but I wanted them in terms of $x$.Actually the book has this form $$f_{W}(w) = \int_{-\infty}^{\infty} |x| f(wx,x) dx$$

Also i thought of getting the required expression perhaps by taking now $x = t$ and then $y = \frac{t}{w}$ resulting in the absolute value of determinant of Jacobian to be $\frac{|t|}{w^2}$ so $f(w,t) = \frac{|t|}{w^2} f(t,\frac{t}{w})$

and calculating the marginal PDF $$f_{W}(w) = \int_{-\infty}^{\infty} \frac{|t|}{w^2} f(t,\frac{t}{w}) dt = \int_{-\infty}^{\infty} \frac{|x|}{w^2} f(x,\frac{x}{w}) dx$$

which is not the expression as given in the book. Where am I wrong?

Source - An introduction to Probability and statistics by Rohatgi and Saleh (2nd edition,Multiple random variables,functions of random variables ,pg 139,Theorem 3)

• In the title you ask for the PDF of $W=XY$ and in your second sentence you let $W = X/Y$? – Nadiels Sep 15 '17 at 14:13
• Sorry,a typo,just did an edit. – BAYMAX Sep 15 '17 at 14:14
• You know, the objects $$\int_{-\infty}^{\infty} |t| f(wt,t) dt$$ and $$\int_{-\infty}^{\infty} |x| f(wx,x) dx$$ are exactly the same, as would be $$\int_{-\infty}^{\infty} |\xi_0| f(w\xi_0,\xi_0) d\xi_0$$ and tons of others... – Did Sep 15 '17 at 15:57
• Yes,so $f_{W}(w) = \int_{-\infty}^{\infty} |y| f(wy,y) dy=\int_{-\infty}^{\infty} |x| f(wx,x) dx$ and hence the result? – BAYMAX Sep 15 '17 at 16:00

After further discussion in the comments and the comments in the OP it seems clear the source of confusion is in the identity $$\int_{\mathbb{R}}|x|f_{X,Y}(wx,x) dx = \int_{\mathbb{R}}|y|f_{X,Y}(wy,y)dy$$ while obviously both are correct, there is the potential for confusion when thinking of the argument in the integrand $x$ as corresponding to the random variable $X$. With that in mind there is clear merit in your choice to leave both expressions in terms of the variable $t$.
Quick check of the results: let $f_{X,Y}(x,y)$ be the joint density of $(x,y)$ and then taking the transformations $$\phi(x,y):\mathbb{R}^2 \rightarrow\mathbb{R}^2;(x,y)\mapsto(x/y,x) \\ \phi^{-1}(w,x) : \mathbb{R}^2 \rightarrow \mathbb{R}^2 ; (w,x)\mapsto(x,x/w)$$ I get \begin{align*} f_{W,X}(w,x) &= f_{X,Y}(\phi^{-1}(w,x) ) | \mbox{Jac}(\phi^{-1} ) |\\ &= f_{X,Y}(x,x/w) \left| \begin{bmatrix}0 & 1 \\ -x/w^2 & 1/w\end{bmatrix}\right| \\ &= f_{X,Y}(x,x/w) \frac{|x|}{w^2} \end{align*} which agrees with you. On the otherhand, and just to demonstrate a slightly different method \begin{align*} f_{W}(w) &=\int_\mathbb{R}\int_\mathbb{R} \delta(w - x/y)f_{X,Y}(x,y)dxdy \end{align*} and using that for a function with only one root the composition law $$\int_{\mathbb{R}}\delta(g(x))f(x) = \frac{f(x_0)}{|g'(x_0)|}, \qquad g(x_0) = 0,$$ applied to $g(x) = w - x/y$ then \begin{align*} f_{W}(w) &=\int_\mathbb{R}\int_\mathbb{R} \delta(w - x/y)f_{X,Y}(x,y)dxdy \\ &= \int_{\mathbb{R}} |y| f_{X,Y}(wy, y) dy. \end{align*}
• Is that I am using $h(w,t)$ instead of $f(w,t)$ creating a confusion,perhaps i should write the joint of the transformed ones as $f(w,t)$,but after that still the problem remains and as per your comment its switching of arguments in the book? – BAYMAX Sep 15 '17 at 15:50
• I don't have the book so I can't check, but it seems like the disagreement is simply that your variable $y$ is actually the books $x$, once you are both consistently using the same variables your answers should agree – Nadiels Sep 15 '17 at 16:10
• To hopefully be a bit clearer you have derived both $f_W(w) = \int_{\mathbb{R}} |x| f(wx, x) dx$ and $f_W(w) = \int_{\mathbb{R}} \frac{|x|}{w^2} f(x, x/w) dx$, which are both correct, but the confusion is then associating the argument $x$ you are integrating over with the original random variable $X$ – Nadiels Sep 15 '17 at 16:19