To obtain a binomial random variable, we observed a sequence of n Bernoulli trials and counted the number of successes. Suppose now that we do not fix the number of Bernoulli trials in advance but instead continue to observe the sequence of Bernoulli trials until a certain number r, of successes occurs. The random variable of interest is the number of trials needed to observe the rth success.
Let first discuss the problem when r =1. That is, consider a sequence of Bernoulli trials with probability p of success. This sequence is observed until the first success occurs. Let X denot the trial number on which the first success occurs.
For example, if F and S represent failure and success, respectively, and the sequence starts with F,F,F,S,…, then X =4. Moreover, because the trials are independent, the probability of such sequence is
In general, the p.d.f.
Recall that:
Thus,
From the sum of geometric series we also note that, when k is an integer,
and thus the value of the distribution function at a positive integer k is
Example 1
Some biology students were checking the eye color for a large number of fruit flies. For the individual fly, suppose that the probability of white eyes is
The probability that at most four flies have to be checked for eye color to observe a white-eyed fly is given by
The probability that the first fly with white eyes is the fourth fly that is checked is
It is also true that
In general,
To find a mean and variance for the geometric distribution, let use the following results about the sum and the first and second derivatives of a geometric series. For
Then
If X has a geometric distribution and
using the formula for
Note:
To find the variance of X, let first find the second factorial moment
Using formula for
The standard deviation of X is
Example 2
Continuing with example 1, with p =1/4, we obtain
and




