Geometric Distribution Calculator
The geometric distribution answers a simple but important question: if you repeat an experiment with a fixed probability of success on each attempt, what is the chance that your first success comes on exactly the k-th try? Each attempt is independent and has the same probability p of succeeding. A free-throw shooter with a 30 percent success rate, a quality control inspector checking items until finding the first defect, or a student re-sitting a test until they pass: all of these follow the geometric distribution. The probability that the first success occurs on trial k is P(X = k) = (1 minus p) to the power (k minus 1) times p. The cumulative probability P(X less than or equal to k) = 1 minus (1 minus p) to the power k gives the chance of succeeding by trial k. The expected number of trials to first success is 1 divided by p. This calculator takes the success probability p (between 0 and 1) and the trial number k (a positive integer), and returns the exact probability P(X = k), the cumulative probability P(X less than or equal to k), the probability of still waiting P(X greater than k), and the distribution mean, variance and standard deviation. It is useful for students studying probability theory, quality engineers, sports analysts and anyone dealing with repeated Bernoulli trials.
P(X = k) = (1-p)^(k-1) times p. P(X ≤ k) = 1 - (1-p)^k. p must be between 0 and 1 exclusive. k must be a positive integer.
How it works
For a geometric distribution with success probability p and trial number k:
P(X = k) = (1-p)k-1 × p
P(X ≤ k) = 1 - (1-p)k
P(X > k) = (1-p)k
Mean = 1/p
Variance = (1-p) / p²
Standard deviation = √(variance)
The distribution has the memoryless property: the number of additional trials needed is independent of how many trials have already failed.
Worked example
With p = 0.3 and k = 4: P(X = 4) = (0.7)³ × 0.3 = 0.343 × 0.3 = 0.1029. P(X ≤ 4) = 1 - (0.7)4 = 1 - 0.2401 = 0.7599. P(X > 4) = (0.7)4 = 0.2401. Mean = 1/0.3 = 3.33. Variance = 0.7/0.09 = 7.78. Std dev = √7.78 = 2.79.
Related calculators
- Exponential Distribution Calculator: the continuous analogue of the geometric distribution.
- Effect Size Calculator: measure the practical significance of a statistical result.
- Percent Error Calculator: compare a computed probability to a reference value.
- Measurement Uncertainty Calculator: quantify the range of possible values around repeated measurements.