---
title: "Expected Value and Variance of a Discrete Random Variable"
description: "Weight each value by its probability to find the expected value. Calculate variance as E(X²) minus the square of E(X), and compare a game's stake with its expected payout to judge mathematical fairnes"
canonical: https://lightmysky.com/learn/mathematics/expected-value-and-variance-of-a-discrete-random-variable-mt_PFdo0Nm3FP
source: https://lightmysky.com/learn/mathematics/expected-value-and-variance-of-a-discrete-random-variable-mt_PFdo0Nm3FP.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Expected Value and Variance of a Discrete Random Variable

Weight each value by its probability to find the expected value. Calculate variance as E(X²) minus the square of E(X), and compare a game's stake with its expected payout to judge mathematical fairness.

Subject: Mathematics · Area: Probability · Ages 16 to 17
Page: https://lightmysky.com/learn/mathematics/expected-value-and-variance-of-a-discrete-random-variable-mt_PFdo0Nm3FP

## Ready when they can

- Calculate E(X) for a given distribution
- Calculate Var(X) from E(X²) and E(X)
- Decide whether a game with a stake is fair

## Lesson: One number for a whole distribution

At another spinner stall at the fair, the payout X is 0, 1 or 5 pounds with probabilities 0.6, 0.3 and 0.1. A distribution gives both the average payout and its spread. Its probabilities must be nonnegative and total 1. Find a missing probability by subtracting the known probabilities from 1. For the average, multiply each prize by its probability, then add the products.

*(drawing: Expected counts in 100 spins. The £5 prize contributes £50 of the expected £80 payout, despite having the smallest expected count.)*

In 100 independent spins with these fixed chances, the expected counts are 60, 30 and 10. These are not promised counts. The expected total payout is 0 × 60 + 1 × 30 + 5 × 10 = £80, or £0.80 per spin. From the distribution, E(X) = 0 × 0.6 + 1 × 0.3 + 5 × 0.1 = 0.8. E(X) is the expected value: each value multiplied by its probability, then added.

Nobody wins 80p on this spinner: it pays £0, £1 or £5. E(X) is the long-run average over repeated independent spins with fixed probabilities, not a promised payout on one spin. It need not be a value X can take. A probability-weighted mean always lies between the smallest and largest possible values, so a mean outside that range signals a calculation or table error.

*(drawing: The average of a set of prizes need not be one of the prizes. That is not a fault in the arithmetic; it is what an average is.)*

**Example.** Variance is the probability-weighted average of the squared distances from E(X), so it is nonnegative. Use Var(X) = E(X²) - [E(X)]². Square each value, weight by its probability and add for E(X²). For the spinner, E(X²) = 0² × 0.6 + 1² × 0.3 + 5² × 0.1 = 2.8, so Var(X) = 2.8 - 0.8² = 2.16. To recover the mean, [E(X)]² = E(X²) - Var(X). Take its square root and use the stated sign of the mean.

A fair stake equals the expected total payout, including any returned stake. The player's expected net gain is E(X) - stake. For a target gain, stake = E(X) - target gain. Here a £1 stake gives a mean loss of £0.20; over 400 goes the stall's expected margin before costs is £80. Actual totals can differ. Mean and spread can change separately: replace £5 at chance 0.1 by £50 at 0.01 and move the freed chance to £0. E(X) stays £0.80, but variance rises.

**Recap.** E(X) is a probability-weighted mean and need not be a possible payout. Var(X) = E(X²) - [E(X)]² measures spread. A fair stake equals E(X). Expected margin is stake minus E(X).

*Lesson, practice questions and flashcards written for Marble.*

## Practice

30 questions on this page, each with its working shown.

## Needs first

- [Discrete Random Variables and Probability Distributions](https://lightmysky.com/learn/mathematics/discrete-random-variables-and-probability-distributions-mt_yKztNkvvq3)

## Optional connections

- [Relative Frequency and Expected Outcomes](https://lightmysky.com/learn/mathematics/relative-frequency-and-expected-outcomes-mt_OQCnzkcHUH)

## Opens up

- [Normalisation and Expectation Values](https://lightmysky.com/learn/science/normalisation-and-expectation-values-mt_6Y3DZ8P1qm)
- [Randomised Quicksort and Expected Running Time](https://lightmysky.com/learn/computing/randomised-quicksort-and-expected-running-time-mt_fcKF7zfzpX)
- [Expectation and Variance by Integration](https://lightmysky.com/learn/mathematics/expectation-and-variance-by-integration-mt_kRSaKgp3bs)
- [The Binomial Distribution](https://lightmysky.com/learn/mathematics/the-binomial-distribution-mt_X2kVGK67Md)
