Let $(X,Y)$ be uniform on the unit square. Let $Z=\frac{X}{Y}$. Find the density of $Z$.
I found typically when they said $(X,Y)$ has a uniform distribution on the unit square it is defined as
$f(x,y) = \begin{cases} 1, & \text{ if } 0\leq x \leq 1\\ 0, & \text{otherwise} \end{cases} $
I tried to solve the main problem like this:
First find cdf and from there I calculate the pfd function.
$F_Z(z) = P(Z\leq z)= p(g(x,y) \leq z) = \int_0^1\int_0^1\frac{X}{Y}dxdy$
Probably I should change this to be a function of z which I don't know how. Since I don't know I just continue integrating with respect to x and y I will have $= \int_0^1\frac{1}{2y}dy = \frac{1}{2}\ln (1) -\ln(0)$ which is not defined
Apparently something is not right here, Can anyone help please?
I would suggest finding first the distribution function of $Z$: $$F_Z(a)=P(Z\le a)=P(X\le aY)$$ for $a>0$. This is the area of the part of the square above the line $y=x/a$. Once we have $F_Z$ we can differentiate to get the density function.