Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Geometric Expected Value Calculator

How to use Geometric Expected Value Calculator
  1. Set p (success probability) with the slider or the number box; the box reports E(X)=1/pE(X) = 1 / p with the success and failure rates. Learn more about the parameter
  2. Pick how many trials to list under Display outcomes; the line under it says what share of the probability they cover. Learn more about the outcome list
  3. If the box is emptied the results wait; click Reset to return to p=0.2p = 0.2. Learn more about messages and Reset
  4. The panel on the right shows E(X)E(X) with its formula, examples in context, and Additional Statistics (variance, standard deviation, median) behind a toggle. Learn more about the panel
  5. Click Compare with Different Success Rate to set an alternative pp and see the two expected waits side by side. Learn more about comparing
  6. Use the tabs E(X) Visualization, How E(X) is Calculated and Individual Contributions for a chart, the steps, or each trial number's share; the box under the calculator explains the formula. Learn more about the tabs


Expected Value Calculators

Expected Value Calculator - Geometric Distribution

Calculate the expected value (average number of trials until first success) for a geometric distribution. Perfect for modeling attempts until success: coin flips, sales calls, quality tests, or any 'try until you succeed' scenario.

💡
Key Insight: E(X) = 5.00 means on average you need 5.00 trials to get your first success. This is how many attempts you should expect before succeeding.

Parameter

Formula:E(X) = 1 / p
Success rate:20.0%
Failure rate:80.0%
Showing 20 outcomes (≈98.8% of distribution)

Contribution to E(X)

Trial kProbabilityContribution
10.2000000.200000
20.1600000.320000
30.1280000.384000
40.1024000.409600
50.0819200.409600
60.0655360.393216
70.0524290.367002
80.0419430.335544
90.0335540.301990
100.0268440.268435
110.0214750.236223
120.0171800.206158
130.0137440.178671
140.0109950.153932
150.0087960.131941
160.0070370.112590
170.0056290.095701
180.0045040.081065
190.0036030.068455
200.0028820.057646
E(X) ≈4.7118
Expected Value (Trials Until First Success)
E(X) = 5.0000
Formula: 1 / p = 1 / 0.2 = 5.00
Interpretation: On average, you need 5.00 attempts to get your first success
📊E(X) in Context: Moderate success rate
  • 20% success rate? Expect 5.0 attempts until first success
  • 100 experiments? Expect total ≈ 500 attempts
  • Typical range: 1 to 9 attempts
Probability Distribution with E(X) = 5.00
Probability
E(X) = 5.00
0.200
1
0.160
2
0.128
3
0.102
4
0.082
5
0.066
6
0.052
7
0.042
8
0.034
9
0.027
10
0.021
11
0.017
12
0.014
13
0.011
14
15
16
17
18
19
20
Number of Trials

Understanding Expected Value for Geometric Distribution

What Does E(X) Mean? The expected value E(X) represents the average number of trials you need until you get your first success. It is how many attempts you should expect before achieving success when each trial is independent.

Interpreting Your Result. Expect E(X) trials until the first success on average; half the time you will succeed within the median number of trials, which is smaller; each trial has the same probability, so past failures do not affect future chances.

Real-World Examples. Coin flips (p = 0.5): E(X) = 2 flips until heads. Sales calls (p = 0.1): E(X) = 10 calls until the first sale. Quality test (p = 0.02): E(X) = 50 items until the first defect.

Why E(X) = 1 / p. The geometric distribution is memoryless: each trial is independent with success probability p. The expected waiting time is simply the reciprocal: if you have a 20% chance each trial (p = 0.2), you expect to wait 1/0.2 = 5 trials on average. Learn more about the geometric distribution




Calculate Expected Value

Use the calculator below to compute the expected value with step-by-step solutions and detailed explanations.



Setting p and the Outcome List

Demop = 0.5, p = 0.05, fifty outcomes, Reset
Step 0 of 4
Under Parameter, set p (Success Probability) with the slider, which runs from 0.010.01 to 11 in steps of 0.010.01, or by typing in the box; a typed value is kept between 0.00010.0001 and 11, so p=0p = 0 cannot be entered. As soon as pp is valid, the box reports the formula E(X)=1/pE(X) = 1 / p and the Success rate and Failure rate as percentages, and the Key Insight line above the calculator restates E(X)E(X) as the trials needed for the first success. For p=0.5p = 0.5 the rates are 50.0%50.0\% and 50.0%50.0\% and E(X)=2.0000E(X) = 2.0000; for p=0.05p = 0.05 they are 5.0%5.0\% and 95.0%95.0\% and E(X)=20.0000E(X) = 20.0000.

Because the trial count has no upper limit, the calculator lists only the first outcomes. Display outcomes chooses 1010, 2020, 3030 or 5050 of them, and the line under it says how many are shown and what share of the probability they cover: for p=0.05p = 0.05 the first 2020 trials cover about 64.2%64.2\% and the first 5050 about 92.3%92.3\%; the list also stops early once 99.9%99.9\% is reached, so for p=0.5p = 0.5 only 1010 outcomes appear. While at most 2020 outcomes are shown, a Contribution to E(X) table lists each trial number kk with P(X=k)P(X = k) and the product k⋅P(X=k)k \cdot P(X = k), ending in their sum, which approaches E(X)E(X) from below. If the box is emptied, the right panel shows "Enter valid parameter: 0 < p ≤ 1". There is no Calculate button.

