Set n (number of trials) and p (success probability) with the sliders or the number boxes; the box reports E(X)=n×p with the success and failure rates. Learn more about the parameters
The panel on the right shows E(X) with its formula, examples in context, and Additional Statistics (variance, standard deviation, typical range) behind a toggle. Learn more about the panel
Click Compare with Different Values to set an alternative n and p and see the two expected values side by side. Learn more about comparing
Use the tabs E(X) Visualization, How E(X) is Calculated and Individual Contributions for a chart, the steps, or each count's share. Learn more about the tabs
The box under the calculator explains what E(X) means and why it equals n×p. Learn more about the box
Calculate the expected value (average number of successes) for a binomial distribution. Perfect for coin flips, quality control, success rates, or any scenario with repeated yes/no trials.
💡
Key Insight: E(X) = 5.00 means on average you get 5.00 successes out of 10 trials. This is your expected count of successes per experiment.
Parameters
Formula:E(X) = n × p
Success rate:50.0%
Failure rate:50.0%
Contribution to E(X)
k SuccessesProbabilityContribution
00.0009770.000000
10.0097660.009766
20.0439450.087891
30.1171880.351563
40.2050780.820313
50.2460941.230469
60.2050781.230469
70.1171880.820313
80.0439450.351563
90.0097660.087891
100.0009770.009766
E(X) =5.0000
Expected Value
E(X) = 5.0000
Formula: n × p = 10 × 0.5 = 5.00
Interpretation: On average, expect 5.00 successes out of 10 trials
📊E(X) in Context: Fair coin flips
Flipping 10 coins? Expect 5.0 heads on average
Repeat this 10-flip experiment 100 times? Expect total ≈ 500 heads
Each trial gives 5.0 ± 1.6 heads typically
Probability Distribution with E(X) = 5.00
Probability
E(X) = 5.00
0
1
0.044
2
0.117
3
0.205
4
0.246
5
0.205
6
0.117
7
0.044
8
9
10
Number of Successes
Understanding Expected Value for Binomial Distribution
What Does E(X) Mean? The expected value E(X) represents the average number of successes you would get if you repeated this n-trial experiment many times. It is the centre of the distribution and the most likely outcome range.
Interpreting Your Result. Expect E(X) successes per experiment on average; over many experiments, the successes average to E(X); this is your break-even point for planning or prediction.
Why E(X) = n × p. Each of the n trials contributes p successes on average. Since trials are independent, you simply add up these contributions: n × p. This is the fundamental property of linearity of expectation. Learn more about the binomial distribution
Use the calculator below to compute the expected value with step-by-step solutions and detailed explanations.
Setting n and p
Demop = 0.25, n = 20, n = 100, Reset
Step 0 of 4
Under Parameters, set n (Number of Trials) and p (Success Probability) with the sliders or by typing in the boxes; the slider for n runs from 1 to 100 and the one for p from 0 to 1 in steps of 0.01, while the boxes take any whole number n≥1 and any p from 0 to 1. A p typed above 1 or below 0 is clamped to that range, and a non-positive n is ignored. As soon as both are valid, the box reports the formula E(X)=n×p, the Success rate and the Failure rate as percentages, and the Key Insight line above the calculator restates E(X) as successes out of n trials.
For n=10 and p=0.25 the rates are 25.0% and 75.0% and E(X)=2.5000; for n=20 it is 5.0000. For n≤19 a Contribution to E(X) table lists every count k from 0 to n with its probability and its product k⋅P(X=k), ending in the sum; for larger n the table is left out, and above n=50 a note says that the individual probabilities are not shown while E(X) stays exact. If n is left blank, the right panel shows "Enter valid parameters: n > 0 and 0 ≤ p ≤ 1". There is no Calculate button; everything recomputes as you type.
Reset, at the top right of the parameter box, returns to 10 coin flips, n=10 and p=0.5, closes the comparison and the extra statistics, and selects the first tab. What the two numbers mean is explained in the binomial distribution.
Reading the Expected Value Panel
Demo100 items at 2%, the extra statistics, p = 0.5
Step 0 of 3
The right panel is built around one number: E(X) in large type, with the formula n×p filled in and an interpretation line giving the expected successes out of n trials. Below it, E(X) in Context turns the number into a scenario chosen from the parameters: p=0.5 with n≤20 reads "Fair coin flips", p≤0.1 reads "Rare events (quality control, defects)", p≥0.9 "High success rate", and anything else a general reading; each gives three lines such as the expected total over 100 repeats. Click ▶ Additional Statistics to open the variance np(1−p), the standard deviation and a Typical Range, E(X)±σ rounded to whole counts and kept between 0 and n.
For n=100 and p=0.02 the panel reads E(X)=2.0000 with the rare-events scenario, a variance of 1.9600, a standard deviation of 1.4000 and the typical range [1,3]; with p=0.5 and the same n it reads 50.0000, 25.0000, 5.0000 and [45,55]. The box under the calculator, Understanding Expected Value for Binomial Distribution, explains what E(X) means, gives three stock examples and shows why the formula is n×p; its link opens the first section below. The formula is worked through in formula and worked example.
Comparing Two Settings
Demo10 flips against 20 at 0.6, 20 at 0.2, 25 at 0.2
Step 0 of 3
Click ▶ Compare with Different Values under the parameter box to open an Alternative n and Alternative p. The panel then shows the current setting with its E(X), the alternative with its E(X), and the difference as a percentage of the current value, marked with an arrow as more or fewer successes expected. The alternative opens as n=20, p=0.6: against 10 coin flips that is E(X)=12.00, 140.0% more successes than 5.00. Change the alternative p to 0.2 and its E(X) becomes 4.00, 20.0% fewer; raise the alternative n to 25 and the two settings have the same expected value, 5, which the panel says in words.
The comparison uses only n×p, so very different settings can tie: 10 trials at 0.5 and 25 trials at 0.2 both expect 5 successes, but their variances, 2.5 and 4, differ. An alternative with p outside 0 to 1 shows nothing. Why the product alone fixes E(X) is explained in the binomial 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 count k with height P(X=k) and marks the expected value, so for 10 flips at 0.5 the bars peak at 5; above n=50 the chart gives way to a summary with the parameters, the possible counts and the typical range. How E(X) is Calculated writes the formula and three steps: identify n and p, apply n×p, and compute, for the coin flips 10×0.5=5.0000, followed by a sentence on why each trial adds p. Individual Contributions, shown only while the count table is shown (n≤19), draws each product k⋅P(X=k) as a bar, so the counts near the mean weigh most.
Use the calculation tab to check a homework answer, the visualization to see the bell-like shape, and the contributions to see which counts 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 Binomial Distribution
The binomial distribution counts the number of successes in n independent trials, where each trial succeeds with the same probability p. The number of heads in 10 coin tosses and the number of defective items in a batch of 50 are typical examples.
Its expected value has a simple meaning: each trial contributes p successes on average, and there are n trials. This works because the count of successes is the sum of nindicator variables, one per trial, each with expected value p.
Binomial models appear wherever a fixed number of independent yes-or-no trials is repeated. Quality control uses np to predict how many defective items a batch will contain. In medicine, it gives the expected number of patients who respond to a treatment with a known success rate. In marketing, it estimates how many of n contacted customers will buy.
The model requires the trials to be independent and p to stay the same. When items are drawn without replacement from a small population, the hypergeometric distribution fits better.