Probability with geometric random variables
What are geometric random variables?
Remember that for a binomial random variable , we’re looking for the number of successes in a finite number of trials.
For a geometric random variable, most of the conditions we put on the binomial random variable still apply:
each trial must be independent,
each trial can be called a “success” or “failure,”
the probability of success on each trial is constant.
Hi! I'm krista.
I create online courses to help you rock your math class. Read more.
The difference is that for a geometric random variable, we’re looking at how many trials we have to use until we get a certain success. For a binomial random variable, we decided ahead of time on a certain number of trials. But for a geometric random variable, we’ll run an infinite number of trials until we get a success.
For example, “flipping a coin until we get heads” could be described by a geometric random variable. It might take just one flip to get heads, but it could take us , , or (though very, very unlikely) flips.
To find the probability that a success occurs on the th attempt, when a success has a probability of , and therefore a failure has a probability of , we use this formula:
If we look closely at this formula, we see that we’re really just multiplying the probability of failure over and over again until the trial right before we have a success, and then multiplying by the probability of a success.
In other words, if we want to find the probability that we get our first success on the th trial, then the probability will be
Notice that the exponents add to , since we needed trials to get the first success.
Answering probability questions with geometric random variables
Take the course
Want to learn more about Probability & Statistics? I have a step-by-step course for that. :)
Probability of winning a prize on the nth play
Example
I’m playing a game where the probability of winning a prize is . What is the probability that I don’t win a prize until the th time I play the game, assuming each game is independent?
We’re looking for the probability that I don’t “succeed” until the th “trial,” so we can represent this with a geometric random variable.
Since the probability of success is , it means the probability of failure is . Since I fail times, and then succeed once on the th game, the probability of this happening is
There’s an approximately chance that I don’t win a prize until the fourth game.
For example, “flipping a coin until we get heads” could be described by a geometric random variable.
More than, less than, at most, and at least probability
More than and less than
Less than
Sometimes we can be asked to find the probability that it takes less than a specific number of trials in order to get our first success. For instance, continuing with the example we just worked through, we could be asked to find the probability that it takes us less than games to win a prize.
This is the same as saying that we win a prize on game , , or . If we call a success , that means we want either or , which mean the same thing in the case of a geometric random variable.
The probability of success is and the probability of failure is . When , that means we have failures before we then have success. When , that means we have failure and then success. When , that means we have failures and then success.
At most
This is slightly different than being asked the probability that it takes us less than games to win a prize. If it takes less than games to win, that means we get a prize in the third game, or earlier. But if it takes us at most games to win, that means we could win a prize in the fourth game. We could write that as or as . But either way, we fail no more than times and then succeed in the fourth game, at the latest.
More than
Similarly, we’ll be asked to find the probability that it takes more than a specific number of trials in order to get our first success. For instance, continuing with the same example, we could be asked to find the probability that it takes more than games for us to win a prize.
Remember that all probability distributions add to . If we’re looking for the probability that it takes more than trials to win a prize, we can find the probability of winning on the first trial and the probability of winning on the second trial, and then subtract those probabilities from , which will give us all the total probability of all outcomes, other than winning on the first or second game.
So the probability that it takes more than games to win is
Keep in mind that we also could have written as , or as .
At least
This is slightly different than being asked the probability that it takes us more than games to win a prize. If it takes more than games to win, that means we don’t get a prize until the third game. But if it takes us at least games to win, that means we could win a prize in the second game. We could write that as or as . But either way, we failed once and then succeeded sometimes in the second game or later.
Mean, variance, and standard deviation
Mean
The mean of a geometric random variable, which can also be called the expected value is given by
where the probability of a success on a trial is , and is the number of independent trials required to get the first success.
So in our example from this section where we have a chance of winning a prize, the mean is
This means you should expect to win the game if you play about one or two times.
Variance and standard deviation
The variance of a geometric random variable is given by
and standard deviation is the square root of the variance. Therefore, the variance of the geometric random variable we’ve been working with is
and the standard deviation is