Probability that in a line of 'n' distinguishable people, at least 'b' of the front 'a' spots are one of 'k' red-shirt-wearers I've been approaching this problem for some time. Imagine that we have n distinguishable (uniquely named) people lined up in a line where k of these people are wearing red shirts. I want to find the probability that at least b of the front a spots of the line are occupied by someone wearing a red shirt.
I approached the problem by first solving the problem of the number of ways for the first b spots to be occupied by a red-shirt-wearer. My result for this was:
$$\frac{k!}{(k-b)!}(n-b)!$$
where the first term represents the number of ways to arrange the k people into the first b spots and the second term is the ways to arrange the rest of the people in the remaining spots in line. I then added a correction term for the number of ways we can pick b spots from the a top spots and get:
$${a \choose b}\frac{k!}{(k-b)!}(n-b)!$$
Now, since I want the probability that at least b spots are filled, I sum this term from b to the minimum of a and k:
$$\sum_{j=b}^{min(a,k)} {a \choose j}\frac{k!}{(k-j)!}(n-j)!$$
Now, to get the probability I divide by all possible arrangements of the line:
$$\frac{1}{n!}\sum_{j=b}^{min(a,k)} {a \choose j}\frac{k!}{(k-j)!}(n-j)!$$
Since I am programming this and can't handle factorials of the size required, I then do some simplification:
$$\sum_{j=b}^{min(a,k)} {a \choose j}\frac{k!}{(k-j)!}\frac{(n-j)!}{n!}$$
$$\sum_{j=b}^{min(a,k)} [{a \choose j}\prod_{i=0}^{j}\frac{k-i}{n-i}]$$
Sadly, when I run my program, I get answers above 1 for some input values which I don't think should be possible... It is possible that I implemented my code wrong, but my suspicion is that my math is incorrect. Is there a flaw in my thinking about this problem/derivation of an answer?
 A: Ah! I just realized that I am double, triple, quadruple, etc counting for the cases where the number of red-shirt-wearers in the first $a$ spots is greater than $b$. I re-solved the problem with this in mind. I still get answers greater than 1, sadly.
First, we force a chosen $b$ of our $k$ red shirts into the first $b$ spots to give us # of ways equal to:
$$b!$$
Now, we correct for how many ways we could choose these $b$ people from $k$ red shirts:
$${k \choose b}b! \to \frac{k!}{(k-b)!}$$
Now, we correct for how many ways we could choose the $b$ spots from the first $a$ spots:
$${a \choose b} \frac{k!}{(k-b)!}$$
Now, we fill the rest of the $a-b$ top spots with anyone from our pool of now $n-b$ people:
$${a \choose b}\frac{k!}{(k-b)!}\frac{(n-b)!}{((n-b)-(a-b))!} \to {a \choose b}\frac{k!}{(k-b)!}\frac{(n-b)!}{(n-b-a+b)!} \to {a \choose b}\frac{k!}{(k-b)!}\frac{(n-b)!}{(n-a)!}$$
Now, we fill in the remaining n-a spots with everyone left:
$${a \choose b}\frac{k!}{(k-b)!}\frac{(n-b)!}{(n-a)!}(n-a)! \to {a \choose b}\frac{k!}{(k-b)!}(n-b)!$$
Now, we have the total number of permutations of a line of $n$ people such that at least $b$ of $k$ red-shirt-wearers are in the first $a$ spots!
We simply divide by all permutations of the line and get our probability:
$$\frac{1}{n!}{a \choose b}\frac{k!}{(k-b)!}(n-b)!$$
For code implementation, we can simplify to:
$${a \choose b}\frac{k!}{(k-b)!}\prod_{i=0}^{b-1}\frac{1}{(n-i)}$$
I don't know where I went wrong this time.

Edit: I couldn't figure out how to apply inclusion-exclusion principle in this set-up, but I did realize that I should be able to fill in the remaining $n-a$ spots with instead $n-k$ to force those selections to not be red-shirt-wearers. Thus:
$${a \choose b}\frac{k!}{(k-b)!}\frac{(n-\bf{b})!}{(n-a)!}(n-a)! \to {a \choose b}\frac{k!}{(k-b)!}\frac{(n-\bf{k})!}{(n-a)!}(n-a)!$$
$$ \to {a \choose b}\frac{k!}{(k-b)!}(n-k)!$$
Dividing by all permutations $n!$, for a given b we have:
$${a \choose b}\frac{k!}{(k-b)!}\prod_{i=0}^{k-1}\frac{1}{(n-i)}$$
Now, we must just sum from 0 to $b-1$ and subtract that from one:
$$P(b \geq b_0) = 1-\sum_{j=0}^{b_0-1}{a \choose j}\frac{k!}{(k-j)!}\prod_{i=0}^{k-1}\frac{1}{(n-i)}$$