Reset, at the top right of the parameter box, returns to p=0.2p = 0.2 with 2020 outcomes, closes the comparison and the extra statistics, and selects the first tab. What pp and the trial count mean is explained in the geometric distribution.

Reading the Expected Value Panel

Demop = 0.05, the extra statistics, p = 0.5
Step 0 of 3
The right panel is built around one number: E(X), the expected number of trials until the first success, in large type, with the formula 1/p1 / p filled in and an interpretation line. Below it, E(X) in Context turns the number into a scenario chosen from pp: 0.50.5 reads "Fair coin", p≤0.1p \le 0.1 "Rare success (difficult task)", p≥0.8p \ge 0.8 "High success rate (easy task)", and anything else "Moderate success rate"; each gives three lines, such as the expected total over 100100 repeats or a typical range of attempts. Click ▶ Additional Statistics to open the variance (1−p)/p2(1 - p) / p^2, the standard deviation and the Median, the number of trials within which the first success comes half of the time.

For p=0.05p = 0.05 the panel reads E(X)=20.0000E(X) = 20.0000 with the rare-success scenario, a variance of 380.0000380.0000, a standard deviation of 19.493619.4936 and a median of 1414 trials; for p=0.5p = 0.5 it reads 2.00002.0000, 2.00002.0000, 1.41421.4142 and a median of 11 trial. The median is well below the mean because a few very long waits pull the mean up. The box under the calculator, Understanding Expected Value for Geometric Distribution, explains what E(X)E(X) means, gives three stock examples and shows why the formula is 1/p1 / p; its link opens the first section below. The formula is worked through in formula and worked example.

Comparing Two Success Rates

Demop = 0.2 against 0.5, 0.1 and 0.2
Step 0 of 3
Click ▶ Compare with Different Success Rate under the parameter box to open an Alternative p. The panel then shows the current pp with its E(X)E(X) in trials, the alternative pp with its E(X)E(X), and the difference as a percentage of the current value, marked with an arrow as more or fewer trials needed. The alternative opens as p=0.5p = 0.5: against p=0.2p = 0.2 that is E(X)=2.00E(X) = 2.00 trials, 60.0%60.0\% fewer than 5.005.00. Change the alternative to 0.10.1 and its E(X)E(X) becomes 10.0010.00, 100.0%100.0\% more; set it to 0.20.2 and the panel says the two have the same expected value.

The comparison shows the reciprocal rule at work: halving pp doubles the expected wait, and doubling it halves the wait. An alternative typed as 00 or above 11 shows nothing. Why the wait is exactly 1/p1 / p is explained in the geometric distribution.

The Three Tabs

DemoCalculation, contributions, visualization
Step 0 of 3
Under the statistics are three tabs; they change what is drawn, not the numbers. E(X) Visualization (the default) draws one bar per listed trial number kk with height P(X=k)P(X = k), falling by the factor 1−p1 - p from one bar to the next, and marks the expected value; for p=0.2p = 0.2 the first bar is 0.20.2 and the mark sits at 55. How E(X) is Calculated writes the formula and three steps: identify pp, apply 1/p1 / p, and compute, for p=0.2p = 0.2 giving 5.00005.0000 trials, followed by a sentence on the memoryless property. Individual Contributions, shown only while at most 2020 outcomes are listed, draws each product k⋅P(X=k)k \cdot P(X = k) as a bar; the bars first rise and then fade, so the middle trial numbers carry most of the mean.

Use the calculation tab to check a homework answer, the visualization to see the falling shape, and the contributions to see which trial numbers carry the mean. Reset returns to the visualization tab. The steps of the calculation tab are the ones written out in formula and worked example.

The Geometric Distribution

The geometric distribution counts the number of independent trials needed to get the first success, where each trial succeeds with probability pp. Here XX includes the successful trial, so its possible values are 1,2,3,…1, 2, 3, \ldots

The expected value answers the question "how long do I wait on average?" The smaller the success probability, the longer the expected wait. The distribution is memoryless: after any number of failures, the expected number of further trials is the same as at the start.

The experiment is set out in the probabilistic experiment behind the geometric distribution, its single number in parameters, and the probabilities P(X=k)=(1−p)k−1pP(X = k) = (1 - p)^{k - 1} p in probability mass function and support.

Formula and Worked Example

When XX counts the trials up to and including the first success:

E[X]=1pE[X] = \frac{1}{p}


Example: rolling a die until the first 66 appears, with p=16p = \frac{1}{6}:

E[X]=11/6=6E[X] = \frac{1}{1/6} = 6


It takes 66 rolls on average. Some books count only the failures before the first success; that version has expected value 1−pp\frac{1 - p}{p}, which is 55 for the die. Both describe the same experiment.

The mean is derived in expected value (mean), the variance 1−pp2\frac{1 - p}{p^2} in variance and standard deviation, and the median the calculator reports in mode and median.

Where This Is Used

Geometric models describe waiting for a first success: the number of sales calls until the first sale, the number of attempts to pass a test, or the number of products tested until the first defective one.

With a success rate of p=0.05p = 0.05, the expected number of attempts is 10.05=20\frac{1}{0.05} = 20. This helps with planning: it sets how many attempts to budget for on average, although any single run can take much longer.

More settings are listed in applications and examples; waiting for the rr-th success instead of the first is the probabilistic experiment behind the negative binomial distribution.