Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Weighted Expected Value Visualization



Higher probabilities "pull" the expected value toward them. Watch how E(X) differs from the simple average when probabilities are unequal.

1P=0.171×0.17=0.172P=0.172×0.17=0.333P=0.173×0.17=0.504P=0.174×0.17=0.675P=0.175×0.17=0.836P=0.176×0.17=1.00E(X) = 3.50Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)

Calculation

Expected Value (Weighted):
1 × 0.17 = 0.17
2 × 0.17 = 0.33
3 × 0.17 = 0.50
4 × 0.17 = 0.67
5 × 0.17 = 0.83
6 × 0.17 = 1.00
E(X) = 3.500
Simple Average (Unweighted):
(1 + 2 + 3 + 4 + 5 + 6) / 6
Avg = 3.500

Notice: When probabilities are equal, E(X) = Avg. When probabilities differ, E(X) is pulled toward the high-probability values.

Understanding Weighted Average

  • Blue circles contain P(X = x) - the probability of each outcome. Circle size also shows probability
  • Arrow thickness/length shows "pull strength" - how much that outcome pulls E(X) toward it
  • Red line (E(X)) is the weighted average - pulled toward high-probability outcomes
  • Gray dashed line is the simple average (unweighted) - treats all outcomes equally
Key Insight:

When probabilities are equal, E(X) = simple average. When probabilities differ, E(X) is pulled toward high-probability outcomes. This is why it is called a weighted average!





Visualizing Expected Value as Weighted Average

This tool shows expected value as a probability-weighted average using visual "weights" that pull E[X] along a number line. Larger probabilities create larger weights with stronger pull. Compare E[X] to the simple average and see how unequal probabilities shift the expected value toward high-probability outcomes.



Getting Started with the Weighted Visualizer

This tool demonstrates expected value as a probability-weighted average using a physical "pulling weights" metaphor. Values 1 through 6 appear on a number line, with blue circles above each value representing probability weights.

The visualization shows two key quantities: the expected value E(X) marked by a solid blue line, and the simple average marked by a dashed gray line. When probabilities are equal, these coincide. When probabilities differ, E(X) shifts toward high-probability values.

Select different distributions from the dropdown to see how probability patterns affect E(X). The Play Animation button cycles through all distributions automatically, showing the dynamic relationship between probability weights and expected value.

Understanding the Probability Weights

Each blue circle contains P(X = x), the probability of that outcome. Circle size scales with probability—larger circles indicate more likely outcomes. This visual sizing reinforces that higher probabilities carry more "weight" in the expected value calculation.

The arrows connecting circles to the number line represent the "pull" each outcome exerts on E(X). Arrow thickness and length increase with probability. Think of expected value as a balance point: each weight pulls the balance toward its position, and E(X) settles where forces equilibrate.

The formula shows explicitly how each outcome contributes:

E[X]=i=16xiP(X=xi)E[X] = \sum_{i=1}^{6} x_i \cdot P(X = x_i)


Below each value, the contribution x × P(x) appears, showing the exact amount that outcome adds to the expected value sum.

Using the Distribution Selector

Seven preset distributions demonstrate different probability patterns:

Equal Weights sets all probabilities to 1/6, like a fair die. E(X) equals the simple average (3.5).

Pull Right concentrates probability on higher values (5 and 6). E(X) shifts rightward above 3.5.

Pull Left concentrates probability on lower values (1 and 2). E(X) shifts leftward below 3.5.

Pull Center peaks at middle values (3 and 4). E(X) stays near 3.5 but with lower variance than equal weights.

Pull Extremes weights the endpoints (1 and 6). E(X) remains near 3.5 but variance is high.

Strong Right Bias and Strong Left Bias create extreme skew, pushing E(X) far from center.

Select each distribution and observe how probability mass shifts the expected value line.

Equal Weights: E(X) Is the Simple Average

The preset the tool opens with gives all six outcomes probability 1/61/6 — a fair die. Every weight circle is the same size, every arrow pulls with the same force, and the two markers land on top of each other at 3.53.5.

This is the one case where the weighted and unweighted answers agree, and it is worth seeing first so the later presets have something to differ from.
1P=0.171×0.17=0.172P=0.172×0.17=0.333P=0.173×0.17=0.504P=0.174×0.17=0.675P=0.175×0.17=0.836P=0.176×0.17=1.00E(X) = 3.50Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Equal Weights preset

All six outcomes at 1/6. The E(X) marker and the simple-average marker land together at 3.5 - the only preset where they agree. The circles read P=0.17 because the tool rounds to 2dp.

The circles read P=0.17P=0.17 six times, because the tool prints probabilities to two decimals. Six copies of 0.170.17 sum to 1.021.02, not 11 — the underlying values are 1/6=0.161/6 = 0.1\overline{6} and it is only the display that rounds. Worth noticing, since it is the kind of rounding artefact that makes a correct calculation look wrong.

The simple average is 3.53.5 for every preset on this page, because all seven use the same six values 11 through 66 and the simple average ignores probability entirely. Only the blue E(X)E(X) marker moves.

Pull Right: Weight Toward the High Values

