Contents
The Expected Value – Explanation & Examples
The definition of the expected value is:
“The expected value is the average value from a large number of random processes.”
In this topic, we will discuss the expected value from the following aspects:
- What is the expected value?
- How to calculate the expected value?
- Properties of expected value.
- Practice questions.
- Answer key.
What is the expected value?
The expected value (EV) of a random variable is the weighted average of that variable’s values. Its respective probability weights each value.
The weighted average is calculated by multiplying each outcome by its probability and summing all of those values.
We do many random processes that generate these random variables to get the EV or the mean.
In that sense, the EV is a property of the population. When we select a sample, we use the sample mean to estimate the population mean or the expected value.
There are two types of random variables, discrete and continuous.
Discrete random variables take a countable number of integer values and cannot take decimal values.
Examples of discrete random variables, the score you get when throwing a die or the number of defective piston rings in a box of ten.
The number of defectives in a box of ten can take only a countable number of values which are 0 (no defectives),1,2,3,4,5,6,7,8,9, or 10 (all detectives).
Continuous random variables take an infinite number of possible values within a certain range and can take decimal values.
Examples of continuous random variables, person’s age, weight, or height.
A person’s weight can be 70.5 kg, but with increasing balance accuracy, we can have a value of 70.5321458 kg, and so the weight can take infinite values with infinite decimal places.
The EV or the mean of a random variable gives us a measure of the variable distribution center.
– Example 1
For a fair coin, if the head is denoted as 1 and the tail as 0.
What is the expected value for the average if we tossed that coin 10 times?
For a fair coin, the probability of head = probability of tail = 0.5.
The expected value = weighted average = 0.5 X 1 + 0.5 X 0 = 0.5.
We tossed a fair coin 10 times and got the following results:
0 1 0 1 1 0 1 1 1 0.
The average of these values = (0+ 1+ 0+ 1+ 1+ 0+ 1+ 1+ 1+ 0)/10 = 6/10 = 0.6. This is the proportion of heads obtained.
It is the same as calculating the weighted average, where the probability of each number (or outcome) is its frequency divided by total data points.
The heads or 1 outcome has a frequency of 6, so its probability = 6/10.
The tails or 0 outcome has a frequency of 4, so its probability = 4/10.
Weighted average = 1 X 6/10 + 0 X 4/10 = 6/10 = 0.6.
If we repeated this process (tossing the coin 10 times) 20 times and count the number of heads and the average from every trial.
We will get the following result:
trial
heads
mean
1
6
0.6
2
5
0.5
3
8
0.8
4
5
0.5
5
1
0.1
6
4
0.4
7
5
0.5
8
4
0.4
9
5
0.5
10
4
0.4
11
5
0.5
12
6
0.6
13
3
0.3
14
9
0.9
15
2
0.2
16
2
0.2
17
4
0.4
18
8
0.8
19
6
0.6
20
5
0.5
In trial 1, we get 6 heads, so the mean = 6/10 or 0.6.
In trial 2, we get 5 heads, so the mean = 0.5.
In trial 3, we get 8 heads, so the mean = 0.8.
The average of heads column = sum of values/ number of trials = (6+ 5+ 8+ 5+ 1+ 4+ 5+ 4+ 5+ 4+ 5+ 6+ 3+ 9+ 2+ 2+ 4+ 8+ 6+ 5)/20 = 4.85.
The average of mean column = sum of values/ number of trials = (0.6+ 0.5+ 0.8+ 0.5+ 0.1+ 0.4+ 0.5+ 0.4+ 0.5+ 0.4+ 0.5+ 0.6+ 0.3+ 0.9+ 0.2+ 0.2+ 0.4+ 0.8+ 0.6+ 0.5)/20 = 0.485.
If we repeated this process (tossing the coin 10 times) 50 times and count the number of heads and the average from every trial.
We will get the following result:
trial
heads
mean
1
4
0.4
2
6
0.6
3
2
0.2
4
4
0.4
5
4
0.4
6
7
0.7
7
2
0.2
8
4
0.4
9
6
0.6
10
6
0.6
11
4
0.4
12
5
0.5
13
7
0.7
14
4
0.4
15
3
0.3
16
6
0.6
17
3
0.3
18
7
0.7
19
6
0.6
20
5
0.5
21
6
0.6
22
3
0.3
23
3
0.3
24
6
0.6
25
5
0.5
26
6
0.6
27
3
0.3
28
7
0.7
29
7
0.7
30
7
0.7
31
8
0.8
32
6
0.6
33
9
0.9
34
5
0.5
35
4
0.4
36
4
0.4
37
3
0.3
38
3
0.3
39
5
0.5
40
6
0.6
41
4
0.4
42
6
0.6
43
3
0.3
44
5
0.5
45
7
0.7
46
7
0.7
47
3
0.3
48
4
0.4
49
4
0.4
50
5
0.5
In trial 1, we get 4 heads so the mean = 4/10 or 0.4.
In trial 2, we get 6 heads so the mean = 0.6.
In trial 3, we get 2 heads so the mean = 0.2.
The average of heads column = sum of values/ number of trials = (4+ 6+ 2+ 4+ 4+ 7+ 2+ 4+ 6+ 6+ 4+ 5+ 7+ 4+ 3+ 6+ 3+ 7+ 6+ 5+ 6+ 3+ 3+ 6+ 5+ 6+ 3+ 7+ 7+ 7+ 8+ 6+ 9+ 5+ 4+ 4+ 3+ 3+ 5+ 6+ 4+ 6+ 3+ 5+ 7+ 7+ 3+ 4+ 4+ 5)/50 = 4.98.
The average of mean column = sum of values/ number of trials = (0.4+ 0.6+ 0.2+ 0.4+ 0.4+ 0.7+ 0.2+ 0.4+ 0.6+ 0.6+ 0.4+ 0.5+ 0.7+ 0.4+ 0.3+ 0.6+ 0.3+ 0.7+ 0.6+ 0.5+ 0.6+ 0.3+ 0.3+ 0.6+ 0.5+ 0.6+ 0.3+ 0.7+ 0.7+ 0.7+ 0.8+ 0.6+ 0.9+ 0.5+ 0.4+ 0.4+ 0.3+ 0.3+ 0.5+ 0.6+ 0.4+ 0.6+ 0.3+ 0.5+ 0.7+ 0.7+ 0.3+ 0.4+ 0.4+ 0.5)/50 = 0.498.
We conclude that for a random variable with two outcomes (or with binomial distribution):
1. The expected value for the average = probability of success or interested outcome.
In the above example, we are interested in heads so the expected value = 0.5.
2. The average value converges (get closer) to the EV as we increase the number of trials.
The EV for the average = 0.5. The average value from 20 trials was 0.485, while the average value from 50 trials was 0.498.
3. The average value of the number of successes get closer to the EV of the number of successes as we increase the number of trials.
The EV for the number of heads when we toss the coin 10 times = probability of success X number of trials = 0.5 X 10 = 5.
The average value from 20 trials was 4.85, while the average value from 50 trials was 4.98.
If we plot the data of 50 trials as a dot plot, we see that EV for the average (0.5) or the EV for the number of heads (5) halves the data distribution.
We see a nearly equal number of dots on either side of the vertical line of EV value. Thus, the EV value gives a measure of the data center.
– Example 2
Instead of tossing the coin 10 times, we tossed the coin 50 times and repeat that process 20 times and count the number of heads and the average from every trial.
We will get the following result:
trial
heads
mean
1
25
0.50
2
22
0.44
3
25
0.50
4
25
0.50
5
25
0.50
6
23
0.46
7
22
0.44
8
22
0.44
9
23
0.46
10
23
0.46
11
23
0.46
12
32
0.64
13
26
0.52
14
25
0.50
15
28
0.56
16
20
0.40
17
24
0.48
18
28
0.56
19
28
0.56
20
24
0.48
In trial 1, we get 25 heads, so the mean = 25/50 or 0.5.
In trial 2, we get 22 heads, so the mean = 0.44.
The average of heads column = sum of values/ number of trials = 24.65.
The average of mean column = sum of values/ number of trials = 0.493.
If we repeated this process (tossing the coin 50 times) 50 times and count the number of heads and the average from every trial.
We will get the following result:
trial
heads
mean
1
20
0.40
2
25
0.50
3
23
0.46
4
27
0.54
5
23
0.46
6
30
0.60
7
32
0.64
8
21
0.42
9
25
0.50
10
23
0.46
11
29
0.58
12
29
0.58
13
32
0.64
14
22
0.44
15
28
0.56
16
23
0.46
17
14
0.28
18
22
0.44
19
19
0.38
20
24
0.48
21
26
0.52
22
26
0.52
23
25
0.50
24
25
0.50
25
23
0.46
26
23
0.46
27
22
0.44
28
25
0.50
29
26
0.52
30
24
0.48
31
26
0.52
32
30
0.60
33
21
0.42
34
21
0.42
35
25
0.50
36
20
0.40
37
26
0.52
38
29
0.58
39
32
0.64
40
21
0.42
41
22
0.44
42
16
0.32
43
26
0.52
44
26
0.52
45
29
0.58
46
25
0.50
47
25
0.50
48
26
0.52
49
30
0.60
50
21
0.42
The average of heads column = sum of values/ number of trials = 24.66.
The average of mean column = sum of values/ number of trials = 0.4932.
We see that:
1. The expected value for the average = probability of success or heads = 0.5 also.
2. The average value converges (get closer) to the EV for the average as we increase the number of trials.
The average value from 20 trials was 0.493, while the average value from 50 trials was 0.4932.
3. The average value of the number of successes gets closer to the EV of the number of successes as we increase the number of trials.
The EV for the number of heads when we toss the coin 50 times = 0.5 X 50 = 25.
The average value from 20 trials was 24.65, while the average value from 50 trials was 24.66.
If we plot the data of 50 trials as a dot plot, we see that EV for the average (0.5) or the EV for the number of heads (25) halves the data distribution.
We see a nearly equal number of dots on either side of the vertical line of EV value.
– Example 3
In the following plot, we calculate the average for the different number of tosses starting from 1 toss to 1000 tosses.
In 1 toss, if we get head, so the average = 1/1 = 1.
if we get tail, so the average = 0/1 = 0.
As we increase the number of tosses, the average value, black dots or blue line, becomes closer to the expected value of 0.5, red horizontal line.
Whether we increase the number of trials or the number of tosses within each trial, the average will get closer to the EV for the average.
– Example 4
If we are throwing a fair die, the score we get on the top face is the random variable. There are only six possible outcomes (1,2,3,4,5,or 6). What is the expected value for the average if we rolled this die 10 times?
For a fair die, the probability of 1 = Probability of 2 = Probability of 3 = Probability of 4 = Probability of 5 = Probability of 6 = 1/6.
The expected value for the average = weighted average = 1/6 X 1 + 1/6 X 2 + 1/6 X 3 + 1/6 X 4 + 1/6 X 5 + 1/6 X 6 = 3.5.
We will get the same result if we calculate the average directly = (1+2+3+4+5+6)/6 = 3.5.
We rolled a fair die 10 times, and get the following results:
6 1 5 2 3 6 5 2 3 6.
The average of these values = (6+ 1+ 5+ 2+ 3+ 6+ 5+ 2+ 3+ 6)/10 = 3.9.
If we repeated this process (rolling the die 10 times) 20 times and calculate the average from every trial.
We will get the following result:
trial
mean
1
3.3
2
3.2
3
2.7
4
3.8
5
3.3
6
3.2
7
3.4
8
3.3
9
3.7
10
3.1
11
3.4
12
3.5
13
2.9
14
2.8
15
3.6
16
4.4
17
3.2
18
3.6
19
3.6
20
4.1
The average of trial 1 = 3.3.
The average of trial 2 = 3.2, and so on.
The average of mean column = sum of values/ number of trials = (3.3+ 3.2+ 2.7+ 3.8+ 3.3+ 3.2+ 3.4+ 3.3+ 3.7+ 3.1+ 3.4+ 3.5+ 2.9+ 2.8+ 3.6+ 4.4+ 3.2+ 3.6+ 3.6+ 4.1)/20 = 3.405.
If we repeated this process (rolling the die 10 times) 50 times and calculate the average from every trial.
We will get the following result:
trial
mean
1
3.2
2
2.8
3
3.9
4
3.5
5
2.9
6
3.5
7
4.6
8
4.1
9
3.1
10
3.9
11
3.0
12
3.0
13
3.1
14
4.5
15
3.0
16
3.3
17
4.3
18
4.1
19
3.2
20
3.3
21
3.2
22
3.9
23
3.8
24
4.0
25
3.9
26
3.7
27
3.4
28
3.1
29
3.4
30
3.1
31
4.1
32
3.5
33
2.4
34
3.9
35
3.5
36
3.0
37
3.2
38
3.2
39
3.8
40
2.9
41
3.5
42
3.2
43
3.4
44
2.8
45
4.1
46
3.4
47
3.7
48
4.3
49
3.4
50
3.3
The average of trial 1 = 3.2.
The average of trial 2 = 2.8, and so on.
The average of mean column = sum of values/ number of trials = 3.488.
We see that:
- The expected value for the average of rolling a die = 3.5.
- The average value converges (get closer) to the EV for the average as we increase the number of trials.
The average value from 20 trials was 3.405, while the average value from 50 trials was 3.488.
If we plot the data from 50 trials as a dot plot, we see that EV for the average (3.5) halves the data distribution.
We see a nearly equal number of dots on either side of the vertical line of EV value.
As the number of rollings grows, the average value converges to 3.5, which is the expected value.
We calculate the average for the different number of rolls starting from 1 roll to 1000 rolls in the following plot.