Professional Documents
Culture Documents
It would be foolish to simply take the arithmetic average of all the values taken by the random
variable, as this would mean that very unlikely values (those with small probabilities of
occurrence) would receive the same weighting as very likely values (those with large
probabilities of occurrence). The obvious approach is to use the probability-weighted
average of the sample space values, known as the expected value of X.
Note that the expected value is also referred to as the population mean, which can be written
as E(X) (in words ‘the expectation of the random variable X’) or µ (in words ‘the (population)
mean of X’). So, for so-called ‘discrete’ random variables, E(X) is determined by taking the
product of each value of X and its corresponding probability, and then summing across all
values of X.
Example
1
Example
Let X represent the value shown when a fair die is thrown once.
X=x 1 2 3 4 5 6 Total
Hence:
6
X 1 1 1
µ = E(X) = x P (X = x) = 1 × + 2 × + · · · + 6 × = 3.5.
6 6 6
x=1
We should view 3.5 as a long-run average since, clearly, the score from a single roll of a die
can never be 3.5, as it is not a member of the sample space. However, if we rolled the die a (very)
large number of times, then the average of all of these outcomes would be (approximately) 3.5.
For example, suppose we rolled the die 600 times and observed the frequencies of each score.
Let us suppose we observed the following frequencies:
X=x 1 2 3 4 5 6 Total
Frequencies 96 102 101 98 107 96 600
Example
Recall the toss of a fair coin, where we define the random variable X such that:
(
1 if heads
X=
0 if tails.
Here, viewed as a long-run average, E(X) = 0.5 can be interpreted as the proportion of heads
in the long run (and, of course, the proportion of tails too).
2
Example
Let us consider the game of roulette, from the point of view of the casino (‘The House’).
Suppose a player puts a bet of £1 on ‘red’. If the ball lands on any of the 18 red numbers, the
player gets that £1 back, plus another £1 from The House. If the result is one of the 18 black
numbers or the green 0, the player loses the £1 to The House.
We assume that the roulette wheel is unbiased, i.e. that all 37 numbers2 have equal
probabilities. What can we say about the probabilities and expected values of wins and losses?
Define the random variable X = ‘money received by The House’. Its possible values are −1
(the player wins) and 1 (the player loses). The probability function is:
18/37 for x = −1
P (X = x) = p(x) = 19/37 for x = 1
0 otherwise
where p(x) is a shortened version of P (X = x). Therefore, the expected value is:
18 19
E(X) = −1 × + 1× = +0.027.
37 37
On average, The House expects to win 2.7p for every £1 which players bet on red. This
expected gain is known as the house edge. It is positive for all possible bets in roulette.3
The mean (expected value) E(X) of a probability distribution is analogous to the sample mean
(average) X̄ of a sample distribution (introduced in week 3). This is easiest to see when the
sample space is finite.
Suppose the random variable X can have K different values X1 , . . . , XK , and their frequencies
in a random sample are f1 , . . . , fK , respectively. Therefore, the sample mean of X is:
K
f1 x1 + · · · + fK xK X
X̄ = b 1 ) + · · · + xK p(x
= x1 p(x b K) = xi p(x
b i)
f1 + · · · + fK i=1
where:
fi
p(x
b i) =
K
P
fi
i=1
are the sample proportions of the values xi . The expected value of the random variable X
is:
XK
E(X) = x1 p(x1 ) + · · · + xK p(xK ) = xi p(xi ).
i=1
So X̄ uses the sample proportions, pb(xi ), whereas E(X) uses the population probabilities, p(xi ).
2
We assume a ‘European’ style roulette wheel with a single zero.
3
The house edge must be positive such that the casino expects a positive profit in the long run!