
joint mass function
Choose a number X at random from the set of numbers {1,2,3,4,5}. Now choose a number at random from the subset no larger than X, that is, from {1,...,X}. Call this second number Y.
1) Find the joint mass function of X and Y
2) Find the conditional mass function of X given that Y=i. Do it for i=1,2,3,4,5.
3) Are X and Y independent? Why?(Headbang)

I'm assuming that the distribution of X over 1,..., x are equally likely.
$\displaystyle P(X=x)=1/5$ for x=1,2,3,4,5.
$\displaystyle P(Y=yX=x)=1/x$ for y=1,...,x.
Hence $\displaystyle P(Y=y,X=x)= P(Y=yX=x)P(X=x)={1\over 5x}$ for $\displaystyle 1\le y\le x\le 5$, where these are just integers.
X and Y are dependent since, for example, $\displaystyle P(Y=1X=1)=1$ while $\displaystyle P(Y=1X=2)={1\over 2}$
which is one way to prove dependency. If the rvs were independent, then the conditional probabilities would all be the same and they would be equal to the marginal distributions. But these two probabilities cannot both be equal to $\displaystyle P(Y=1)$, since they are not equal to each other.