How to Use the Geometric Distribution Calculator
This calculator allows you to find exact and cumulative probabilities of a geometric distribution when you know the probability of success on each trial. To use the calculator:
- Enter the probability of success, p, as a decimal.
- Enter the trial number, x, on which the first success occurs. For a probability between two trial numbers, enter the lower and upper values.
- Select the probability you want to find.
- Choose the number of decimal places for the final answer.
- Click Calculate.
The calculator returns the probability you want to find and shows you exactly how it was calculated using your values. It also provides the mean and standard deviation of the geometric distribution.
With this calculator, you can calculate:
- Probability that the first success occurs exactly on trial x, P(X = x)
- Probability that the first success occurs by trial x, P(X ≤ x)
- Probability that the first success occurs before trial x, P(X < x)
- Probability that the first success occurs on trial x or later, P(X ≥ x)
- Probability that the first success occurs after trial x, P(X > x)
- Probability that the first success occurs between trials a and b, P(a ≤ X ≤ b)
What Is a Geometric Distribution?
A geometric distribution is a discrete probability distribution used to model the number of independent trials required to get the first success.
For example, suppose a machine has a 0.30 probability of passing a test on each independent attempt. If you continue testing until the machine passes for the first time, the trial on which the first pass occurs can be modeled using a geometric distribution.
In this calculator, X represents the trial number on which the first success occurs. Therefore, the possible values of X are:
1, 2, 3, 4, …
For example:
- X = 1 means the first trial is a success.
- X = 2 means the first trial fails and the second succeeds.
- X = 3 means the first two trials fail and the third succeeds.
This definition is important because some textbooks instead define a geometric random variable as the number of failures before the first success. Under that convention, X begins at 0. This calculator uses the trial-number convention, so X begins at 1.
When Should You Use the Geometric Distribution?
A geometric distribution is appropriate when you repeat the same type of trial until the first success occurs.
In general, a geometric experiment should have the following characteristics:
- Each trial has only two possible outcomes, usually called success and failure.
- The trials are independent.
- The probability of success, p, remains constant from one trial to the next.
- Trials continue until the first success occurs.
For example, a geometric distribution could be used to find the probability that:
- the first successful login occurs on the fourth attempt;
- the first defective product is found on the sixth inspection;
- the first customer who accepts an offer is the fifth customer contacted;
- the first successful machine restart occurs within three attempts.
If you instead have a fixed number of trials and want to count how many successes occur, use the Binomial Distribution Calculator.
Geometric Distribution Formula
The probability that the first success occurs exactly on trial x is calculated using the geometric probability formula:
P(X = x) = (1 − p)x − 1 × p
Where:
- P(X = x) is the probability that the first success occurs on trial x;
- p is the probability of success on each trial;
- 1 − p is the probability of failure on each trial;
- x is the trial number on which the first success occurs.
The formula makes sense when you consider what must happen before the first success.
For the first success to occur on trial x, the first x − 1 trials must fail, followed by a success on trial x. For example, if the first success occurs on trial 4, the required sequence is: Failure, Failure, Failure, Success. Therefore, P(X = 4) = (1 − p)3 × p
Exact and Cumulative Geometric Probabilities
An exact geometric probability finds the probability that the first success occurs on one specific trial. For example, P(X = 5) means the first success occurs exactly on trial 5.
A cumulative geometric probability covers several possible trial numbers. Fortunately, cumulative geometric probabilities can usually be calculated directly without finding and adding every individual probability.
The most useful formulas are:
- Exactly x: P(X = x) = (1 − p)x − 1 × p
- At most x: P(X ≤ x) = 1 − (1 − p)x
- Less than x: P(X < x) = 1 − (1 − p)x − 1
- At least x: P(X ≥ x) = (1 − p)x − 1
- More than x: P(X > x) = (1 − p)x
Tip. For a probability between two trial numbers, including both endpoints: P(a ≤ X ≤ b) = (1 − p)a − 1 − (1 − p)b
These formulas are applied automatically when you select the probability you want to find in our geometric distribution calculator.
How to Calculate Geometric Probability
To calculate geometric probability manually, first identify the probability of success, p, and the trial number involved in the question.
For an exact probability, use the geometric probability formula: P(X = x) = (1 − p)x − 1 × p. However, for a cumulative probability, use the appropriate cumulative formula depending on whether the problem asks for at most, less than, at least, more than, or between certain trial numbers.
Example 1: Exact Geometric Probability
A quality-control system detects a particular manufacturing defect with a probability of 0.30 on each independent inspection. Inspections continue until the defect is detected. What is the probability that the defect is detected for the first time on the fourth inspection?
Solution
From the question, we know that:
- Probability of success, p = 0.30
- Trial number, x = 4
In this case, a success means detecting the defect.
Since we need the probability that the first detection occurs exactly on the fourth inspection, we need to find P(X = 4).
Recall. The geometric probability formula is: P(X = x) = (1 − p)x − 1 × p
Substituting p = 0.30 and x = 4 gives:
P(X = 4) = (1 − 0.30)4 − 1× 0.30
= (0.70)3 × 0.30
= 0.343 × 0.30
Hence, P(X = 4) = 0.1029
This implies that the probability that the defect is detected for the first time on the fourth inspection is 0.1029.
Example 2: Cumulative Geometric Probability
A technical support team at a Canadian college successfully resolves a particular login problem on any troubleshooting attempt with a probability of 0.25. Assume the attempts are independent and the probability of success remains constant. What is the probability that the problem is resolved for the first time within the first 5 attempts?
Solution
From the question, we know that:
- Probability of success, p = 0.25
- Trial number, x = 5
“Within the first 5 attempts” means that the first success can occur on trial 1, 2, 3, 4, or 5. Thus, we need to find P(X ≤ 5)
For an at most geometric probability, we can use the formula: P(X ≤ x) = 1 − (1 − p)x
Substituting p = 0.25 and x = 5 gives:
P(X ≤ 5) = 1 − (1 − 0.25)5
= 1 − (0.75)5
= 1 − 0.23730469
P(X ≤ 5) = 0.76269531
This implies that the probability that the login problem is resolved for the first time within the first 5 attempts is approximately 0.7627.
Mean and Standard Deviation of a Geometric Distribution
Besides the requested probability, the calculator also reports the mean and standard deviation of the geometric distribution.
The mean represents the expected trial number on which the first success occurs and is calculated using the formula: μ = 1/p.
For example, if p = 0.25, the mean of the geometric distribution would be: μ = 1 / 0.25
= 4
Therefore, over many repetitions of the same experiment, the first success would occur on an average of 4 trials.
The variance of a geometric distribution is: σ² = (1 − p)/p² and its standard deviation is: σ = √(1 − p)/p.
Assuming p = 0.25, we would calculate the standard deviation of the geometric distribution as follows:
σ = √(1 − 0.25) / 0.25
= √(0.75 / 0.25)
= 3.4641
Thus, when p = 0.25, the geometric distribution has a mean of 4 and a standard deviation of approximately 3.4641.
Geometric Distribution vs. Binomial Distribution
The geometric and binomial distributions are closely related because both involve independent trials with two possible outcomes and a constant probability of success.
The main difference is what you are counting. With a geometric distribution, you continue performing trials until the first success and record which trial produced that success. However, with a binomial distribution, you perform a fixed number of trials and count how many successes occur.
For example, suppose the probability of making a sale is 0.20. If the question asks “What is the probability that the first sale occurs on the fifth call?”, you should use a geometric distribution. However, if the question asks “What is the probability of making exactly 2 sales in 5 calls?”, you should use a binomial distribution.
Common Mistakes When Calculating Geometric Probability
Avoid these common mistakes:
- Starting x at 0. In this calculator, X is the trial number of the first success, so x must be 1 or greater.
- Using p for failures. p represents the probability of success. The probability of failure is 1 − p.
- Forgetting the x − 1 exponent. For P(X = x), the first x − 1 trials must fail before the success on trial x.
- Confusing at least with more than. P(X ≥ 5) includes trial 5, while P(X > 5) does not.
- Confusing at most with less than. P(X ≤ 5) includes trial 5, while P(X < 5) does not.
- Using the geometric distribution for several successes. The standard geometric distribution models the waiting time until the first success, not the second, third, or later success.
- Using changing probabilities. The geometric model assumes the probability of success remains constant across trials.
Frequently Asked Questions
This is an online tool that calculates the probability of the trial on which the first success occurs when each independent trial has the same probability of success. This calculator can find exact and cumulative probabilities such as P(X = x), P(X ≤ x), P(X < x), P(X ≥ x), P(X > x), and P(a ≤ X ≤ b), and also provides the mean, standard deviation, and a step-by-step solution.
In this calculator, x is the trial number on which the first success occurs. For example, x = 4 means the first three trials fail, and the fourth trial succeeds.
The probability is: P(X = x) = (1 − p)x − 1 × p. The first x − 1 trials must fail, followed by a success on trial x.
The probability that the first success occurs within the first x trials is: P(X ≤ x) = 1 − (1 − p)x. This is also the probability of getting at least one success within x trials.
For the convention used by this calculator, the mean is: μ = 1/p. It represents the expected number of trials required to obtain the first success.
A geometric distribution models the number of trials required to obtain the first success. However, a negative binomial distribution extends this idea to the number of trials required to obtain a specified number of successes, such as the third or fifth success.
