Random Variables, Cumulative Distribution Functions, Probability Mass Function
Random Variables, Cumulative Distribution Functions, Probability Mass Function
Variables
LECTURE 4
Random Variables, Cumulative Distribution Functions, Probability Mass Function
Content
A discrete random variable can assume a countable number of values; i.e. the
range is either finite or countably infinite.
Number of sales
Number of calls
Shares of stock
People in line
Mistakes per page
A continuous random variable can assume any value along a given interval of a
number line; i.e. the range is uncountably infinite number of values.
Length
Depth
Volume
Time
Weight
Cumulative Distribution Functions
If X is continuous, then FX
has a continuously varying
form.
Example: Tossing a fair coin 3 times
If X is the r.v. giving the number of heads obtained, find and sketch the CDF
FX(x) of X
Solution: S = {HHH,HHT,HTH,THH,HTT,THT,TTH,TTT} Range of X={0,1,2,3}
P(X=0) = 1/8, P(X=1) = 3/8, P(X=2) = 3/8, P(X=3) = 1/8
FX(─1) = P(X ≤ ─1) = P(X< 0) = P(Ø) = 0 Ø
FX(0) = P(X ≤ 0) = 1/8 {TTT}
FX(1) = P(X ≤ 1) = 4/8=1/2 {HTT,THT,TTH,TTT}
FX(2) = P(X ≤ 2) = 7/8 {HHT,HTH,THH,HTT,THT,TTH,TTT}
FX(3) = P(X ≤ 3) = 8/8=1 S
FX(4) = P(X ≤ 4)= P(X ≤ 3) = 1
Example: Tossing a fair coin 3 times
FX(-1) = P(X ≤ -1) = P(X< 0) = P(Ø) = 0
FX(0) = P(X ≤ 0) = 1/8
FX(1) = P(X ≤ 1) = 4/8=1/2
FX(2) = P(X ≤ 2) = 7/8
FX(3) = P(X ≤ 3) = 8/8=1
FX(4) = P(X ≤ 4)= P(X ≤ 3) = 1
Determination of Probabilities from
the Distribution Function
Example: Four-letter alphabet
An information source generates symbols at random from a four-letter alphabet {a, b, c, d}
with probabilities P(a) =1/2, P(b) =1/4, and P(c) = P(d) =1/8. A coding scheme encodes
these symbols into binary codes as follows:
a 0
b 10
c 110
d 111
Let X be the r.v. denoting the length of the code-that is, the number of binary symbols (bits)
(a) What is the range of X?
(b) Assuming that the generations of symbols are independent, sketch the CDF FX(x) of X
and specify the type of X.
(c) Find P(X ≤1), P(1 <X ≤ 2), P(X > 1), and P(l ≤ X ≤ 2).
Solution: Four-letter alphabet
= 1/2+3/4-1/2 = 3/4.
Discrete Random Variables and
Probability Mass Functions (PMFs)
Let X be a discrete random variable. If x is any
possible value of X, then the probability mass of x,
denoted pX(x), is the probability of the event (X = x):
pX(x)= P(X = x)
Solution
Solution: