Course contentsShow
← Data Science
Lesson 122 of 2,1454. Discrete Probability DistributionsFree lesson

Variance and Standard Deviation of Discrete Random Variables

Measuring spread by computing the expected squared deviation from the mean.

Variance and Standard Deviation of Discrete Random Variables

What you'll learn: How to measure how spread out a discrete random variable's values are around its expected value.

The Core Idea

You already know how to find the expected value (mean) of a discrete random variable—it's the "center" of the distribution. But two random variables can have the same mean yet behave very differently. One might cluster tightly around the mean, while another spreads widely.

Variance measures this spread by calculating the expected squared deviation from the mean. Here's the formula:

Var(X) = E[(X - μ)²]

Where μ is the expected value E[X]. In practice, you compute it as:

Var(X) = Σ (xᵢ - μ)² · P(X = xᵢ)

For each possible value xᵢ, you:

  1. Find how far it is from the mean: (xᵢ - μ)
  2. Square that distance: (xᵢ - μ)²
  3. Multiply by the probability of that value: P(X = xᵢ)
  4. Sum across all possible values

Why Square the Deviations?

Squaring ensures that values above and below the mean don't cancel out—both contribute positively to the spread. It also emphasizes larger deviations more than smaller ones.

Standard Deviation: Back to Original Units

Because variance involves squared deviations, its units are also squared (dollars² if X is in dollars). The standard deviation fixes this:

SD(X) = σ = √Var(X)

It's simply the square root of variance, returning you to the original units and making interpretation easier.

Intuitive Analogy

Think of variance as measuring the "average surprise" when you observe X. If the variance is small, outcomes stay close to what you expect. If it's large, outcomes are unpredictable and scattered.

Key Takeaway: Variance measures spread by computing the expected squared distance from the mean; standard deviation is its square root, expressed in the original units for easier interpretation.