# Pool of $N$ ranked items, pick $P$ at random; chances of selecting 3 of top 5 ranks?

I have $N$ items with a number on them, ranked $1,2,3,4,5,\dots,N$, and I select $P$ items at random.

What are the chances that 3 of the top 5 numbered items are in the $P$ chosen items?

-
In how many ways can we select $P$ items from $N$ items? And in how many ways can we select $P$ items from $N$ items such that $3$ of those $5$ (and $P - 3$ of the remaining $N - 5$) are picked? – TMM Mar 25 '12 at 1:28
Exactly three , or at least three of the top 5? – Thomas Andrews Mar 25 '12 at 1:45
*at least three of the top 5. Thanks. – mark Mar 25 '12 at 2:19

There are $\binom{N}{P}$ ways of picking $P$ items from $N$ possibilities.
There are $\binom{N-5}{P}$ ways of picking them so that none of the picked items are in the top $5$; there are $\binom{5}{1}\binom{N-5}{P-1}$ ways of picking them so that exactly one is among the top $5$. And there are $\binom{5}{2}\binom{N-5}{P-2}$ ways of picking them so that there are exactly two among the top $5$.
So the total number of bad picks (picks that do not satisfy the desired conditions) is: $$\binom{N-5}{P} + \binom{5}{1}\binom{N-5}{P-1} + \binom{5}{2}\binom{N-5}{P-2}.$$