Geometric Distribution Calculator
Free Geometric distribution Calculator for sequences. Enter values to get step-by-step solutions with formulas and graphs.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Geometric Distribution Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: P(X = k) = p * (1 - p)^(k-1)
Worked example โ P(X=10) = 3.15% | Expected trials = 20 | P(X<=10) = 40.13%
Formula
P(X = k) = p * (1 - p)^(k-1)
Where p is the probability of success on each trial, k is the trial number on which the first success occurs, and (1-p) is the probability of failure. The mean is 1/p and the variance is (1-p)/p^2.
Worked Examples
Example 1: Quality Control Inspection
Problem:A factory has a 5% defect rate. What is the probability of finding the first defective item on the 10th inspection?
Solution:P(X = 10) = 0.05 * (1 - 0.05)^(10-1) P(X = 10) = 0.05 * 0.95^9 P(X = 10) = 0.05 * 0.6302 P(X = 10) = 0.03151 Expected inspections until first defect: 1/0.05 = 20 P(finding defect within 10 inspections) = 1 - 0.95^10 = 0.4013
Result:P(X=10) = 3.15% | Expected trials = 20 | P(X<=10) = 40.13%
Example 2: Sales Conversion Rate
Problem:A salesperson converts 20% of leads. What is the probability of making the first sale within 5 calls?
Solution:P(X <= 5) = 1 - (1 - 0.20)^5 P(X <= 5) = 1 - 0.80^5 P(X <= 5) = 1 - 0.32768 P(X <= 5) = 0.67232 Expected calls until first sale: 1/0.20 = 5 P(exactly on 5th call) = 0.20 * 0.80^4 = 0.08192
Result:P(within 5 calls) = 67.23% | P(exactly 5th) = 8.19% | Expected = 5 calls
Frequently Asked Questions
What is a geometric distribution and when is it used?
A geometric distribution models the number of independent Bernoulli trials needed to achieve the first success, where each trial has the same probability of success p. It is the discrete analog of the exponential distribution. Common applications include modeling the number of coin flips until the first heads, the number of products inspected until finding a defective one, the number of sales calls before making a sale, and the number of attempts to establish a network connection. The distribution assumes each trial is independent and the probability of success remains constant. It is the only memoryless discrete probability distribution, meaning past failures do not affect future success probability.
What is the probability mass function (PMF) of the geometric distribution?
The PMF gives the probability that the first success occurs on exactly the kth trial: P(X = k) = p * (1 - p)^(k-1), where p is the success probability and k is the trial number (k = 1, 2, 3, ...). This formula makes intuitive sense: you need (k-1) failures each with probability (1-p), followed by one success with probability p. For example, with p = 0.3, the probability of first success on trial 4 is 0.3 * 0.7^3 = 0.3 * 0.343 = 0.1029 or about 10.29%. The PMF decreases geometrically (by a constant ratio of 1-p), which is where the distribution gets its name.
How do you calculate the cumulative distribution function (CDF) of the geometric distribution?
The CDF gives the probability of achieving the first success within k trials: P(X <= k) = 1 - (1 - p)^k. This formula is derived by noting that not succeeding within k trials means failing k times in a row with probability (1-p)^k, so the complement gives the CDF. For example, with p = 0.2, the probability of success within 5 trials is 1 - 0.8^5 = 1 - 0.32768 = 0.67232 or about 67.2%. The CDF is useful for answering questions like how many trials are needed for a given confidence level. To find the number of trials needed for 95% certainty, solve 1 - (1-p)^k >= 0.95 for k.
What are the mean and variance of the geometric distribution?
The mean (expected value) of the geometric distribution is E[X] = 1/p, and the variance is Var(X) = (1-p)/p^2. The standard deviation is sqrt((1-p)/p^2) = sqrt(1-p)/p. For example, if p = 0.25, the expected number of trials until the first success is 1/0.25 = 4, with variance = 0.75/0.0625 = 12 and standard deviation = sqrt(12) = 3.46. The mean being 1/p is intuitive: if you succeed 25% of the time, you expect to need 4 tries on average. As p approaches 1, both mean and variance decrease toward 1 and 0 respectively, since success becomes nearly certain on the first trial.
What is the memoryless property of the geometric distribution?
The memoryless property states that P(X > s + t | X > s) = P(X > t) for any positive integers s and t. In practical terms, if you have already failed s times, the probability of needing more than t additional trials is the same as if you were starting fresh. For example, if you are flipping a coin waiting for heads and have already gotten 10 tails, the expected number of additional flips is still the same as when you started. This property is unique to the geometric distribution among discrete distributions (and to the exponential distribution among continuous ones). It mathematically captures the idea that independent trials have no memory of past outcomes.
How does the geometric distribution relate to the negative binomial distribution?
The geometric distribution is a special case of the negative binomial distribution with r = 1, where r represents the number of successes desired. While the geometric distribution counts trials until the first success, the negative binomial counts trials until the rth success. If X1, X2, ..., Xr are independent geometric random variables with the same parameter p, their sum follows a negative binomial distribution with parameters r and p. This relationship is useful for extending geometric distribution problems: for example, if you want to know how many sales calls are needed to make 5 sales (not just the first), you use the negative binomial distribution with r = 5.
How do you calculate percentiles of the geometric distribution?
To find the kth percentile of a geometric distribution (the smallest value m such that P(X <= m) >= k/100), solve the inequality 1 - (1-p)^m >= k/100. Rearranging: (1-p)^m <= 1 - k/100, so m >= ln(1 - k/100) / ln(1-p). Take the ceiling of this value since m must be an integer. For example, with p = 0.1, the 90th percentile is ceil(ln(0.1)/ln(0.9)) = ceil(21.85) = 22 trials. This means there is at least a 90% chance of achieving the first success within 22 trials. Percentile calculations are valuable in project planning and risk assessment when you need high-confidence estimates of the number of attempts required.
What is the survival function and how is it interpreted?
The survival function S(k) = P(X > k) = (1-p)^k gives the probability that the first success has NOT occurred within the first k trials. It is simply 1 minus the CDF. For example, with p = 0.15, S(10) = 0.85^10 = 0.1969, meaning there is about a 19.7% chance of going 10 trials without any success. The survival function is particularly useful in reliability engineering and quality control. If a machine has a 2% chance of producing a defective item, the survival function tells you the probability of producing k consecutive non-defective items. The survival function always starts at 1 (for k=0) and decreases monotonically toward zero.
How do you estimate the parameter p from observed data?
The maximum likelihood estimator for p is p_hat = n / sum(x_i), where n is the number of observed sequences and sum(x_i) is the total number of trials across all sequences. Equivalently, p_hat = 1 / x_bar, where x_bar is the sample mean of trials until success. For example, if you observed first successes at trials 3, 7, 2, 5, and 8, then x_bar = 5 and p_hat = 1/5 = 0.2. A 95% confidence interval can be computed using the chi-squared distribution or bootstrap methods. For large samples, the approximate confidence interval is p_hat plus or minus 1.96 * p_hat * sqrt((1-p_hat)/n). Goodness-of-fit tests should be used to verify the geometric assumption.
What are the two conventions for defining the geometric distribution?
There are two common parameterizations. The first counts the number of trials until the first success (including the success trial), giving support {1, 2, 3, ...} with PMF P(X=k) = p*(1-p)^(k-1) and mean 1/p. The second counts the number of failures before the first success, giving support {0, 1, 2, ...} with PMF P(Y=k) = p*(1-p)^k and mean (1-p)/p. The two are related by Y = X - 1. Geometric Distribution Calculator uses the first convention (trials until success). When consulting textbooks or other calculators, always check which convention is used, as formulas for mean, variance, CDF, and other quantities differ between the two. The trials-until-success version is more common in applied statistics.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎGeometric Mean Calculator
Calculate geometric mean with inputs, formulas, and instant results.
๐งฎPoisson Distribution Calculator
Calculate poisson distribution with inputs, formulas, and instant results.
๐งฎHypergeometric Distribution Calculator
Calculate hypergeometric distribution with inputs, formulas, and instant results.
๐งฎGeometric Sequence Calculator
Calculate geometric sequence with inputs, formulas, and instant results.
๐งฎNormal Distribution Calculator
Calculate normal distribution with inputs, formulas, and instant results.
๐งฎGeometric Progression Calculator
Calculate nth term, sum, and properties of geometric sequences and series.
๐งฎExponential Distribution Calculator
Calculate exponential distribution probabilities from rate parameter and time interval.
๐งฎZ-Score Calculator with Step-by-Step Solution
Calculate z-scores and find probabilities from the standard normal distribution table.