# Bernoulli trials with at least 1 success and 1 failure

Independent Bernoulli trials are performed, with probability $1/2$ of success, until there has been at least one success. Find the PMF of the number of trials performed.

How is this different from the negative binomial?

• $k$ trials happen iff there are $k-1$ failures then $1$ success, i.e. $P(k \text{ trials}) = \frac{1}{2^k}$ Jul 8, 2015 at 3:14
• It is the geometric, a special case of the negative binomial. Jul 8, 2015 at 3:35

This is the geometric distribution, # of trials needed to get first success

$P(x=k) = (1-p)^{k-1}\cdot p$

The negative binomial distribution gives the # of trials needed to get k successes

So, as has been commented, the geometric distribution is a special case of the negative binomial distribution.

Note

Some count the # of failures for the negative binomial, but as you must be knowing, what is defined as "success" is just a matter of convenience.

First we need to observe that the range of $$X$$ is $$\{2, 3, 4, \dots\}$$. So for each integer $$k \geq 2$$, we get

$$\{X = k\} \;=\; [S_1 \cap S_2 \cap S_3 ... \cap S_{k-1} \cap S^c_k] \;\cup\; [S^c_1 \cap S^c_2 \cap S^c_3 ... \cap S^c_{k-1} \cap S_k].$$

So, we have,
$$\mathbb{P}(X = k) \;=\; \mathbb{P}(S_1 \cap S_2 \cap S_3 ... \cap S_{k-1} \cap S^c_k) \;+\; \mathbb{P}(S^c_1 \cap S^c_2 \cap S^c_3 ... \cap S^c_{k-1} \cap S_k)$$ $$= \; p^{k-1}(1-p) + (1-p)^{k-1}p.$$