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.

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.

Related Tools and Concepts

This weighted visualization connects to other probability concepts and tools:

Theory Pages:

Expected Value covers complete theory and formulas

Variance measures spread around E[X]

Random Variables explains discrete and continuous types

Probability Distributions covers common distributions

Other Visualizations:

Discrete Expected Value lets you adjust individual probabilities

Variance Visualizer shows spread around the mean

Distribution Visualizers display PMFs and CDFs

Calculators:

Expected Value Calculators compute E[X] for various inputs

Discrete Distribution Calculators include expected value calculations