Expected Value and Variance
So far, we have learned how to describe random variables and their probability distributions.
Now we answer two very important questions:
- What value do we expect on average?
- How much do values spread around that average?
These questions are answered using Expected Value and Variance.
Why Expected Value and Variance Are Important
In real life, we rarely care about one outcome.
We care about:
- Long-term average results
- Risk and uncertainty
- Stability vs volatility
Expected value and variance quantify these ideas.
Expected Value (Intuition)
The expected value is the long-run average outcome of a random experiment.
It does NOT mean the value must actually occur.
Think of it as the “center of gravity” of a probability distribution.
Expected Value of a Discrete Random Variable
For a discrete random variable X, the expected value is defined as:
E(X) = Σ [ x · P(X = x) ]
This means:
- Multiply each value by its probability
- Add all results
This formula is extremely important for exams.
Example: Expected Value (Coin Toss)
Let X = number of heads in one fair coin toss.
| X | P(X) |
|---|---|
| 0 | 1/2 |
| 1 | 1/2 |
Expected value:
E(X) = (0 × 1/2) + (1 × 1/2) = 0.5
On average, half the tosses are heads.
Expected Value in Daily Life
Examples:
- Average marks in exams
- Average waiting time
- Average profit or loss
Expected value helps in planning and forecasting.
Expected Value in Business & Economics
Businesses use expected value to:
- Evaluate investments
- Assess expected profit
- Compare risk vs reward
Decisions are made using averages.
Expected Value in Data Science & ML
In data science:
- Mean of data = expected value
- Loss functions compute expected loss
Training models minimizes expected error.
Variance (Intuition)
Two distributions can have the same average but behave very differently.
Variance measures how spread out the values are around the mean.
Higher variance → more uncertainty.
Why We Don’t Use Simple Deviation
If we add deviations from the mean, positive and negative values cancel out.
To avoid this, we:
- Square deviations
This leads to variance.
Variance of a Discrete Random Variable
Variance is defined as:
Var(X) = Σ [ (x − μ)² · P(X = x) ]
where μ = E(X).
This formula must be memorized conceptually.
Alternative Variance Formula (Very Important)
A commonly used shortcut:
Var(X) = E(X²) − [E(X)]²
This form is faster in calculations.
Example: Variance (Simple Case)
Let X = number of heads in one fair coin toss.
We know:
- E(X) = 0.5
- E(X²) = (0² × 1/2) + (1² × 1/2) = 0.5
Variance:
Var(X) = 0.5 − (0.5)² = 0.25
Standard Deviation
Variance is measured in squared units.
To bring it back to original units, we take the square root.
Standard Deviation = √Variance
This is easier to interpret.
Visual Understanding (Important)
Imagine two distributions:
- Same mean
- Different spreads
The wider one has higher variance.
Graphs make this very clear.
Expected Value vs Variance
| Measure | What it tells |
|---|---|
| Expected Value | Average outcome |
| Variance | Spread / risk |
Applications in Competitive Exams
Exams test:
- Expected value formula
- Variance shortcuts
- Interpretation of spread
Conceptual clarity saves time.
Applications in Machine Learning
Machine learning uses:
- Expected loss minimization
- Variance to measure model stability
- Bias-variance tradeoff
This lesson is foundational for ML theory.
Common Mistakes to Avoid
- Thinking expected value must occur
- Forgetting to square deviations
- Confusing variance with standard deviation
Always interpret results carefully.
Practice Questions
Q1. What does expected value represent?
Q2. What does variance measure?
Q3. Why do we square deviations?
Quick Quiz
Q1. Can two distributions have the same mean but different variance?
Q2. Is variance always non-negative?
Quick Recap
- Expected value = average behavior
- Variance = spread or risk
- Standard deviation = √variance
- Used in exams, business, and ML
With expected value and variance mastered, you are now ready to study Normal Distribution, the most important distribution in statistics.