New Chapter 2 XSTK
New Chapter 2 XSTK
New Chapter 2 XSTK
Random variable
Date 24/12/2023
1 Concepts
5 Exercises
X ∈ {0; 1; 2; . . .}.
Ω = (0 day → 7 days ) .
Let X be the insect’s lifespan (days). Then the set of values of X is
X ∈ (0; 7) .
X ∈ {x1 , x2 , . . . , xn }.
X ∈ (m1 ; m2 ) or X ∈ [m1 ; m2 ] .
X ∈ {x1 , x2 , . . . , xn }.
2 Step 2: Calculate probabilities
▶ P (X = x1 ) = p1
▶ P (X = x2 ) = p2
▶ ...
▶ P (X = xn ) = pn .
3Step 3: The probability distribution of X is
X x1 x2 . . . xn
P p1 p2 . . . pn
Remark:
1 0 ≤ p ≤ 1 for any i = 1, 2, . . . , n.
i
2 p + p + . . . + p = 1.
1 2 n
Lâm Hoàng Chương (CTU) Chapter 2. Random variable Date 24/12/2023 7 / 53
Ex 4: Consider again the coin example.
1 The set of values of X is
X ∈ {0; 1}.
2 Calculate probabilities
▶ P (X = 0) = 1/2.
▶ P (X = 1) = 1/2.
3 The probability distribution of X is
X 0 1
1 1
P
2 2
Ex 5: A box has 5 blue cards and 3 red cards. Each green card is
rewarded with 5 million VND, while each red card is rewarded with 10
million VND. A person participates in the game as follows: he
randomly selects 3 cards and receives a bonus equal to the total
amount on those 3 cards. Find the probability distribution of the
amount the player is awarded?
Lâm Hoàng Chương (CTU) Chapter 2. Random variable Date 24/12/2023 8 / 53
Solution: Let X be the amount the player is awarded (million VND).
1 The set of values of X is X ∈ {15; 20; 25; 30}.
2 Calculate probabilities
C53 5
▶ P (X = 15) = = .
C83 28
C 2C 1 15
▶ P (X = 20) = 5 3 3 = .
C8 28
C51 C32 15
▶ P (X = 25) = = .
C83 56
C33 1
▶ P (X = 30) = 3 = .
C8 56
3 The probability distribution of X is
X 15 20 25 30
5 15 15 1
P
28 28 56 56
Remark:
5 15 15 1
+ + + = 1.
28 28 56 56
X ∈ (m1 ; m2 ) or X ∈ [m1 ; m2 ] .
2 Step 2: The probability distribution of X is the function f (x) s.t
Z b
P (a < X < b) = P (a ≤ X ≤ b) = f (x)dx,
a
where f (x) is the function that satisfies f (x) ≥ 0 for all x ∈ R and
Z +∞ Z m2
f (x)dx = 1 ⇔ f (x)dx = 1.
−∞ m1
3 Step 3: The function f (x) is called the probability density of X.
Lâm Hoàng Chương (CTU) Chapter 2. Random variable Date 24/12/2023 10 / 53
The probability density of X
The graph of function f (x) is
X x1 x2 . . . xn
P p1 p2 . . . pn
then we have
n
X
E(X) = x1 p1 + x2 p2 + . . . + xn pn = xi pi .
i=1
For any k = 1, 2, 3, . . .
n
X
E(X k ) = xk1 p1 + xk2 p2 + . . . + xkn pn = xki pi .
i=1
or we can rewrite
V (X) = E(X 2 ) − [E(X)]2 .
Ex 11: Let X be a random variable with the probability distribution
X 0 1 2
P 0, 3 0, 5 0, 2
3
Then we can deduce that M od(X) = since function f (x) reaches its
2
maximum value at x = 3/2.
Lâm Hoàng Chương (CTU) Chapter 2. Random variable Date 24/12/2023 25 / 53
Lesson 4. Some important probability
distributions
4.1 Binomial distribution (Phân phối nhị thức)
Consider again the Bernoulli model consisting of n identical,
independent experiments and at each experiment, P (A) = p remains
constant.
We find the probability distribution of the number of times A occurs in
n times of performing a random experiment.
Let X be the number of times A occurs in n times.
1 X ∈ {0, 1, 2, . . . , n}.
2 Calculate probabilities
P (X = 0) = Cn0 p0 (1 − p)n
P (X = 1) = Cn1 p1 (1 − p)n−1
...
P (X = n) = Cnn pn (1 − p)0 .
In generally: P (X = k) = Cnk pk (1 − p)n−k với k = 0, 1, 2, . . . , n.
3 The probability distribution of X is
(x − µ)2
1 −
f (x) = √ e 2σ 2 , (σ > 0)
σ 2π
then X is called the normal distribution.
It is denoted by X ∼ N (µ; σ 2 ).
2 V (X) = σ 2 .
3 σ(X) = σ.
4 M od(X) = µ.
X −µ
Remark: If X ∼ N (µ; σ 2 ) then ∼ N (0; 1).
σ
Lâm Hoàng Chương (CTU) Chapter 2. Random variable Date 24/12/2023 35 / 53
Laplace function
Let U ∼ N (0; 1). Laplace function is defined by
Z z
1 2
φ(z) = P (0 < U < z) = √ e−x /2 dx.
2π 0
The graph of function φ
φ(−z) = −φ(z).
φ(z) ≈ 0, 5 với mọi z ≥ 5.
Ex: Calculate φ(−6) = −φ(6) ≈ −0, 5.
X ∼ N (100; 152 )
P (X = k) = Cnk pk (1 − p)n−k , k = 1, 2, . . . , n.
X ≈ N (np; npq).
P (U < zα ) = α.
a. Tìm hằng số k.
b. Tính xác suất để nhu cầu về loại hàng A không vượt quá 12
ngàn sản phẩm trong một năm.
c. Tính nhu cầu trung bình hằng năm về loại hàng A.