<s>[INST] Conditional ratio distribution on discrete random variables Let $(X, Y)$ a random discrete vector with joint probability function
$$p(X=n, Y=n) = \frac{1}{2^n 3}$$
$$p(X=n, Y=3n) = \frac{2}{2^n 3}$$
for each $n \geq 1$. Consider the random variable $Z = \frac{Y}{X}$. Determine the distribution of $Z$ given $X=n$ for $n\geq 1$.
I managed to compute the marginals of $X$ and $Y$, being
$$p(X=n) = \frac{1}{2^n}$$
$$p(Y=n) = \begin{cases}
\frac{1}{2^n3} \text{ if } m \nmid 3 \\ 
\frac{1}{2^{n-1}3} + \frac{1}{2^{3n}3} \text{ if } m \nmid 3
\end{cases}$$
checking also that these random variables are not independent. However, I have no idea how to compute the distribution of $Z$.
Any help would be appreciate.
 [/INST] $Z$ can take only the values $1$ and $3$. $P(Z=1)=\sum P(X=Y=n)=\sum \frac  1 {3(2^{n})}=\frac  1  3$ and $P(Z=3)=\frac  2 3 $.
Also, $P(Z=1|X=n)=P(Y=n|X=n)=\frac {P(X=n,Y=n)} {P(X=n)}$ and similarly for $P(Z=3|X=n)$
</s>