In probability theory, an expected value is the theoretical mean value of a numerical experiment over many repetitions of the experiment. Expected value is a measure of central tendency; a value for which the results will tend to. When a probability distribution is normal, a plurality of the outcomes will be close to the expected value.

Any given random variable contains a wealth of information. It can have many (or infinite) possible outcomes, and each outcome could have different likelihood. The expected value is way to summarize all this information in a single numerical value.

Contents

Definition

If the sample space of a probability experiment contains only numerical outcomes, then a random variable is the variable that represents these outcomes. For example, the result of flipping a fair six-sided die is a random variable that takes each of the values from 1 to 6 with probability \(\frac{1}{6}.\) This is an example of a discrete random variable.

For a discrete random variable, the expected value can be calculated by multiplying each numerical outcome by the probability of that outcome, and then summing those products together. The expected value of a fair six-sided die is calculated as follows:

Let \(X\) be a discrete random variable. Then the expected value of \(X\), denoted as \(\text{E}[X]\) or \(\mu\), is

\[\text{E}[X]=\mu=\sum\limits_{x}{xP(X=x)}\]

A stack of cards contains one card labeled with \(1\), two cards labeled with \(2\), three cards labeled with \(3\), and four cards labeled with \(4\). If the stack is shuffled and a card is drawn, what is the expected value of the card drawn?

Let \(X\) be the random variable that represents the value of the card drawn.

The first theorem shows that translating all variables by a constant also translates the expected value by the same constant. This makes intuitive sense, since if all variables are translated by a constant, the central or mean value should also be translated by the constant. The second theorem shows that scaling the values of a random variable by a constant \(c\) also scales the expected value by \(c\).

A fair six-sided die is labeled on each face with the numbers 5 through 10. What is the expected value of the die roll?

From before, we know the expected value of a regular six-sided die is \(\text{E}[X]=3.5\). This problem is asking for \(\text{E}[X+4]\).

Therefore, the expected value of the die roll is \(3.5+4=7.5\).

A fair six-sided die is labeled on each face with the first six positive multiples of 5. What is the expected value of the die roll?

From before, the expected value of a regular six-sided die roll is \(\text{E}[X]=3.5\). This problem is asking for \(\text{E}[5X]\).

Therefore, the expected value of the die roll is \(3.5\times 5= 17.5\).

We now show how to calculate the expected value for a sum of random variables.

Let \(X\) and \(Y\) be random variables. Then

\[ \text{E}[X + Y] = \text{E}[X] + \text{E}[Y]\]

Two fair six-sided dice are rolled. What is the expected value of the sum of their rolls?

From before, it is known that the expected value of a single fair six-sided die is \(\text{E}[X]=3.5\). This problem is asking for \(\text{E}[X+X]\).

Therefore, the expected value of the sum of the die rolls is \(3.5+3.5=7\).

A fair six-sided die is rolled repeatedly until three sixes are rolled consecutively. What is the expected number of rolls?

Let \(X_n\) be the random variable that represents the number of rolls required to get \(n\) consecutive sixes.

In order to get \(n\) consecutive sixes, there must first be \(n-1\) consecutive sixes. Then, the \(n^\text{th}\) consecutive six will occur on the next roll with \(\frac{1}{6}\) probability, or the process will start over on the next roll with \(\frac{5}{6}\) probability.

It can be found that \(\text{E}[X_1]=6\), and so \(\text{E}[X_2]=6\times 6+6=42\), and \(\text{E}[X_3]=6\times 42+6=258\).

The expected number of rolls until three consecutive sixes is rolled is \(\boxed{258}\).

A fair coin is tossed repeatedly, until 5 consecutive heads occur. What is the expected number of coin tosses?

Continuous Random Variables

There are two types of random variables, discrete and continuous. The die-roll example from above is an example of a discrete random variable, since the variable can take on a finite number of discrete values. Choosing a random real number from the interval \([0,1]\) would be an example of a continuous random variable.

The expected number of heads flips given that there are more than 2 heads flips is \(\boxed{\dfrac{55}{16}=3.4375}\).

Let \(X\) be a continuous random variable, and let \(f(x)\) be its density function. Let \(Y=y\) be an event, and let \(\chi\) be the range of \(X\) given \(Y=y\). Then the expected value of \(X\) given the event \(Y=y\), denoted as \(\text{E}\left[X\mid Y=y\right]\), is:

The expected value of \(X\) given \(X<\dfrac{1}{2}\) is \(\boxed{\dfrac{1}{3}}\).

Additional Worked Examples

There are 2 bags, and balls numbered 1 through 5 are placed in each bag. From each bag, 1 ball is removed. What is the expected value of the total of the two balls?

Consider the following table, which lists the possible values of the first ball in the first row, and the possible values of the second ball in the first column. Each entry on the table is obtained by finding the sum of these two values.

(*) How can we use the linearity of expectation to arrive at the result quickly?

\(n\) six-sided dice are rolled. What is the expected number of times \(5\) is rolled?

