Calculators King

Probability

Geometric Distribution Calculator

Find the probability that the first success arrives on trial k, using the trials-until-first-success definition and the mean 1/p.

Worksheet

Press Calculate to see the result.

Find the probability that the first success arrives on trial k, using the trials-until-first-success definition and the mean 1/p.

What this calculator answers

The geometric distribution on this page counts the trial number of the first success, including the successful trial. A first success on trial 1 means the opening trial worked. A first success on trial 3 means two failures and then a success. Some textbooks instead count only the failures before the first success, which shifts every formula by one. This page states the trials-until-first-success convention in the steps so the mean 1/p is not confused with (1 − p)/p.

The point probability is (1 − p) raised to k − 1, times p. The cumulative probability through trial k is 1 minus (1 − p) raised to k. The mean number of trials is 1/p, and the variance is (1 − p)/p squared. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Geometric distribution, trials until first success uses this relationship.

P(X = k) = (1 − p)^(k − 1) × p, mean = 1/p, for k = 1, 2, 3, ...

  • p. The probability of success on each independent trial.
  • k. The trial number on which the first success occurs.
  • k − 1. The failures that come before that success.
  • 1/p. The expected number of trials until the first success.

The first k − 1 trials must fail and the k-th must succeed, and independence multiplies those probabilities. There is only one such sequence, so no binomial coefficient appears. Summing the tail beyond k gives the compact cdf 1 − (1 − p)^k. The expectation of a positive integer-valued waiting time equals 1/p. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

This page counts trials until the first success, not failures only. The first success on trial 1 means k = 1. p is 0.2 and k is 3, so there are 2 failures before the success. P(X = 3) = (0.8)^2 × 0.2 = 0.128.

The cumulative probability P(X ≤ 3) = 1 − (0.8)^3 = 0.488. The mean number of trials is 1 / 0.2 = 5. The variance is (1 − p) / p^2 = 0.8 / 0.04 = 20.

The failures-only mean would be (1 − p) / p = 4, which is one less than 5. That is not the mean used here. k was required to be at least 1 because a trial number of 0 does not exist on this convention.

Figures from the worked example
P(X = k)0.128
P(X ≤ k)0.488
Mean 1/p5
Variance20

A second situation

A coin-flip success probability on the same trial

This page counts trials until the first success, not failures only. The first success on trial 1 means k = 1. p is 0.5 and k is 3, so there are 2 failures before the success. P(X = 3) = (0.5)^2 × 0.5 = 0.125.

The cumulative probability P(X ≤ 3) = 1 − (0.5)^3 = 0.875. The mean number of trials is 1 / 0.5 = 2. The variance is (1 − p) / p^2 = 0.5 / 0.25 = 2.

The failures-only mean would be (1 − p) / p = 1, which is one less than 2. That is not the mean used here. k was required to be at least 1 because a trial number of 0 does not exist on this convention.

Figures from the worked example
P(X = k)0.125
P(X ≤ k)0.875
Mean 1/p2
Variance2

Raising p from 0.2 to 0.5 makes an early success more likely and cuts the mean from 5 trials to 2. Trial k stays at 3, but the story of how surprising that wait is changes with p. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

The trial number of the first success moved from 3 to 6. The headline result went from 0.128 to 0.0655.

The nudged inputs

This page counts trials until the first success, not failures only. The first success on trial 1 means k = 1. p is 0.2 and k is 6, so there are 5 failures before the success. P(X = 6) = (0.8)^5 × 0.2 = 0.0655.

The cumulative probability P(X ≤ 6) = 1 − (0.8)^6 = 0.7379. The mean number of trials is 1 / 0.2 = 5. The variance is (1 − p) / p^2 = 0.8 / 0.04 = 20.

The failures-only mean would be (1 − p) / p = 4, which is one less than 5. That is not the mean used here. k was required to be at least 1 because a trial number of 0 does not exist on this convention.

Figures from the worked example
P(X = k)0.0655
P(X ≤ k)0.7379
Mean 1/p5
Variance20

How to read the result

Read k as a trial number starting at 1. Read the mean as an average wait measured in trials, not in failures. A mean of 5 with p = 0.2 says the long-run average first success lands on trial 5. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • Each trial is independent of the others.
  • The success probability stays constant.
  • You stop at the first success.
  • k counts trials, not failures. The smallest allowed k is 1.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Using (1 − p)^k × p, which is the failures-only convention and shifts k by one.
  • Reporting the mean as (1 − p)/p. That is the expected number of failures, not the expected trial number.
  • Allowing k = 0. There is no trial 0 on this convention.
  • Using a geometric model when you need r successes rather than the first one. That is the negative binomial page.

Where a different calculator is the honest choice

Use the negative binomial calculator for the number of failures before the r-th success. Use the binomial calculator when the number of trials is fixed in advance. Use the exponential calculator when the wait is continuous time rather than a count of trials. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Negative Binomial Distribution Calculator, Binomial Distribution Calculator, Poisson Distribution Calculator.

Check yourself

If p = 0.2, what is the probability that the first success occurs on trial 3, and what is the mean number of trials?

P(X = 3) = 0.8^2 × 0.2 = 0.128. The mean is 1/0.2 = 5 trials. This counts trials until the first success, not failures only.

Using the result in a sentence

Repeated inspections until the first pass, cold-call attempts until the first yes, and dice rolls until the first six are the usual stories. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

A success probability that changes as the trials go on, or a stop rule that is not the first success, breaks the formula. The numeric mean can also be a poor description when p is tiny and the right tail is enormous. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Geometric Distribution Calculator commit to?

This page uses Geometric distribution, trials until first success: P(X = k) = (1 − p)^(k − 1) × p, mean = 1/p, for k = 1, 2, 3, .... The first k − 1 trials must fail and the k-th must succeed, and independence multiplies those probabilities. There is only one such sequence, so no binomial coefficient appears. Summing the tail beyond k gives the compact cdf 1 − (1 − p)^k. The expectation of a positive integer-valued waiting time equals 1/p. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Success probability p, Trial k of the first success, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the p(x = k) is 0.128. Read k as a trial number starting at 1. Read the mean as an average wait measured in trials, not in failures. A mean of 5 with p = 0.2 says the long-run average first success lands on trial 5. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Using (1 − p)^k × p, which is the failures-only convention and shifts k by one. A success probability that changes as the trials go on, or a stop rule that is not the first success, breaks the formula. The numeric mean can also be a poor description when p is tiny and the right tail is enormous. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the negative binomial calculator for the number of failures before the r-th success. Use the binomial calculator when the number of trials is fixed in advance. Use the exponential calculator when the wait is continuous time rather than a count of trials. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

P(X = 3) = 0.8^2 × 0.2 = 0.128. The mean is 1/0.2 = 5 trials. This counts trials until the first success, not failures only. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.