Random variable expectation
The expectation of a random variable is the mean of the results we can expect to get if we measure the random variable ‘infinite’ times.
It’s basically the mean value of the list of possible values multiplied by their individual probabilities.
Notation
Section titled “Notation”We can write the expected value of a list of values
Formula
Section titled “Formula”Suppose we have a list of possible discrete values and their associated
probabilities. The value at position
That means we can write the expectation of a list of discrete values and
their probabilities (
A reminder that the
Calculating the expectation
Section titled “Calculating the expectation”Given that formula, it tells us that we can calculate the expectation of a list of values and their probabilities by multiplying each value by its probability (chance of it happening) and then adding all those products together.
This effectively calculates the mean of the values, weighted by their probabilities. We don’t need to divide by the sum of probabilities, because their sum is always 1 (since they represent all possible outcomes).
Example: Calculating the expectation of a fair die roll
Section titled “Example: Calculating the expectation of a fair die roll”Let’s say we have a standard six-sided die, and we want to calculate the expectation of what we’ll get when we roll it.
The possible values are 1, 2, 3, 4, 5, and 6. Each value has an equal
probability of
Given that, we can then calculate the expectation using our formula:
So the expectation of rolling a fair die is 3.5. This means that if we were to roll the die an infinite number of times, the average (mean) value we would get would be 3.5.