Skip to content
Calcumatix

Geometric Distribution Calculator

Find P(X=k), P(X≤k), and the expected value for a geometric distribution. Enter the probability of success p and the trial number k to get all three results.

Result

0.128

With success probability 0.2, the first success occurs on trial 3 with probability 0.128

Quick Answer

A geometric distribution calculator computes P(X=k) = (1−p)^(k−1) × p, P(X≤k) = 1 − (1−p)^k, and the mean = 1/p. For a coin flip (p = 0.5) and k = 3: P(X=3) = (0.5)² × 0.5 = 0.125, meaning there is a 12.5% chance the first head occurs on exactly the third flip. P(X≤3) = 1 − (0.5)³ = 0.875. Mean = 1/0.5 = 2 flips expected.

What the Geometric Distribution Models in Practice

The geometric distribution models the number of trials needed to achieve the first success in a sequence of independent Bernoulli trials, where each trial has the same probability of success p. It answers the question: what is the probability that the first success occurs on exactly trial k? The distribution applies when each trial is binary (success or failure), independent of all other trials, and has a constant success probability.

Geometric Distribution Formulas: PMF, CDF, and Mean

PMF: P(X = k) = (1 − p)^(k − 1) × p CDF: P(X ≤ k) = 1 − (1 − p)^k Mean: E[X] = 1 / p

  • P(X = k) = (1 − p)^(k − 1) × p
  • P(X ≤ k) = 1 − (1 − p)^k
  • Mean (expected first-success trial) = 1 / p

Use the Geometric Distribution Calculator in 3 Steps

Inputs

  • p: the probability of success on a single trial; must be between 0 and 1, exclusive
  • k: the trial number at which you want to evaluate the distribution; must be a positive integer

Steps

  1. Enter p (the per-trial success probability) and k (the trial number of interest).
  2. Read P(X=k): the probability that the first success occurs on exactly trial k.
  3. Read P(X≤k): the cumulative probability that the first success occurs on or before trial k.
  4. Read the mean = 1/p for the expected number of trials.

Geometric Distribution Worked Example: Quality Control

A quality control inspector checking circuit boards with a 20% defect rate (p = 0.20) for the 4th inspection (k = 4).

  1. P(X = 4): (1 − 0.20)³ × 0.20 = (0.80)³ × 0.20 = 0.512 × 0.20 = 0.1024.
  2. P(X ≤ 4): 1 − (1 − 0.20)⁴ = 1 − 0.4096 = 0.5904.
  3. Mean: 1 / 0.20 = 5 inspections expected.

There is a 10.24% chance the first defective board is found on exactly the 4th inspection, and a 59.04% chance within the first 4 inspections. Mean = 5 inspections.

When the Geometric Distribution Applies and When It Fails

The geometric distribution applies when three conditions hold: trials are independent, each trial has exactly two outcomes, and the probability of success is constant across trials. If success probability changes between trials, use the hypergeometric distribution instead.

Assumptions

  • Trials are independent.
  • Each trial has exactly two outcomes (success or failure).
  • The success probability p is constant across all trials.
  • k is a positive integer (k ≥ 1).

Limitations

  • Does not handle varying success probabilities.
  • Does not compute probabilities for continuous-time waiting (use the exponential distribution).
  • Does not compute probabilities for a range of k-values in a single step.

In Practice

The geometric distribution is memoryless: the number of additional trials needed to achieve success does not depend on how many failures have already occurred. Formally, P(X > m + n | X > m) = P(X > n). This means if you have already failed 10 times, the probability of needing at least 5 more trials is the same as if you were starting fresh. Past failures provide no information about future success timing.

Related Guides

Frequently Asked Questions: Geometric Distribution Tool

What is the geometric distribution used for?

The geometric distribution models waiting time until the first success in a sequence of independent trials with constant success probability. Applications include defect detection, game simulations, network transmission retries, and any process where the question is how many attempts until the first success.

What is the difference between P(X=k) and P(X≤k)?

P(X=k) is the probability that the first success occurs on exactly trial k. P(X≤k) is the cumulative probability that the first success occurs on trial 1, 2, 3, ..., or k.

Why is the mean 1/p?

The mean of the geometric distribution is the expected number of trials until the first success. If success probability is p, then on average you need to try 1/p times. For p = 0.5, the mean is 2; for p = 0.1, the mean is 10.

What is the memoryless property of the geometric distribution?

The geometric distribution is the only discrete memoryless distribution. Memoryless means the number of additional trials needed for the first success is independent of how many failures have already occurred.

Can p be 0 or 1?

No. If p = 0, success is impossible. If p = 1, success occurs on the first trial with certainty. The calculator requires 0 < p < 1.

Sources

Last updated: . Reviewed for accuracy against the formula shown above.