3.4 The Expected Value of a Function of a Random Variable
Often times in the real world, we wish to look at a function of our variables
–
or transform them.
Changing feet into meters, Fahrenheit into centigrade, etc. In this section we seek to determine the
expected value of this new variable. If we transform a random variable
X
by some function
(
)
Y
g X
, it
should be clear that
Y
is a random variable.
Suppose that we have a discrete random variable
X
with pmf given below. We now let
Y
X
2
5
.
What is the expected value of
Y
?
By definition
[ ]
( )
Y
E Y
yf
y
. So to determine the
[ ]
E Y
, we will find
( )
Y
f
y
and then compute
[ ]
( )
Y
E Y
yf
y
.
So,
Y
E Y
yf
y
1
2
54
[ ]
( )
(1
3
7
9
11
13)
5
8
8
8
.
We also not that,
Y
X
X
x
x
Support X
E Y
yf
y
x
f
x
g x f
x
4
2
(
)
[ ]
( )
(2
5)
( )
( )
( )
Theorem:
Given a discrete random variable
X
and the linear transformation
Y
g X
aX
b
(
)
,
X
x
Support X
E Y
E g X
g x f
x
(
)
[ ]
[ (
)]
( )
( )
.
Proof:
Since
Y
g X
aX
b
(
)
is a 1 to 1 function, this will be rather straight forward.
Y
X
E Y
yf
y
ax
b P Y
ax
b
ax
b P X
x
g x f
x
[ ]
( )
(
) (
)
(
) (
)
( )
( )
Note that the argument above would work with any function
(
)
Y
g X
that is 1 to 1.
Theorem:
Given a discrete random variable
X
and the linear transformation
Y
g X
aX
b
(
)
,
E Y
E aX
b
aE X
b
[ ]
[
]
[
]
.
Proof:
[
]
(
) ( )
(
) ( )
( ) ( )
E aX
b
ax
b f x
ax f x
b f x
( )
( )
[
]
X
a
xf x
b
f x
aE X
b
a
b
Thus, the expected value of a random variable is a
linear operator
.
x
( )
X
f
x
y
( )
Y
f
y
-2
1/8
1
1/8
-1
1/8
Y
X
2
5
3
1/8
0
2/8
5
2/8
1
1/8
7
1/8
2
1/8
9
1/8
3
1/8
11
1/8
4
1/8
13
1/8

Example:
If a random variable
X
has mean
4
, determine the mean of
Y
, where
2
3
Y
X
2
3
11
Y
X
or
[ ]
[2
3]
2 [
]
3
11
E Y
E
X
E X
If we think about this last example, it seems like a no brainer that it is true. Suppose that the average
score is 4. I now double everybody’s score. The new average is 8. I now add 3 to everybody’s already
doubled score. The new average is 11.
In this linear case, notice if we consider
(
)
2
3
Y
g X
X
, then
[ ]
[ (
)]
2
3
( [
])
E Y
E g X
X
g E X
. We
would naturally wonder if that statement always holds. That is, will it always be true that If
(
)
Y
g X
then
[ ]
( [
])
E Y
g E X
. The answer is no, this is not always true.
How will we show this?
Suppose that we have a discrete random variable
X
with pmf given below. The expected value of X can
be determined by
xf x
( )
7 / 8
.
We now let
2
Y
X
. What is the expected value of
Y
? By definition
[ ]
( )
Y
E Y
yf
y
. So to determine the
[ ]
E Y
, we will find
( )
Y
f
y
and then compute
[ ]
( )
Y
E Y
yf
y
.
[
]
7 / 8
E X
[ ]
35/ 8
E Y
We note that
E
X
E Y