Question on negative binomial distribution I was unable to see through this question on negative binomial distribution please help:
A shipment of 2500 car headlights contains 200 which are defective. You choose from this shipment without replacement until you have 18 which are not defective. Let  $X$ be the number of defective headlights you obtain.
find the probability function f(x)
thanks in advance!
 A: I would usually point you at the Wikipedia article on the negative hypergeometric distribution but in this case it is not helpful.
The probability that there are $X=x$ defectives by the time you find the $18$th not-defective item is the probability that there are $x$ defectives in the first $x+17$ items multiplied by the conditional probability that the next item is not defective.  
So $$\Pr(X=x)=\dfrac{\displaystyle{{2300 \choose 17} {{200} \choose {x}}}}{ \displaystyle{2500 \choose x+17}}\cdot \dfrac{2283}{2483-x}.$$  
A: The process of choosing ends, the moment we pick $18^{th}$ non-defective car headlight.
Before picking $18^{th}$ non-defective car headlight, we have picked $17$ non-defective and x defective car headlights. 
Think of this process or event as sequence of two steps. 
1.  Picking 17 non-defective car headlights. 
2.  Picking x defective car headlights. 
The number of possible outcomes in the event is then product of combinations obtained in each of the step. 
1. number of non-defective car headlights = 2500-200 = 2300 
          Pick 17 non-defective car headlights from 2300 non-defective ones
    $2300 \choose 17$ 
2. number of defective car headlights = 200 
        Pick x defective car headlights from 200 defective ones
    $200 \choose x$ 
Number of Possible Outcomes in Event = $2300 \choose 17$$200 \choose x$ 
Sample Space = $2500 \choose 17+x$  
$\therefore Pr(X=x) = {2300 \choose 17} {200 \choose x}/{2500 \choose 17+x}$ 
