3.5 Expected Values - Rocky Mountain College

3.5 Expected Values
Ulrich Hoensch
MAT310
Rocky Mountain College
Billings, MT 59102
Expected Value
Definition 3.5.1
Let X be a discrete random variable with probability mass function
p(xi ). The expected value of X is defined as
X
µ = E (X ) =
xi p(xi ).
i
Let X be a continuous random variable with probability density
function f (x). The expected value of X is defined as
Z ∞
µ = E (X ) =
xf (x) dx.
−∞
Example 1
Find the expected value of each random variable.
1. X is given by the PMF:
x
0
1
2
3
p(x) 1/8 3/8 3/8 1/8
X
E (X ) =
xi p(xi )
i
= (0)(1/8) + (1)(3/8) + (2)(3/8) + (3)(1/8)
= 12/8 = 3/2.
2. X is given by the PDF
e −x if x ≥ 0
0
if x < 0
Z ∞
Z ∞
E (X ) =
xf (x) dx =
xe −x dx
−∞
Z ∞ 0
Z ∞
∞
−x −x
= −xe 0 +
e dx =
e −x dx = 1.
f (x) =
0
0
Binomial and Hypergeometric Distribution
1. If X ∼ B(n, p), then for k = 0, 1, 2, . . . , n
n k
p(k) =
p (1 − p)n−k ,
k
and
E (X ) = np.
2. If X ∼ H(n, K , N), then for k = 0, 1, 2, . . . , n
K N−K
p(k) =
k
n−k
N
n
and
E (X ) = n
K
.
N
,
Poisson Random Variable
Definition: A random variable X with the PMF
p(k) = e −λ
λk
, k = 0, 1, 2, . . .
k!
is called a Poisson random variable with parameter λ > 0. We
write X ∼ Poisson(λ).
The expected value of X is
E (X ) =
∞
X
k=0
= ...
= λ.
ke −λ
λk
k!
Standard Normal Random Variable
Definition: A random variable Z with the PDF
1
2
f (z) = √ e −z /2
2π
is called a standard normal random variable.
Since z 7→ ze −z
2 /2
is an odd function, the expected value of Z is
Z ∞
1
2
E (Z ) =
z √ e −z /2 dz = 0.
2π
−∞
Expected Value of a Function of a Random Variable
Theorem 3.5.3
Let X be a random variable, and let g (X ) be a function of X .
Then,
 X

g (xi )p(xi )
if X is discrete


i
Z
E [g (X )] =
∞


g (x)f (x) dx if X is continuous

−∞
Properties of Expected Values
Let c, d ∈ R and g (X ), g1 (X ), g2 (X ), . . . , gn (X ) be functions of
the random variable X . Then,
1. E (c) = c
2. E (cg (X ) + d) = cE (g (X )) + d
!
n
n
X
X
3. E
gi (X ) =
E (gi (X ))
i=1
i=1
Normal Random Variable
Definition: A random variable X is called a normal random
variable with parameters µ ∈ R and σ > 0 if
X = σZ + µ,
where Z is a standard normal random variable. We write
X ∼ N(µ, σ 2 ).
The expected value of X is
E (X ) = E (σZ + µ) = σE (Z ) + µ = µ.
Example 2
The speed S of a molecule in a perfect gas has a density function
given by
r
a3 2 −as 2
s e
f (s) = 4
,
π
where s ≥ 0 and a > 0 is a constant. The kinetic energy is
1
W = mS 2 .
2
Thus, the expected value for the kinetic energy is
r
Z ∞
1 2
a3 2 −as 2
E (W ) =
ms 4
s e
ds
2
π
0
= ...
3m
=
.
4a
Median and Quantiles
Definition 3.5.2
Suppose X is a continuous random variable and F (x) is its CDF.
Then:
I
The median of X is the value m so that
F (m) = 0.5.
I
The q-quantile of X is the value xq so that
F (xq ) = q,
where 0 < q < 1.
Thus,
m = x0.5 .
Exponential Random Variable
Definition: A random variable X is called an exponential
random variable with parameters λ > 0 if it has the PDF
f (x) = λe −λx
for x ≥ 0. We write X ∼ E (λ). The expected value of X is
Z ∞
1
E (X ) =
xλe −λx dx = .
λ
0
The CDF is
x
Z
F (x) =
λe −λt dt = 1 − e −λx .
0
Thus, the median is obtained by solving the equation
1 − e −λx = 0.5 for x. This gives
m=
log 2
1
< = E (X ).
λ
λ
Practice Problems for Section 3.5
I
p.149: 3.5.9, 3.5.17, 3.5.27;
I
p.155: 3.5.31, 3.5.33.