Consider an experiment based on independent Bernoulli trials, each with the probability of a success being . Now define the variable of interest, , to be the number of trials up to BUT NOT including the first success. Here the induced sample space is , and is infinite, corresponding to outcomes in the original sample space
If, for example, the sequence occurs then random variable .
Such a random variable is called a Geometric random variable, examples of which include:
the number of heads of a coin toss before the first tail,
the number of boys born before the first girl,
the number of black cars passed before a red car,
the number of years to pass before the Scotland football team qualify for anything.
We say .
Use the independence of the Bernoulli random variables to derive the pmf of the geometric random variable. Hint: corresponds to the sample point .
The rv . Use R to evaluate and plot the pmf of for , with the commands
dgeom(0:5,prob=0.3) dgeom(0:5,prob=0.4) # Note how the probabilities change barplot( dgeom(0:5,prob=0.4),names.arg=c(0:5) )
Repeat with and plot.
Verify that for the geometric pmf. This requires the mathematical formulae for sums of geometric type series given at the start of this chapter.
For a general , find .
Note that this is simply the probability that the first Bernoulli trials are all .
Find and for a geometric random variable.
Now to find we begin by calculating :
This is then plugged in to get
Yuck!
Note that as the Bernoulli probability then the expected number of trials (and the variance) goes to . To summarise
For a geometric random variable