Professional Documents
Culture Documents
3.3 Expectation
Example
Find the expected value of the Bernoulli random variable IA .
Solution
E[IA ] = 0pI (0) + 1pI (1)
Example
Let X be the number of heads in three tosses of a fair coin. Find E[X].
Sol.
3
X
E[X] = xpX (x) = 0(1/8) + 1(3/8) + 2(3/8) + 3(1/8) = 1.5
k=0
Example
Let X be a uniform random variable from 0 to M − 1. Find E[X].
Sol.
We have pX (j) = (1/M ) for j = 0, 1, . . . , M − 1
M −1
X 1 1 (M − 1)M (M − 1)
E[X] = k = (0 + 1 + · · · + M − 1) = =
M M 2M 2
k=0
M (M + 1)
where we have used the fact that (1 + 2 + · · · + M ) =
2
Example
A player at a fair pays $1.50 to toss a coin three times. The player receives $1
if the number of heads is 2, $8 if the number is 3, but nothing otherwise. Find
the expected value of the reward Y .
What is the expected value of the gain?
Sol.
The expected reward is:
E[Y ] = 0pY (0) + 1pY (1) + 8pY (8) = 0(4/8) + 1(3/8) + 8(1/8) = (11/8)
The expected value of gain is:
11 12 1
E[Y − 1.5] = − =−
8 8 8
Sol.
X 1 20
E[Z] = E[X 2 ] = k2 pX (k) = {(−3)2 + (−1)2 + (1)2 + (3)2 } = = 5.
4 4
k
Example
Let X be the number of heads in three tosses of a fair coin.
Find V AR[X].
Sol.
1 3 3 1
2
E[X ] = 0 + 12 + 22 + 32 =3
8 8 8 8
V AR[X] = E[X 2 ] − m2X = 3 − 1.52 = 0.75