4-Discrete Random Variables
4-Discrete Random Variables
4 / 38
Example
5 / 38
w HHH HHT HTH HTT THH THT TTH TTT
X(w) 0 1 1 2 1 2 2 3
6 / 38
Example
• Tossing a fair coin until a Head appear.
The sample space is
Ω = {H, TH, TTH, TTTH, . . . }
• X: the number of tossing
• Range(X) = {1, 2, 3, . . . ...}
• X = 1 if and only if the first coin turns head
so P(X = 1) = P(first coin turns H) = 0.5
7 / 38
Question
Evaluate
P(X = 2)
and
P(1 < X ≤ 4)
8 / 38
Types of RV
Based on range of the random variable X
• If the set of possible values of X is finite or
countable like {0, 1, 2, 3}, {1, 2, . . . } then
X is called discrete RV
• If the set of possible values of X is
uncountable (like the interval [a, b],
[a, ∞)) then X is called continuous RV
9 / 38
Probability associated with a
random variable X
F(b) = P(X ≤ b)
P(X ≤ b) = F(b)
P(X < b) = lim P(X ≤ b − h) = lim F(x) = F(b−)
h→0+ x→b−
P(X > a) = 1 − P(X ≤ a) = 1 − F(a)
P(a < X ≤ b) = P(X ≤ b) − P(X ≤ a) = F(b) − F(a)
P(a ≤ X ≤ b) = F(b) − F(a−)
P(a < X < b) = F(b−) − F(a)
12 / 38
Discrete Random Variables
Random variable can take on at most count-
able number of possible values
Range(X) = {x1, x2, . . . }
13 / 38
Probability mass function
14 / 38
Example
Roll two fair dice then the sample space is
X(i, j) = max(i, j)
15 / 38
Table values of X
16 / 38
All possible values of X is
Range(X) = {1, 2, 3, 4, 5, 6}
17 / 38
X = 1 if and only if the outcome is (1, 1). So
18 / 38
Similar, we have P(X = 3) = 5/36, P(X = 4) =
7/36, P(X = 5) = 9/36, P(X = 6) = 11/36.
19 / 38
Similar, we have P(X = 3) = 5/36, P(X = 4) =
7/36, P(X = 5) = 9/36, P(X = 6) = 11/36.
19 / 38
Illustration to calculate pmf
2 P(−1 ≤ X ≤ 1)
22 / 38
Practice
23 / 38
Practice
24 / 38
Properties of pmf
• X is discrete
→ Range(X) = {x1, . . . , xn . . . }
• p(xi) = P(X = Xxi) ≥ 0
• P(X ∈ A) = p(xi)
xi ∈A
• Normalization
∞
X
P(−∞ < X < ∞) = 1 ⇒ p(xi) = 1
i=1 25 / 38
Properties of pmf
• X is discrete
→ Range(X) = {x1, . . . , xn . . . }
• p(xi) = P(X = Xxi) ≥ 0
• P(X ∈ A) = p(xi)
xi ∈A
• Normalization
∞
X
P(−∞ < X < ∞) = 1 ⇒ p(xi) = 1
i=1 25 / 38
Properties of pmf
• X is discrete
→ Range(X) = {x1, . . . , xn . . . }
• p(xi) = P(X = Xxi) ≥ 0
• P(X ∈ A) = p(xi)
xi ∈A
• Normalization
∞
X
P(−∞ < X < ∞) = 1 ⇒ p(xi) = 1
i=1 25 / 38
Example
Suppose X has 3 values 1, 2, 3 and
1 1
p(1) = , p(2) =
2 3
then what is p(3)?
27 / 38
Practice
28 / 38
Cumulative distribution function
(cdf)
Probability that X does not exceed a given value
X
F(b) = P(X ≤ b) = P(X = xi)
xi ≤b
29 / 38
Example
Suppose that pmf of X is given by p(1) = 21 , p(2) =
1 1
3 , p(3) = 6 then
31 / 38
Graph of F(x)
Remark
Jump size at 1 is P(X = 1), ... 32 / 38
Example
Determine the p.m.f of X from the c.d.f
0 if x < −2
0.2 if − 2 ≤ x < 0
F(x) =
0.7 if 0 ≤ x < 2
if x ≥ 2
1
33 / 38
Solution
Graph of F(x) is
35 / 38
Properties of cdf of a discrete RV
36 / 38
Practice
c.d.f of discrete random variable X is given by
0
if x < 1
F(x) = 0.7 if 1 ≤ x < 3
1 if x ≥ 3
Compute
1 P(X ≤ 2) and P(X > 2)
2 P(1 ≤ X ≤ 2)
37 / 38
Keywords
• pmf of a discrete RV with range {x1 , . . . , xn , . . . }
p(xi ) = P(X = xi )
• 0 ≤ p(xi) ≤ 1
•
P
p(xi) = 1
• P(X ∈ A) = x ∈A p(xi)
P
i
• cdf X
F(x) = P(X ≤ x) = p(xi )
xi ≤x
38 / 38