Probabilities rise across the outcomes — 0.05,0.05,0.1,0.15,0.25,0.40.05, 0.05, 0.1, 0.15, 0.25, 0.4 — so the circles grow from left to right and the largest sits over 66.

E(X)=4.70E(X) = 4.70, well to the right of the simple average 3.53.5. The blue marker has been pulled toward the heavy end.
1P=0.051×0.05=0.052P=0.052×0.05=0.103P=0.103×0.10=0.304P=0.154×0.15=0.605P=0.255×0.25=1.256P=0.406×0.40=2.40E(X) = 4.70Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Pull Right preset

Probabilities rise to 0.4 at the outcome 6, and E(X) = 4.70 against a simple average of 3.5. The single contribution 6 x 0.40 = 2.40 is more than half of E(X).

Reading the contributions along the axis makes the arithmetic visible: 6×0.40=2.406 \times 0.40 = 2.40 on its own is more than half of E(X)E(X), while 1×0.05=0.051 \times 0.05 = 0.05 contributes almost nothing.

That asymmetry is the whole idea of a weighted average. An outcome influences E(X)E(X) through the *product* of its value and its probability, so a large value with a small probability and a small value with a large probability can matter equally.

Pull Left: the Mirror Image

This preset is Pull Right reversed — 0.4,0.25,0.15,0.1,0.05,0.050.4, 0.25, 0.15, 0.1, 0.05, 0.05 — so the heavy circles sit over the low values.

E(X)=2.30E(X) = 2.30, exactly as far below 3.53.5 as Pull Right was above it.
1P=0.401×0.40=0.402P=0.252×0.25=0.503P=0.153×0.15=0.454P=0.104×0.10=0.405P=0.055×0.05=0.256P=0.056×0.05=0.30E(X) = 2.30Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Pull Left preset

The mirror image: E(X) = 2.30, exactly as far below 3.5 as Pull Right sat above it. Reversing the probabilities reflects the distribution about 3.5.

The symmetry is not a coincidence. Reversing the probabilities on the values 1..61..6 reflects the distribution about 3.53.5, and reflection about a point maps the mean to its mirror image: 3.51.2=2.33.5 - 1.2 = 2.3 where the other gave 3.5+1.2=4.73.5 + 1.2 = 4.7.

Switching between these two presets is the fastest way to see that E(X)E(X) is a genuine balance point rather than a summary of which values are *possible* — the possible values never changed.

Pull Center: Same E(X), Different Distribution

Here the probabilities concentrate in the middle — 0.05,0.15,0.3,0.3,0.15,0.050.05, 0.15, 0.3, 0.3, 0.15, 0.05 — and the two large circles sit over 33 and 44.

E(X)=3.50E(X) = 3.50. The blue marker sits exactly on the grey one again, just as it did for equal weights.
1P=0.051×0.05=0.052P=0.152×0.15=0.303P=0.303×0.30=0.904P=0.304×0.30=1.205P=0.155×0.15=0.756P=0.056×0.05=0.30E(X) = 3.50Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Pull Center preset

Probability concentrated on 3 and 4, and E(X) = 3.50 - identical to Equal Weights despite a visibly different shape. Both are symmetric about 3.5.

This is the most important comparison on the page, and it takes two frozen states side by side to see it. Equal Weights and Pull Center are visibly different distributions — one flat, one peaked — yet they have identical expected values.

The reason is symmetry: both are symmetric about 3.53.5, and any distribution symmetric about a point has its mean at that point. So E(X)E(X) does not determine a distribution. It is one number summarising it, and distributions that agree on that number can disagree about everything else — which is exactly why variance exists as a second question to ask.

Pull Extremes: Same E(X) Again, from the Opposite Shape

Probability piles up at both ends — 0.3,0.1,0.1,0.1,0.1,0.30.3, 0.1, 0.1, 0.1, 0.1, 0.3 — giving two large circles over 11 and 66 and a flat trough between them.

E(X)=3.50E(X) = 3.50 once more, a third distribution sharing the value of equal weights and pull center.
1P=0.301×0.30=0.302P=0.102×0.10=0.203P=0.103×0.10=0.304P=0.104×0.10=0.405P=0.105×0.10=0.506P=0.306×0.30=1.80E(X) = 3.50Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Pull Extremes preset

Weight piled at both ends, and E(X) = 3.50 again. The expected value is not a possible outcome here, and the values nearest it are the least likely.

Three presets, three quite different shapes, one expected value. Pull Center clusters near the middle, Pull Extremes avoids it entirely, and Equal Weights is flat — and all three balance at 3.53.5.

Pull Extremes also makes the point that E(X)E(X) need not be a likely outcome. The expected value here is 3.53.5, which is not even one of the six possible values, and the outcomes closest to it are the *least* likely in the whole distribution. "Expected" is a name for the balance point, not a prediction.

Strong Right Bias: the Largest Pull

With 0.02,0.03,0.05,0.1,0.2,0.60.02, 0.03, 0.05, 0.1, 0.2, 0.6 the outcome 66 alone carries 60%60\% of the probability, and its circle is drawn at the maximum size with the thickest arrow.

