Q:

Understanding how join probability table is constructed in Chapter 4 Problem 4.9 of Goldberg's "Probability An Introduction"

I've been working through Samuel Goldberg's "Probability An Introduction" book and it's been a lovely book on discrete probability. I'm stumped by this particular problem. It has several parts, I'm focusing only on part a) since rest of the parts depend on a).
The problem is formulated as following, quoted verbatim from the book:
We select one of the integers 1, 2, 3, 4, 5. After discarding all integers (if any) less than the selected integer, we draw one of the remaining integers. (For example, if we select 3 first, then the second draw is made from the integers 3, 4, 5.) Let X and Y denote the numbers obtained on the first and second draws, respectively.
a) Construct the join probability table of X and Y.
My solution is:
\begin{array}{cccc}
  & Y=1 & Y=2 & Y=3 & Y=4 & Y=5 \\
 X=1 & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} & \frac{1}{15}\\
 X=2 & 0 & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} \\
 X=3 & 0 & 0 & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} \\
 X=4 & 0 & 0 & 0 & \frac{1}{15} & \frac{1}{15} \\
 X=5 & 0 & 0 & 0 & 0 & \frac{1}{15} \\
\end{array}
I didn't bother to include the marginal probabilities since they are not the focus.
My rationale is since problem's sample space is a set of ordered pairs with first and second elements taken from $\{1, 2, 3, 4, 5\}$
Due to the problem's specifications, not all pairs are possible, hence I counted a total of 15 possible pairs, each assigned equal probability of $\frac{1}{15}$.
The answer given by the book is:
\begin{array}{cccc}
  & Y=1 & Y=2 & Y=3 & Y=4 & Y=5 \\
 X=1 & \frac{1}{25} & \frac{1}{25} & \frac{1}{25} & \frac{1}{25} & \frac{1}{25}\\
 X=2 & 0 & \frac{1}{20} & \frac{1}{20} & \frac{1}{20} & \frac{1}{20} \\
 X=3 & 0 & 0 & \frac{1}{15} & \frac{1}{15} & \frac{1}{15} \\
 X=4 & 0 & 0 & 0 & \frac{1}{10} & \frac{1}{10} \\
 X=5 & 0 & 0 & 0 & 0 & \frac{1}{5} \\
\end{array}
My current self-explanation is that it appears the probabilities were obtained by considering the problem as two trials, the first trial having probability of $\frac{1}{5}$, and the second trial having probability depending on which integer was selected in the first trial, so we have $\frac{1}{5}$, $\frac{1}{4}$, $\frac{1}{3}$, $\frac{1}{2}$, and 1 for the second trial for selection of 1, 2, 3, 4, 5 respectively. Multiplying the two trials' probabilities together gives you the probabilities in the book's answer.
I don't understand why. My explanation assumes the two trials are independent which I don't think is correct since obviously the second trial's probability depends on the first trial. Nevertheless, I am unable to account for them some other way.
Would love to understand this. Thanks!

A:

I didn't bother to include the marginal probabilities since they are not the focus.

But they are very useful for checking. In your solution, if you compute the marginal of $X$, you'd get that $P(X=1)=5/15$ while $P(X=5)=1/15$
This should strike you as wrong. We should have $P(X=k)=1/5$ for all $k$.
Indeed, you should start from there, because it reflects the experiment: the first draw ($X$) gives a number uniformly distributed in $1\cdots 5$, hence, you know that $$P(X=k)={1 \over 5} \hspace{1 cm} (k=1\cdots 5)$$
Now, you should use conditional probabilities.
$$P(Y=j \mid X=k) = \begin{cases} 
\frac{1}{5-k+1} & j \ge k \\
0 & {\rm elsewhere}
\end{cases}$$
and from there you compute the joint probabilities.

Due to the problem's specifications, not all pairs are possible, hence I counted a total of 15 possible pairs, each assigned equal probability of 1/15

The counting is correct, the assumption that all have equal probability is wrong. The joint distribution is not uniform.
What you know is that the first trial ($X$) is uniform, and that the second trial conditioned on the first ($Y\mid X$) is also uniform; but the later is a different uniform distribution for each $X$, hence the joint distribution (the product) is not uniform.

