Geometric Distribution Calculator - First Success

Calculate geometric distribution probabilities for the number of trials until first success.

Results

Calculated
Result
—

What the geometric distribution describes

The geometric distribution models how many independent attempts you need until the first success, when every attempt has the same probability of success p. Rolling a die until a six appears, calling a sales lead until someone agrees to a demo, or testing manufactured parts until the first defect is found are all examples. The random variable X is the trial number on which the first success happens, so X can be 1, 2, 3 and so on with no upper limit.

Enter p as a decimal between 0 and 1 (for example 0.25 for 25%). The calculator returns the mean, variance, standard deviation, mode and median, and tables for the probability that the first success falls exactly on trial k and within the first k trials, for k from 1 to 6. It is a good fit when trials are independent and p does not change from one attempt to the next.

The formulas

For the version that counts trials up to and including the first success, the standard results are:

  • P(X = k) = (1 − p)k−1 × p, the chance that the first k − 1 trials fail and trial k succeeds.
  • P(X ≤ k) = 1 − (1 − p)k, the chance of at least one success within k trials.
  • Mean E[X] = 1 / p and Variance = (1 − p) / p², with the standard deviation as its square root.
  • Mode = 1, because the single most likely trial is always the first.
  • Median = ⌈ln(0.5) / ln(1 − p)⌉, the smallest k where P(X ≤ k) reaches 50%.

Worked example

Suppose each attempt succeeds with p = 0.25. The mean is 1 / 0.25 = 4 trials. The variance is 0.75 / 0.0625 = 12, so the standard deviation is √12 ≈ 3.4641. The median is ⌈ln 0.5 / ln 0.75⌉ = ⌈−0.6931 / −0.2877⌉ = ⌈2.409⌉ = 3.

For the table: P(X = 1) = 0.25, P(X = 2) = 0.75 × 0.25 = 0.1875, and P(X = 3) = 0.75² × 0.25 = 0.140625. The cumulative probability within 3 trials is 1 − 0.75³ = 1 − 0.421875 = 0.578125. The calculator prints exactly these values, and the mean of 4 is worth noting: even though the average wait is four trials, the most likely single outcome is success on the first.

Common mistakes and how to interpret the result

  • Mixing the two conventions. Some textbooks define the geometric variable as the number of failures before the first success, starting at 0. This calculator counts trials, starting at 1. The mean of the failures version is (1 − p)/p, one less than 1/p.
  • Reading the mean as a guarantee. An average of 4 trials does not mean success by trial 4. In the example above, P(X ≤ 4) is only about 0.68, and the distribution has a long right tail.
  • Assuming a changing probability. If success gets easier or harder over time, or you sample without replacement from a small population, the geometric model does not apply.
  • Entering a percentage. The input must be a decimal from above 0 up to 1. Entering 25 instead of 0.25 is rejected.

Frequently Asked Questions

What does the mean of a geometric distribution tell me?
It is the expected number of trials to get the first success, 1 divided by p. With p = 0.1 you expect about 10 trials on average, though the actual number varies widely from run to run.
Why is the mode always 1?
Because each later outcome requires all earlier trials to fail first, so probabilities decrease with k. Success on the first trial has the largest single probability, p.
Is the geometric distribution memoryless?
Yes. Given that you have already failed several times, the distribution of the remaining wait is the same as at the start. Past failures do not make a success more likely.
What if p equals 1?
Then success is certain on the first trial. The mean is 1, the variance is 0, and all probability sits on k = 1. The calculator accepts p up to and including 1.

Related calculators

Practical Guide for Geometric Distribution Calculator - First Success

Geometric Distribution Calculator - First Success is most useful when the inputs reflect the situation you are actually planning around, not a best-case estimate. Treat the result as a decision aid: it gives you a structured way to compare assumptions, spot outliers, and decide what to verify next. For Statistics work, the most important review lens is sample size, distribution assumptions, independence, uncertainty, and how the statistic will be interpreted.

Start with a baseline run using values you can defend. Then change one assumption at a time and watch which output moves the most. If one input dominates the result, spend your verification time there first. If several inputs have similar influence, use a conservative scenario and an optimistic scenario to create a practical range instead of relying on a single exact number.

Before acting on the result, verify the output with the raw data, summary statistics, and the assumptions behind the selected method. This is especially important when the calculator supports a purchase, project plan, performance target, or operational decision. The calculator can make the math consistent, but the quality of the conclusion still depends on current data, clear units, and assumptions that match your real constraints.

When the output looks surprising, slow down and inspect each input in order. A small change in one high-leverage field can move the final number more than several low-leverage fields combined. For Geometric Distribution Calculator - First Success, that means you should first confirm the value with the greatest scale, then confirm the value with the greatest uncertainty, then rerun the calculator with conservative and optimistic assumptions. This sequence turns the calculator from a single answer into a practical decision range.

Review Checklist

  • Confirm every input uses the unit and time period requested by the calculator.
  • Run a low, expected, and high scenario so the answer has a useful range.
  • Check whether rounding or a missing decimal place changes the decision.
  • Update the calculation whenever the sample, hypothesis, confidence level, or decision threshold changes.