Negative Binomial Distribution¶
Negative Binomial Distribution¶
Suppose we run an experiment with independent Bernoulli trials where the experiment stops when \(r > 0\) successes are observed. Let \(p\) be the probability of success, and \(k\) be the number of failures in the experiment,
since the last trial is by definition a success; we can only choose the failures from the remaining trials. Again, \(X\) is the number of failures and not the number of trials.
Moment Generating Function¶
Mean and Variance¶
With the moment generating function, mean and variance are easy to calculate
Relation to Geometric Distribution¶
Geometric distribution is a special case of Negative binomial distribution with \(r = 1\)
and can be checked using the mgf of the two.
Further, the sum of \(r\) independent geometric random variables is a negative binomial distribution with parameters \(r\) and \(p\)
Sum of Negative Binomial Random Variables¶
If \(X_{i}\) are \(NB(r_{i}, p)\), then the sum of \(n\) such variables is \(NB(\sum r_{i}, p)\). That is, the sum of negative binomial random variables is also a negative binomial random variable. This can be readily seen from the mgf.