E(X)=5.23E(X) = 5.23, the highest value any preset on this page reaches.
1P=0.021×0.02=0.022P=0.032×0.03=0.063P=0.053×0.05=0.154P=0.104×0.10=0.405P=0.205×0.20=1.006P=0.606×0.60=3.60E(X) = 5.23Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Strong Right Bias preset

60% of the probability on the outcome 6, giving the largest E(X) on the page at 5.23 - still well short of 6, because E(X) moves toward the weight but never past it.

The single contribution 6×0.6=3.66 \times 0.6 = 3.6 already exceeds the simple average of 3.53.5 by itself, before any of the other five outcomes are added.

Notice how far E(X)E(X) still is from 66, though. Even at 60%60\% the heavy outcome cannot drag the mean all the way to itself, because the remaining 40%40\% is spread across values well below it. E(X)E(X) moves toward the weight, never past it: it is always between the smallest and largest possible values.

Strong Left Bias: the Mirror of the Largest Pull

The reverse of the previous preset — 0.6,0.2,0.1,0.05,0.03,0.020.6, 0.2, 0.1, 0.05, 0.03, 0.02 — with 60%60\% of the probability on the outcome 11.

E(X)=1.77E(X) = 1.77, mirroring 5.235.23 about the simple average of 3.53.5.
1P=0.601×0.60=0.602P=0.202×0.20=0.403P=0.103×0.10=0.304P=0.054×0.05=0.205P=0.035×0.03=0.156P=0.026×0.02=0.12E(X) = 1.77Avg = 3.50Probability "Weights" Pull the Expected ValueBlue numbers show each contribution: x × P(x) = contribution to E(X)P(X = x) in circlePull strength (arrow)Expected Value E(X)Simple Average (unweighted)
Strong Left Bias preset

The mirror of the previous preset: E(X) = 1.77. Across all seven presets E(X) runs from 1.77 to 5.23 while the simple average never moves off 3.5.

Across all seven presets E(X)E(X) ranges from 1.771.77 to 5.235.23 while the simple average never moves off 3.53.5. Laid out in order, the seven values are 1.77,2.30,3.50,3.50,3.50,4.70,5.231.77, 2.30, 3.50, 3.50, 3.50, 4.70, 5.23 — and the three that coincide are the ones discussed under pull center.

The bounds are worth stating in general. E(X)E(X) can never leave the interval [1,6][1, 6] of possible values, and it reaches an endpoint only when that outcome has probability 11. Everything the seven presets do happens strictly inside that range.

Animation Mode

Click the Play Animation button to cycle through all distributions automatically. The animation switches distributions every 2 seconds, showing E(X) moving dynamically as probability weights redistribute.

Watch how:

• The blue circles resize as probabilities change
• Arrow thicknesses adjust to show new pull strengths
• The E(X) line slides left or right
• The simple average line stays fixed (same values, just different probabilities)

Animation helps build intuition for the weighted average concept. Notice that extreme distributions (Strong Left/Right Bias) produce the largest E(X) shifts, while centered distributions keep E(X) near 3.5.

Click Pause to stop on any distribution for closer examination. The currently displayed distribution name appears in the dropdown selector.

The Calculation Panel

The right side panel shows explicit calculations for both expected value and simple average:

Expected Value (Weighted) displays each term x × P(x) and their sum. For example, with Pull Right distribution:
• 1 × 0.05 = 0.05
• 2 × 0.05 = 0.10
• 3 × 0.10 = 0.30
• 4 × 0.15 = 0.60
• 5 × 0.25 = 1.25
• 6 × 0.40 = 2.40
• E(X) = 4.70

Simple Average (Unweighted) shows (1 + 2 + 3 + 4 + 5 + 6) / 6 = 3.5, which never changes regardless of probability distribution.

The comparison makes clear that E(X) shifts based on probability weights while simple average ignores them entirely.

When E(X) Equals Simple Average

Select Equal Weights to see E(X) = 3.5, matching the simple average exactly. This occurs because every outcome has probability 1/6:

E[X]=116+216+316+416+516+616E[X] = 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6}


=16(1+2+3+4+5+6)=216=3.5= \frac{1}{6}(1 + 2 + 3 + 4 + 5 + 6) = \frac{21}{6} = 3.5


When probabilities are equal, the weighted average formula simplifies to the simple average. This is why fair dice, fair coins, and equally-likely outcomes produce expected values that equal arithmetic means.

Any deviation from equal probabilities causes E(X) to diverge from the simple average, pulled toward the high-probability outcomes.

Key Insight: Weighted Average Concept

The fundamental lesson from this visualization: expected value is a weighted average where weights are probabilities.

In a simple average, each value contributes equally: contribution = value / count.

In expected value, each value contributes proportionally to its probability: contribution = value × probability.

This distinction matters in every real application:

• A biased die produces different E(X) than a fair die with the same faces
• Investment returns weighted by probability differ from historical averages
• Insurance claims weighted by likelihood differ from simple claim averages

The pulling weights metaphor makes this concrete: more probable outcomes literally pull harder on the expected value, shifting it toward them.