Professional Documents
Culture Documents
Random Variables
Associated with each discrete random variable X is a probability mass function (pmf) that gives the probability that X equals x:
p(x) = P ({X = x}) = P ({all s S : X(s) = x}).
Example 1 Consider whether the next customer buying a laptop at a university bookstore buys a Mac or a PC model. Let
10 11 12
1
36
2
36
3
36
4
36
5
36
6
36
5
36
4
36
3
36
2
36
1
36
It is often instructive to present the probability mass function in a graphical format plotting p(xi ) on the y-axis against xi on the x-axis.
0.16
0.12
0.08
0.04
10
12
C2,i1
, i = 3, , 20.
C3,20
0.10
0.05
0.00
0.15
This equation follows because the number of selections that result in the
event {X = i} is just the number of selections that result in the ball numbered i and two of the balls numbered 1 through i 1 being chosen.
10
15
20
P
sample space that considers values of X, we have that
P (X = xi ) = 1.
i=1
[
= P ( {X = xi })
=
i=1
P (X = xi ).
i=1
P {X = n} = P {(T, T, . . . , T , T )} = (1 p)n1 p
| {z }
n1
Expected Value
A simple fact:
E(X + Y ) = E(X) + E(Y ).
Example 7 Consider the experiment of rolling a die. Let X be the number
on the face.
Compute E(X).
Consider rolling a pair of dice. Let Y be the sum of the numbers.
Compute E(Y ).
Suppose we are given a discrete random variable X along with its pmf and
that we want to compute the expected value of some function of X, say
g(X).
One approach is to directly determine the pmf of g(X).
Example 9 Let X denote a random variable that takes on the values
1, 0, 1 with respective probabilities
P (X = 1) = .2, P (X = 0) = .5, P (X = 1) = .3
Compute E(X 2 ).
10
= E[g(X)]
Corollary 1 (The Rule of expected value.) If a and b are constants,
then E(aX + b) = aE(X) + b.
Proof of Corollary:
E(aX + b) =
X
(ax + b) p(x)
x
= a
x p(x) + b
= aE(X) + b.
11
X
x
p(x)
12
Variance
Another useful summary of a random variables pmf besides its central tendency is its spread. This is a very important concept in real life. For
example, in the quality control of the lifetimes of a hard disk, we not only
want the lifetime of a hard disk is long, but also want the lifetimes not to be
too variable. Another example is in finance where investors not only want
the investments with good returns (i.e., have a high expected value) but
also want the investment not to be too risky (i.e., have a low spread).
A commonly used measure of spread is the variance of a random variable,
which is the expected squared deviation of the random variable from its
expected value. Specifically, let X have pmf p(x) and expected value ,
2
then the variance of X, denoted by V (X), or just X
, is
V (X) = E[(X )2 ]
X
=
(x )2 p(x).
D
13
Suppose that the rate of return on stock A takes on the values of 30%,
10% and 10% with respective probabilities 0.25, 0.50 and 0.25 and on
stock B the values of 50%, 10% and 30% with the same probabilities
0.25, 0.50 and 0.25. Each stock then has the expected rate of return of
10%. Obviously stock A has less spread in its rate of return. Compare
V (A) and V (B).
14
x
X
x
X
(x2 2x + 2 )p(x)
2
x p(x) 2
x
2
xp(x) +
x
2
p(x)
= E(X ) 2 +
= E(X 2 ) 2
= E(X 2 ) [E(X)]2 .
15
16