Mean & Standard
Deviation
Master the expected value and spread of random variables: the building blocks of probability and inference in statistics.
What Is a Random Variable?
A random variable assigns a numerical value to each outcome of a random process. We use uppercase letters like \(X\) to name them, and lowercase \(x\) for specific values they can take.
Probability Distribution Table
A discrete random variable is fully described by listing every possible value alongside its probability. The probabilities must sum to 1.
| \(x\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| \(P(X = x)\) | 0.10 | 0.30 | 0.40 | 0.20 |
Visualizing the Distribution
The Mean (Expected Value)
The mean of a discrete random variable \(X\) is the weighted average of all possible values, weighted by their probabilities. We write it as \(\mu_X\) or \(E(X)\).
This is not the same as a simple average of the values. Each value is weighted by how likely it is to occur. The mean represents the long-run average if the experiment is repeated many times.
Variance and Standard Deviation
The variance measures how far the values spread from the mean, on average. The standard deviation is simply the square root, returning us to the original units.
A larger \(\sigma_X\) means outcomes are more spread out from the mean. A \(\sigma_X\) of zero means the variable always takes the same value.
Mean vs. Standard Deviation
Linear Transformations: \(Y = a + bX\)
If you transform every value of \(X\) by adding a constant \(a\) and multiplying by a constant \(b\), the mean and standard deviation change in predictable ways.
Combining Independent Variables
When \(X\) and \(Y\) are independent random variables, we can find the mean and variance of their sum or difference.
How to Calculate Step by Step
Example 1: Finding \(\mu_X\)
A spinner lands on the values 1, 2, 3, or 4 with the probabilities shown. Find the mean \(\mu_X\).
| \(x\) | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| \(P(X = x)\) | 0.15 | 0.25 | 0.35 | 0.25 |
Example 2: Finding \(\sigma_X\)
Using the same spinner from Example 1 with \(\mu_X = 2.70\), find the standard deviation \(\sigma_X\).
| \(x_i\) | \((x_i - 2.70)^2\) | \(\times P(x_i)\) |
|---|---|---|
| 1 | 2.89 | 0.4335 |
| 2 | 0.49 | 0.1225 |
| 3 | 0.09 | 0.0315 |
| 4 | 1.69 | 0.4225 |
Example 3: Linear Transform
A game charges \(\$2\) to play the spinner from Example 1 and pays \(\$3\) for each point. Your profit is \(Y = 3X - 2\). Find \(\mu_Y\) and \(\sigma_Y\).
The expected profit per game is \(\$6.10\) with a standard deviation of \(\$3.015\).
Example 4: Combining Two Variables
Juan's daily commute time by bus has \(\mu_X = 25\) min and \(\sigma_X = 4\) min. His walk from the bus stop has \(\mu_Y = 8\) min and \(\sigma_Y = 2\) min. If \(X\) and \(Y\) are independent, find the mean and standard deviation of his total commute \(T = X + Y\).
Common Mistakes
Summary of Key Formulas
| Operation | Mean | Variance |
|---|---|---|
| Definition | \(\sum x_i P(x_i)\) | \(\sum (x_i - \mu)^2 P(x_i)\) |
| \(Y = a + bX\) | \(a + b\mu_X\) | \(b^2 \sigma_X^2\) |
| \(X + Y\) (indep.) | \(\mu_X + \mu_Y\) | \(\sigma_X^2 + \sigma_Y^2\) |
| \(X - Y\) (indep.) | \(\mu_X - \mu_Y\) | \(\sigma_X^2 + \sigma_Y^2\) |
Worked Example
A small insurance company sells a one-year policy that pays out $10,000 with probability 0.02 and $0 otherwise. The annual premium is $300. Let X represent the company's profit on a randomly selected policy. Find the mean and standard deviation of X. Insurance Policy Profit Step 1 — Define the Random Variable and Its Distribution The profit X depends on whether the company pays a claim. If no claim is filed (probability 0.98), the company keeps the $300 premium, so X = $300. If a claim is filed (probability 0.02), the company receives $300 in premium but pays $10,000, so X = $300 − $10,000 = −$9,700. Step 2 — Set Up the Probability Distribution Table X takes two values: x₁ = 300 with P(x₁) = 0.98, and x₂ = −9,700 with P(x₂) = 0.02. Verify that probabilities sum to 1: 0.98 + 0.02 = 1 ✓. Step 3 — Compute the Mean μ_(X) = Σ x_(i) × P(x_(i)) = (300)(0.98) + (−9,700)(0.02) = 294 + (−194) = 100. μ_X = $100 Step 4 — Compute the Variance σ²_(X) = Σ (x_(i) − μ_(X))² × P(x_(i)) = (300 − 100)²(0.98) + (−9,700 − 100)²(0.02) = (200)²(0.98) + (−9,800)²(0.02) = 40,000(0.98) + 96,040,000(0.02) = 39,200 + 1,920,800 = 1,960,000. σ²_X = 1,960,000 dollars² Step 5 — Compute the Standard Deviation σ_(X) = √1,960,000 = 1,400. σ_X = $1,400 Step 6 — Interpret in Context On average, the company expects to profit $100 per policy sold. However, the standard deviation of $1,400 indicates enormous variability in individual policy outcomes—the profit from any single policy is highly unpredictable. This is why insurance companies sell many policies: the Law of Large Numbers ensures the average profit per policy approaches μ_(X) = $100 as the number of policies grows. $300 premium, two-outcome distribution.

Question 1 of 5
A random variable \(X\) has the distribution: \(P(X=1) = 0.3\), \(P(X=2) = 0.5\), \(P(X=3) = 0.2\). What is \(E(X)\)?
Question 2 of 5
If \(X\) has mean \(\mu_X = 10\) and standard deviation \(\sigma_X = 3\), and \(Y = 2X + 5\), what is \(\sigma_Y\)?
Question 3 of 5
If \(X\) and \(Y\) are independent with \(\sigma_X = 4\) and \(\sigma_Y = 3\), what is the standard deviation of \(X - Y\)?
Question 4 of 5
A random variable \(X\) has \(\mu_X = 50\) and \(\sigma_X = 8\). If you create \(Y = X + 12\), what are \(\mu_Y\) and \(\sigma_Y\)?
Question 5 of 5
Which of the following statements about the variance of a random variable is FALSE?