Lecture 3
Lecture 3
Lecture 3
Random variables
Probability mass function (PMF)
Cummulative distribution function (CDF)
Expectation and Variance
Binomial distribution
Poisson distribution
Geometric distribution
Negative binomial distribution
Hypergeometric distribution
Example
Example
Definition
Example
A store carries flash drives with either 1 GB, 2 GB, 4 GB, 8 GB, or 16 GB
of memory. The accompanying table gives the distribution of of memory in
a purchased drive:
x 1 2 4 8 16
p(x) 0.05 0.10 0.35 0.40 0.10
Proposition
P(a ≤ X ≤ b) = F (b) − F (a − 1)
Example
and
P(X = 3) = F (3) − F (2) = 0.05.
Definition
Let X be a discrete random variable with PMF pX (x). The expecta-
tion value of X is defined by
X
E (X ) = xpX (x).
x
Properties of expectations
p
Standard deviation: σ(X ) = Var (X )
Properties
1. Var (X ) ≥ 0
2. Var (αX + β) = α2 Var (X )
A store carries flash drives with either 1 GB, 2 GB, 4 GB, 8 GB, or 16 GB
of memory. The accompanying table gives the distribution of of memory in
a purchased drive:
x 1 2 4 8 16
p(x) 0.05 0.10 0.35 0.40 0.10
Then, we have
and
∞ ∞ ∞
X X
k−1
X 1
pX (k) = (1 − p) p=p (1 − p)k−1 = p =1
1 − (1 − p)
k=1 k=1 k=1
1 1−p
Notation: X ∼ Geo(p) and EX = , Var (X ) =
p p2
Nguyễn Ngọc Tứ Lecture 3 2023-2024 31 / 42
The geometric distribution - Exercise
1. When Anh plays chess against his favorite computer program, he wins
with probability 0.60. Assume independence. Find the probability that
a. Anh’s first win happens until he plays his third game.
b. Anh’s fifth win happens until he plays his eighth game.
Tossing a coin until it comes up k heads. How long must we wait for
the game to end?
X = number of coin tosses until the kth head is observed.
Assume independent tosses, 0 < P(H) = p < 1.
The trial is repeated until we attain k successes (heads).
n trails:
* k − 1 successes in the first n − 1 trails
* the nth trial was a success.
By independence,
k−1 k−1 k−1 k
P(X = n) = Cn−1 p (1 − p)n−k p = Cn−1 p (1 − p)n−k , n ≥ k.
Notation: X ∼ NB(n; k, p)
k(1 − p) k(1 − p)
Notation: Y ∼ NB(y ; k, p) and EY = , Var (Y ) =
p p2
75. Suppose that P(male birth) = 0.49. A couple wishes to have exactly two female
children in their family. They will have children until this condition is fulfilled.
a. What is the probability that the family has y male children?
b. What is the probability that the family has four children?
c. What is the probability that the family has at most four children?
d. How many male children would you expect this family to have? How many
children would you expect this family to have?
Solution.
Y = the number of male children before a couple wishes to have exactly two female
children in their family
Nguyễn Ngọc Tứ Lecture 3 2023-2024 35 / 42
The negative binomial distribution - Example
Proposition
C52 C20
8
a) P(X = 2) = h(2; 10, 5, 25) = = 0.385
C 10
P25 2
b) P(X ≤ 2) = P(X = 0, 1, 2) = x=0 h(x; 10, 5, 25)
= 0.699
5 15 5 5
c) EX = 10 · = 2, V (X ) = · 10 · 1− =1
25 24 25 25