standarddeviationcalculator.net SD Calculator

Geometric distribution calculator

Share this page

Favorites

    No favorites yet. Press Favorite on any page to keep it here.

    Methodology

    Enter the probability of success on each trial and pick whether X counts trials up to the first success or failures before it. The calculator gives P(X = k), P(X ≤ k), P(X ≥ k) or a range, with the working and a chart.

    On each trial, between 0 and 1.

    P(X = 3) 0.128
    P(X ≤ k)0.488
    P(X ≥ k)0.64
    P(X < k)0.36
    P(X > k)0.512
    Mean5
    Variance20
    Standard deviation4.47214
    Median4
    Mode1
    Mean formula1 / p
    00.050.10.150.2 147101316192225283134

    Each bar is P(X = k). Solid bars are the values included in the answer.

    Probability table
    Values 1 to 35 (the rest carry almost no probability)
    kP(X = k)P(X ≤ k)P(X ≥ k)
    10.20.21
    20.160.360.8
    30.1280.4880.64
    40.10240.59040.512
    50.081920.672320.4096
    60.0655360.7378560.32768
    70.05242880.7902850.262144
    80.0419430.8322280.209715
    90.03355440.8657820.167772
    100.02684350.8926260.134218
    110.02147480.9141010.107374
    120.01717990.9312810.0858993
    130.01374390.9450240.0687195
    140.01099510.956020.0549756
    150.008796090.9648160.0439805
    160.007036870.9718530.0351844
    170.00562950.9774820.0281475
    180.00450360.9819860.022518
    190.003602880.9855880.0180144
    200.00288230.9884710.0144115
    210.002305840.9907770.0115292
    220.001844670.9926210.00922337
    230.001475740.9940970.0073787
    240.001180590.9952780.00590296
    250.0009444730.9962220.00472237
    260.0007555790.9969780.00377789
    270.0006044630.9975820.00302231
    280.000483570.9980660.00241785
    290.0003868560.9984530.00193428
    300.0003094850.9987620.00154743
    310.0002475880.999010.00123794
    320.000198070.9992080.000990352
    330.0001584560.9993660.000792282
    340.0001267650.9994930.000633825
    350.0001014120.9995940.00050706
    Show the working, step by step
    1. The cumulative probability has a closed form, because “at most k” is the complement of “the first k all fail”:

      P(X ≤ k) = 1 − (1 − p)k

    2. Probability of exactly k:

      P(X = k) = (1 − p)k−1 p P(X = 3) = 0.82 × 0.2 = 0.64 × 0.2 = 0.128

    Geometric distribution formulas

    X = number of trials up to and including the first success (k = 1, 2, 3, …):

    P(X = k) = (1 − p)k−1 p P(X ≤ k) = 1 − (1 − p)k mean = 1/p variance = (1 − p)/p²

    Y = number of failures before the first success (k = 0, 1, 2, …):

    P(Y = k) = (1 − p)k p P(Y ≤ k) = 1 − (1 − p)k+1 mean = (1 − p)/p variance = (1 − p)/p²

    Geometric distribution: worked example

    A salesperson closes 20% of calls, independently. What is the probability that the first sale comes on the third call?

    P(X = 3) = 0.8² × 0.2 = 0.64 × 0.2 = 0.128

    Two failures then a success. 12.8%. The chance of a sale within the first three calls is 1 − 0.8³ = 0.488, and the chance of needing three or more calls is P(X ≥ 3) = 0.8² = 0.64. On average the first sale takes 1/0.2 = 5 calls, with a standard deviation of √20 = 4.47214. The median is 4 calls, since P(X ≤ 3) = 0.488 falls just short of one half and P(X ≤ 4) = 0.5904 passes it. The mode is always 1. A success on the very first trial is the single most likely outcome.

    In the failures convention the same event is “2 failures before the first sale”, so P(Y = 2) = 0.8² × 0.2 = 0.128, the same number with k shifted down by one. The mean becomes 0.8/0.2 = 4 failures.

    Reading the result

    The bars fall by the same factor, 1 − p, from each k to the next, so the chart always decays geometrically, which is where the name comes from. Solid bars mark the values included in the probability you asked for. Open the probability table for P(X = k), P(X ≤ k) and P(X ≥ k) at every value in the bulk of the distribution.

    Common mistakes

    • Mixing conventions. An answer that is off by one trial almost always comes from this.
    • Using the binomial formula. The binomial fixes the number of trials. The geometric fixes the number of successes (one) and lets the trials vary.
    • Adding the terms one by one for P(X ≤ k). The closed form 1 − (1 − p)k is exact and quicker.
    • Forgetting independence. If each failure changes the next chance (learning, fatigue), the geometric does not apply.
    Geometric distribution calculator: the worked example on this page, with its result and chart
    Geometric distribution calculator: the worked example above, at a glance.

    Common questions

    Which geometric distribution convention should I use?

    Check what your textbook or software counts. Most introductory statistics courses and the TI-84 (geometpdf) count trials up to and including the first success, so X starts at 1. R's dgeom, SciPy's nbinom and many probability texts count failures before the first success, so X starts at 0. The two differ by exactly 1, Xtrials = Xfailures + 1.

    What is the mean of a geometric distribution?

    1/p trials, or (1 − p)/p failures. With p = 0.2 you need 5 trials on average, 4 of them failures. The variance is (1 − p)/p² = 20 in both conventions, because shifting by 1 does not change the spread.

    How do I find the probability of success within k trials?

    P(X ≤ k) = 1 − (1 − p)k. The only way not to have succeeded by trial k is to fail k times in a row. With p = 0.2 and k = 3, that is 1 − 0.8³ = 1 − 0.512 = 0.488.

    Is the geometric distribution memoryless?

    Yes, it is the only discrete distribution that is. After any number of failures, the chance of needing more than j further trials is still (1 − p)j. A slot machine that has not paid out for 50 spins is no more “due” than on the first spin, if the spins are independent.