I don't understand the book's explanation of how it works..here's the question:

An urn contanis p black balls, q white balls, r red balls, n balls are chosen..find the joint distribution of the numbers of black, white, and red balls in the sample.
