Overview
A random variable is defined as a number whose value is determined by a random process, like a die roll. The expected value of a random variable is a fancy way of saying its average value.
Let be the probability of event happening. If we have a random variable with outcomes occurring with probabilities , then the expected value is the weighted average
From this definition we clearly have:
for some constant .
There are also two other very important, but a bit less obvious, facts about expected value.
- If are two independent random variables, then .
- Linearity of Expectation: If are two random variables, then . This is true regardless of whether or not are independent. This is arguably the most important property of expected value.
A Simple Example
In a dice roll, the possible outcomes are and the probability of each is , so the expected value is
The expected sum of two dice rolls is . The expected product of two dice rolls is , as the dice rolls are independent.
Worked Example #1
Suppose there are people, each of whom has a name tag. The name tags are shuffled, and each person is randomly given a name tag. What is the expected number of people who received their own name tag?
Solution
Label the people . Define the indicator variable to be if person receives their own name tag and otherwise. Then
represents the total number of people who receive their own name tag.
Using indicator variables is powerful because it turns counting problems into expectation problems.
For each ,
.
Hence,
.
Worked Example #2 (2021 Fall AMC 10B #16)
Five balls are arranged around a circle. Chris chooses two adjacent balls at random and swaps them. Then Silva does the same independently. What is the expected number of balls that occupy their original positions after both swaps?
Solution
Label the balls . Define to be if ball is in its original position after both swaps, and otherwise. Then
.
Consider a fixed ball. It is not touched by a swap with probability . Thus the probability it is untouched in both steps is .
Additionally, there is a chance it is swapped and then swapped back. This occurs with probability .
So,
.
Hence,
.
Worked Example #3 (2021 Fall AMC 12B #23)
What is the average number of pairs of consecutive integers in a randomly selected subset of distinct integers chosen from ?
Solution
There are consecutive pairs:
.
Define to be if both numbers in pair are in the chosen subset, and otherwise.
Then
.
For a fixed pair , the number of subsets containing it is out of total subsets. Thus,
.
Hence,
.
Expected value allows complicated counting problems to be reduced to simple probability computations.
Worked Example #4
An Alien starts at square on a normal number line. Every millisecond, he moves either step to the right with probability of OR steps to the right with probability of . Now, after moves, we let denote his current position. What is ?
Solution
First, define as the distance the Alien moved on step . Then, we have that
.
Next, for each step,
.
And so, we get the answer from here,
.
Worked Example #5
A peculiar and very skibidi magician has skibidi cubes. Each skibidi cube is RED with probability of , BLUE with probability of , and GREEN otherwise. Red gives skibidi points, blue gives skibidi points, and green gives skibidi points. If S is the total score, find .
Solution
First, we define to be the score from skibidi cube . Then, we have that
.
Now, notice that for one cube, we have
.
So, as a result,
.
Worked Example #6
An skibidi integer is chosen uniformly and randomly from . If is the number of divisors of the integer, your job is to find .
Solution
To start off, like usual, we will define some variables. Here, we will define to be IF divides the integer that was chosen, and otherwise. Then we have that
.
By using the powerful linearity of expectation, we obtain,
.
From here, notice that for fixed , the probability that it divides a random integer is simply
.
Thus, we have
.
Now, this sum equals , so we can get our answer easily from here
.
Worked Example #7
Eight extremely skibidi, extraterrestrial players each play one very skibidi game against EVERY other player. Each skibidi player independently gets a skibidi toy with probability . If is the number of games where BOTH players have skibidi toys, your goal is to find .
Solution
First, notice that there are simply games. Next, we will define to be IF both players in game have skibidi toys, and otherwise.
Then, from here, it is easy to see that
.
So, for ANY game,
.
So, as result, we get
.
And thus, the ansewr follows:
.
Worked Example #8 (Challenge: It requires a bit of calculus!)
A fair (not skibidi) coin is flipped UNTIL the first tails appears. If tails appears on flip , the payout is . If is the payout, your job is to find .
Solution
First, realize that the probability that the first tails occurs on flip is simply
.
As a result, we have that,
.
Then, using a identity which can be proven from taking a geometric series and differentiating it, we get
,
and substitute :
.
Therefore, the expected payout is !
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
| MathNet | Hard | Show TagsExpected values | ||||
| Berkeley Math Circle: Monthly Contest 6 | Hard | Show TagsExpected values | ||||
| Berkeley Math Circle: Monthly Contest 7 | Hard | Show TagsCombinatorial Geometry, Expected values | ||||
| Berkeley Math Circle: Monthly Contest 2 | Hard | Show TagsColoring schemes, extremal arguments, Expected values, Induction / smoothing, Sums and products | ||||
| BAMO | Hard | Show TagsCounting two ways, Expected values | ||||
| Harvard-MIT Math Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsAlgebraic properties of binomial coefficients, Counting two ways, Expected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values, Prime numbers | ||||
| 10th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsEnumeration with symmetry, Expected values | ||||
| 1st Annual Harvard-MIT November Tournament | Hard | Show TagsExpected values | ||||
| 1st Annual Harvard-MIT November Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT November Tournament | Hard | Show TagsExpected values, Recursion, bijection | ||||
| Harvard-MIT November Tournament | Hard | Show TagsExpected values, Recurrence relations | ||||
| 12th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values, Invariants / monovariants, Recursion, bijection | ||||
| $12^{\text {th }}$ Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsEnumeration with symmetry, Expected values | ||||
| 12th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsAngle chasing, Expected values | ||||
| 12th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values, Sums and products | ||||
| $12^{\text {th }}$ Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| 13th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values | ||||
| Harvard-MIT November Tournament | Hard | Show TagsExpected values | ||||
| 13th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsExpected values, Factorization techniques, Sums and products | ||||
Module Progress:
Join the Discord Community!
Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.
