Here's a question I got for homework:
A student purchases books for $K$ class hours, where $K$ is a random variable with a uniform distribution between $1$ to $3$. The number of books the students purchases is also a random variable defined by $P(N=n|K=k) = 1/k$, $n = 1,\dots,k$.
What is the joint distribution, what is the marginal probability function of N?
So, first I wrote down $P(K=k): 1/3$, $k=1,2,3$
Now, $P(N=n|K=k) = P(N=n \text{ and } K=k)/P(K=k) = 1/k$, and from that I got $P(N=n\text{ and }K=k) = (1/k)P(K=k)$. When I write down the table of joint distribution the disjoints events didn't sum up to $1$. For example:
\begin{align*} P(N=1|K=1) &= 1 \\ P(N=1|K=2) &= 1/6 \\ P(N=1|K=3) &= 1/9 \\ \end{align*}
You'll notice that I get P(N=n) = 11/18 for n=1,2,3 And that's what I mean when I say it didn't sum up to 1.
There's obviously something I don't understand, a hint would be great. Where is my mistake? Thanks!