Expected Value

A random variable is a variable whose value can change under different outcomes. For example, the result of flipping a standard 6-sided die is a random variable that takes each of the values from 1 to 6 with probability 16.\frac{1}{6}.

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][0,1] would be an example of a continuous random variable.

A random variable contains a lot of information. We can summarize this information to get an idea of the behaviour of the random variable over the long term. The expected value of a random variable is the weighted average of all possible outcomes. For example, if we roll a standard 6-sided die, there are 6 possibilities, each occurring with probability 16\frac{1}{6}, so the expected value is 16(1)+16(2)+16(3)+16(4)+16(5)+16(6)=3.5\frac{1}{6}(1) + \frac{1}{6}(2) + \frac{1}{6}(3) + \frac{1}{6}(4) + \frac{1}{6}(5) + \frac{1}{6}(6) = 3.5. We often denote the expected value of a random variable XX by μ\mu or E[X].E[X]. More generally, the formula is

E[X]={xxP(X=x), if X is a discrete random variablexxf(x)dx, if X is a continuous random variable. E[X] = \begin{cases} \sum_x xP(X=x), & \mbox{ if } X \mbox{ is a discrete random variable} \\ \int_x xf(x) \, dx, & \mbox{ if } X \mbox{ is a continuous random variable}. \end{cases}

If we have two random variables XX and Y,Y, and constants a,b,a,b, then the following properties of expectation hold:

E[X+a]=E[X]+aE[bX]=bE[X]E[X+Y]=E[X]+E[Y]\begin{aligned} E[X + a] & = E[X] + a\\ E[bX] & = bE[X]\\ E[X + Y] & = E[X] + E[Y]\\ \end{aligned}

This is known as linearity of expectation, and holds even when XX and YY are not independent events. Each of these statements follow easily from the definition of expected value, and will be elaborated on in future.

Worked examples

1. There are 2 bags and balls numbered 1 through 5 are placed in them. 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 second row. Each entry on the table is obtained by finding the sum of these two values.

123451234562345673456784567895678910 \begin{array} { l | l | l | l | l | l | } & 1 & 2 & 3 & 4 & 5 \\ \hline 1 & 2 & 3 & 4 & 5 & 6\\ \hline 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 3 & 4 & 5 & 6 & 7 & 8 \\ \hline 4 & 5 & 6 & 7 & 8 & 9 \\ \hline 5 & 6 & 7 & 8 & 9 & 10 \\ \hline \end{array}

Let XX be the random variable denoting the sum of these values. Then, we can see that the probability distribution of XX is given by

x2345678910P(X=x)125225325425525425325225125\begin{array} { | l | l | l | l | l | l | l | l | l | l l | } \hline x & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & \\ \hline P(X=x) & \frac{1}{25} & \frac{2}{25} & \frac{3}{25} & \frac{4}{25} & \frac{5}{25} & \frac{4}{25} & \frac{3}{25} & \frac{2}{25} & \frac{1}{25} & \\ \hline \end{array}

As such, this allows us to calculate

E[X]=2×125+3×225+4×325+5×425+6×525+7×425+8×325+9×225+10×125=6. \begin{aligned} E[X] & = 2 \times \frac {1}{25} + 3 \times \frac {2}{25} + 4 \times \frac {3}{25} + 5 \times \frac {4}{25} + 6 \times \frac {5}{25} \\ & \qquad + 7 \times \frac {4}{25} + 8 \times \frac {3}{25} + 9 \times \frac {2}{25} + 10 \times \frac {1}{25} = 6. \end{aligned}

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

 

2. nn six-sided dice are rolled. What is the expected number of times 55 is rolled?

To determine the expected number of times 5 is rolled, we can define YY to be the random variable for the number of times a 55 is rolled, and YiY_i to be the random variable for die ii rolling a 55. It is easy to see that E(Yi)=16×1+56×0=16.E(Y_i) = \frac{1}{6} \times 1 + \frac{5}{6} \times 0 = \frac{ 1}{6}. We have Y=i=1nYiY = \sum\limits_{i=1}^{n} Y_i, so by the linearity of expectation, E(Y)=i=1nE(Yi)E(Y) = \sum\limits_{i=1}^{n} E(Y_i). so E(Y)=n6E(Y)= \frac{n}{6}.

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 nn, so for each number the expectation is n6\frac{n}{6}.

Mathematically speaking, let Zi Z_i be the random variable for the number of times ii is rolled out of nn throws. By symmetry, we know that E[Zi] E[Z_i] is a constant. Since there are a total of nn results, hence n=Z1+Z2+Z3+Z4+Z5+Z6 n = Z_1 + Z_2 + Z_3 + Z_4 + Z_5 + Z_6 . This gives us

n=E[Z1+Z2+Z3+Z4+Z5+Z6]=E[Z1]+E[Z2]+E[Z3]+E[Z4]+E[Z5]+E[Z6]=6E[Zi] n = E[ Z_1 + Z_2 + Z_3 + Z_4 + Z_5 + Z_6 ] = E[Z_1] + E[Z_2]+ E[Z_3]+E[Z_4]+E[Z_5]+E[Z_6] = 6 E[Z_i]

Note by Calvin Lin
5 years, 6 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

Awesome! :D

Finn Hulse - 5 years, 5 months ago

Log in to reply

Can you please explain the integral part and continuous variation? I have not studied integral calculus till now, though I've studied derivatives and limits.

Ruhan Habib - 5 years, 5 months ago

Log in to reply

You are close to learning about integration. Once you get there, you will see that integration is just the continuous version of summation, which is how these ideas are related.

Calvin Lin Staff - 5 years, 5 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...