> [!definition] > > > The negative binomial distribution is the [[Probability Distribution|probability distribution]] of a negative binomial [[Random Variable|random variable]] $X$ that represents the trial number on which the $k$-th success occurs in a [[Bernoulli Process|Bernoulli process]]. It has the following [[Probability Mass Function|probability mass function]]: > $ > p_{NB(k,p)} = pB(x - 1, k - 1) = {{x - 1}\choose{k - 1}}p^kq^{x-k} > $ > > Since $X$ is the $k$-th success, there must exist $(k - 1)$ successes in the first $(x - 1)$ trials, which can be represented using a [[Binomial Random Variable|binomial distribution]] multiplied by an additional $p$ to represent the last success. > [!theorem] > > The [[Geometric Distribution|geometric distribution]] is a special case of the negative binomial distribution where $k = 1$. > [!theorem] > > $ > E(X) = \frac{k}{p} \quad Var(X) = \frac{kq}{p^2} > $ > > *Proof*. > > Generalising the [[Expectation|expected value]] and [[Variance|variance]] of the geometric distribution: let $X = X_1 + X_2 + X_3 + \cdots + X_k$ be the random variables that represent the number of trials to obtain the $n$-th success after getting the $(n-1)$-th success. Adding them as a [[Random Sample|random sample]], $E(\sum{X}) = nE(X)$.