To determine the expected number of times 5 is rolled, we can define \(Y\) to be the random variable for the number of times a \(5\) is rolled, and \(Y_i\) to be the random variable for die \(i\) rolling a \(5\). It is easy to see that \(E(Y_i) = \frac{1}{6} \times 1 + \frac{5}{6} \times 0 = \frac{ 1}{6}.\) We have \(Y = \sum\limits_{i=1}^{n} Y_i\), so by the linearity of expectation, \(E(Y) = \sum\limits_{i=1}^{n} E(Y_i)\). Therefore, \(E(Y)= \frac{n}{6}\). \(_\square\)

Note: We can also answer this question by noting that since the probability of getting each number is equal, the expected number of times we get each number is the same, and the sum of these expectations is \(n\), so for each number the expectation is \(\frac{n}{6}\).

Mathematically speaking, let \( Z_i \) be the random variable for the number of times \(i\) is rolled out of \(n\) throws. By symmetry, we know that \( E[Z_i] \) is a constant. Since there are a total of \(n\) results, \( n = Z_1 + Z_2 + Z_3 + Z_4 + Z_5 + Z_6 \). This gives us

Consider the Bernoulli process of a sequence of independent coin flips for a coin with probability of heads \(p\). Let \(X_i\) be a random variable with \(X_i=1\) if the \(i^\text{th}\) flip is heads and \(X_i=0\) if the \(i^\text{th}\) flip is tails. Let \(Y\) be a random variable indicating the number of trials until the first flip of heads in the sequence of coin flips. What is the expected value of \(Y\)?

The possible values for the number of coin flips until the first head are \(1, 2, 3, \ldots,\) so these are the possible values for random variable \(Y\). For \(i = 1,2, 3, \ldots\), the probability that \(Y=i\) is the probability that the first \(i-1\) trails are tails and trial \(i\) is heads. This gives the distribution \(p(Y = i) = (1-p)^{i-1}p,\) which is a geometrically distributed random variable. Then

Problem Solving

The Las Vegas Casino Magnicifecto was having difficulties attracting its hotel guests down to the casino floor. The empty casino prompted management to take drastic measures, and they decided to forgo the house cut. They decided to offer an “even value” game - whatever bet size the player places (say \($A\) ), there is a 50% chance that he will get \( +$A \), and a 50% chance that he will get \( - $A \). They felt that since the expected value of every game is 0, they should not be making or losing money in the long run.

Scrooge, who was on vacation, decided to exploit this even value game. He has an infinite bankroll (money) and decides to play the first round (entire series) in the following manner:

He first makes a bet of \( $10 \).
If he wins, he keeps his earnings and leaves.
Each time that he loses, he doubles the size of his previous bet, and plays again.

Now, what is the expected value of Scrooge’s (total) winnings from this first round (which ends when he leaves)?

A "round" refers to the entire series of games played above. This question refers to the entire round. There are 4 rounds in the set of problems.

This problem is part of Go Big Or Go Home, which explores the linearity of expected value.

Image credit: Wikipedia Flipchip

\[ + $ \infty \]
\[ $0 \]
\[ - $10 \]
\[ + $ 10 \]

A bug starts on one vertex of an dodecahedron. Call it A. Define a second vertex adjacent to the one he starts on, and call it B.

Every second he randomly walks along one edge to another vertex. What is the expected value of the number of seconds it will take for him to reach the vertex B?

Clarification: Every second he chooses randomly between the three edges available to him, including the one he might have just walked along. On his first move he has a 1/3 probability of reaching B.

See my other Expected Value Quizzes

Image credit: math.wikia.com

As shown above, the left box contains 1 red ball and 2 blue balls while the right box contains 2 blue balls and 3 red balls.

In a lucky draw game, you have to randomly pick up one ball from each box with both hands simultaneously.

If you get the blue ball from the left box, you'll be rewarded 4 dollars, but you'll lose 5 dollars for the red draw. On the other hand, for the red ball draw from the right box will cost you 7 dollars while the blue draw will earn you 8 dollars.

Find the expected value for the number of flips you'll need to make in order to see the pattern TXT, where T is tails, and X is either heads or tails.

The expectation value can be expressed as \( \dfrac ab\), where \(a\) and \(b\) are coprime positive integers, find \(a+b\).

Clarification: You are looking for the pattern TTT or THT. i.e. You will keep flipping until you see one of those two patterns, then count the number of flips you made.

Other Expected Value Quizzes

Image credit: www.cointalk.com

A bug starts on one vertex of an icosahedron. Every second he randomly walks along one edge to another vertex. What is the expected value of the number of seconds it will take for him to reach the vertex opposite to the original vertex he was on?

Clarification: Every second he chooses randomly between the five edges available to him, including the one he might have just walked along.

Other Expected Value Quizzes

Image credit: www.kjmaclean.com.

Call the vertices of a tetrahedron, A, B, C, and D.

A bug starts on vertex A. Every second he randomly walks along one edge to another vertex. What is the expected value of the number of seconds it will take for him to reach the vertex, D?

Clarification: Every second he chooses randomly between the three edges available to him, including the one he might have just walked along.