Geometric Distribution Calculator

Calculate geometric distribution probabilities with PMF, CDF, waiting time tables, distribution visualization, and summary statistics for trials until first success.

P(X = 6)
0.066980
6.6980%
Expected Value (Mean)
6.00
Average trials until success
Standard Deviation
5.4760
Variance = 29.9868
Median
4
50% chance by this trial
Mode
1
Most likely trial for first success
Skewness
2.0083
Always right-skewed

PMF Visualization

k=1k=20

Distribution Table

kP(X=k)P(Xโ‰คk)P(X>k)PMF Bar
10.1667000.1667000.833300
20.1389110.3056110.694389
30.1157550.4213660.578634
40.0964580.5178240.482176
50.0803790.5982030.401797
60.0669800.6651820.334818
70.0558140.7209960.279004
80.0465100.7675060.232494
90.0387570.8062630.193737
100.0322960.8385590.161441
110.0269120.8654710.134529
120.0224260.8878970.112103
130.0186880.9065850.093415
140.0155720.9221570.077843
150.0129760.9351330.064867
160.0108130.9459470.054053
170.0090110.9549570.045043
180.0075090.9624660.037534
190.0062570.9687230.031277
200.0052140.9739370.026063
210.0043450.9782820.021718
220.0036200.9819020.018098
230.0030170.9849190.015081
240.0025140.9874330.012567
250.0020950.9895280.010472
260.0017460.9912740.008726
270.0014550.9927280.007272
280.0012120.9939400.006060
290.0010100.9949510.005049
300.0008420.9957920.004208

Waiting Time: Trials Needed for Target Probability

Target ProbabilityTrials NeededInterpretation
50%450% chance of at least one success in 4 trials
90%1390% chance of at least one success in 13 trials
95%1795% chance of at least one success in 17 trials
99%2699% chance of at least one success in 26 trials
99.9%3899.9% chance of at least one success in 38 trials
Planning notes, formulas, and examples

About the Geometric Distribution Calculator

The geometric distribution models the number of independent trials needed to get the first success. If each trial has probability p of success, the geometric distribution tells you the probability that the first success occurs on trial k. It answers questions like: "How many times do I need to roll a die to get a 6?" or "How many customers will I call before making a sale?"

This calculator computes exact probabilities (P(X = k), P(X โ‰ค k), P(X โ‰ฅ k), or range probabilities), generates the complete distribution table with PMF, CDF, and survival function, and shows a visual PMF bar chart. The waiting time table reveals how many trials you need for 50%, 90%, 95%, 99%, and 99.9% confidence of success.

The geometric distribution is the discrete analog of the exponential distribution and the only discrete distribution with the memoryless property: knowing you've already failed k times doesn't change the probability of success on the next trial. It's fundamental in reliability engineering, quality control, telecommunications, and game design.

When This Page Helps

The geometric distribution appears everywhere: customer acquisition (calls until sale), reliability (usage cycles until failure), networking (packet retransmissions until success), genetics (offspring until desired genotype), and game design (attempts until rare drop). It gives exact probabilities without approximation.

The waiting time table is particularly practical: "How many trials do I need to be 95% confident of at least one success?" This directly translates to sample size planning, testing budgets, and resource allocation. The PMF visualization helps build intuition about why geometric distributions are so right-skewed.

How to Use the Inputs

  1. Enter the probability of success on each individual trial (p).
  2. Use presets for common scenarios: coin flip, dice roll, free throw, rare event.
  3. Select the probability type: exact, at most, at least, or range.
  4. Enter the number of trials (k) for the probability calculation.
  5. Review the computed probability, expected value, and distribution parameters.
  6. Examine the PMF visualization to see the shape of the distribution.
  7. Use the waiting time table to find how many trials guarantee a target confidence level.
Formula used
PMF: P(X = k) = (1 โˆ’ p)^(kโˆ’1) ร— p, for k = 1, 2, 3, ... CDF: P(X โ‰ค k) = 1 โˆ’ (1 โˆ’ p)^k Mean: E[X] = 1/p Variance: Var(X) = (1 โˆ’ p) / pยฒ Median: โŒˆโˆ’1 / logโ‚‚(1 โˆ’ p)โŒ‰ Mode: 1 (always) Skewness: (2 โˆ’ p) / โˆš(1 โˆ’ p)

Example Calculation

Result: P(X = 6) = 0.0670 (6.70%), Mean = 6.00 trials, Median = 4

For rolling a standard die (p = 1/6 โ‰ˆ 0.1667), the probability of getting the first 6 on exactly the 6th roll is about 6.7%. The expected number of rolls is exactly 6. However, the median is only 4 โ€” there's a 50% chance of getting a 6 within the first 4 rolls. The distribution is right-skewed: most successes come early, but occasionally you wait a long time.

Tips & Best Practices

  • The mean (1/p) is always larger than the median for geometric distributions โ€” the right tail pulls it up.
  • For 95% confidence of success, you need about 3/p trials (exact: โŒˆlog(0.05)/log(1โˆ’p)โŒ‰).
  • If p is very small, the geometric distribution approximates the exponential distribution.
  • The variance is (1โˆ’p)/pยฒ โ€” for rare events, the spread is enormous.
  • The memoryless property means past failures are irrelevant โ€” avoid the gambler's fallacy.
  • Sum of k geometric(p) random variables follows a negative binomial(k, p) distribution.

The Coupon Collector Connection

A classic application of the geometric distribution is the coupon collector's problem: how many items must you buy to collect all n distinct coupons? Each new coupon type becomes harder to find as you collect more. The wait for coupon i (when you have iโˆ’1) follows a geometric distribution with p = (nโˆ’i+1)/n. The total expected purchases are n ร— H(n), where H(n) is the harmonic number. For n=10, you'd expect about 29.3 purchases.

Reliability and Failure Time

In reliability engineering, the geometric distribution models the number of usage cycles until a component fails, when each cycle has independent failure probability p. The survival function P(X > k) = (1โˆ’p)^k gives the probability the component survives k cycles. The hazard rate (conditional probability of failure given survival to cycle k) is constant at p โ€” this is the discrete reliability equivalent of the exponential distribution.

Geometric Distribution in Computer Science

The geometric distribution underlies randomized algorithms: random probing in hash tables, randomized retry protocols (like Ethernet's binary exponential backoff), and probabilistic data structures. In skip lists, the height of each node follows a geometric distribution. In communication protocols, the number of retransmission attempts until successful delivery follows a geometric pattern.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • If you've rolled 10 dice without getting a 6, the probability of getting a 6 on the next roll is still 1/6 โ€” not higher. Past failures don't affect future probabilities. This is the memoryless property, unique to the geometric (discrete) and exponential (continuous) distributions. Many people incorrectly believe they're "due" for a success after many failures (the gambler's fallacy).