Professional Documents
Culture Documents
10.07.2020
Anh Tuan Tran (Ph.D.) & Thinh Tien Nguyen (Ph.D.)
1. Random variables
Random variables
Definition:
X: Ω →
is a random variable.
Random variables
Example:
X T, T, T = 0.
X H, T, H = X H, H, T = 2.
X H, H, H = 3.
Random variables
Example:
Roll 2 dice.
X: sum of the numbers that appeared.
X 2,5 = 7.
X 1,6 = 7.
X 6,6 = 12.
Random variables
Example:
X Ann = 37.5oC.
X John = 36.2oC.
X Tom = 37.0oC.
Discrete random variables
Definition:
Example:
Example:
Definition:
p xi ≔ P X = xi ∀i = 1,2,3, …
Mass function
Example:
Roll 2 dice.
X: sum of the numbers that appeared.
1
p 2 = P X = 2 = P 1,1 = .
36
2 1
p 11 = P X = 11 = P 5,6 , (6,5) = = .
36 18
Mass function
Properties:
p xi ≥ 0 ∀i = 1,2,3, …
p xi = 1.
i
Mass function
Example:
𝐗 𝟎 𝟏 𝟐 𝟑
1 3 3 1
𝐩
8 8 8 8
Expectation
Definition:
E X ≔ xi p xi .
i
Expectation
Example:
Flip a coin three times.
X: number of Heads.
𝐗 𝟎 𝟏 𝟐 𝟑
1 3 3 1
𝐩
8 8 8 8
1 3 3 1
E X = 0 ⋅ + 1 ⋅ + 2 ⋅ + 3 ⋅ = 1.5.
8 8 8 8
Expectation
Example:
Roll 2 dice.
X: sum of the numbers that appeared.
1 1 1 1 5 1
E X =2⋅ +3⋅ +4⋅ +5⋅ +6⋅ +7⋅ +8
36 18 12 9 36 6
5 1 1 1 1
⋅ + 9 ⋅ + 10 ⋅ + 11 ⋅ + 12 ⋅ = 7.
36 9 12 18 36
Expectation
Properties:
Let g: → , then
Eg X = g xi p xi .
i
As a consequence,
E aX + b = aE X + b.
Expectation
Properties (cont’):
E X + Y = E X + E(Y).
E XY = E X E(Y) if X, Y are independent.
Variance
Definition:
𝐗 𝟎 𝟏 𝟐 𝟑
1 3 3 1
𝐩
8 8 8 8
D X = E X − 1.5 2
2
1 2
3 2
3 2
1
= 1.5 ⋅ + 0.5 ⋅ + 0.5 ⋅ + 1.5 ⋅ = 0.75.
8 8 8 8
Variance
Properties:
D X = E X2 − E X 2.
D X ≥ 0. The equality occurs only if X = const.
Corollary, E X 2 ≥ E X 2 . The equality occurs only if
X = const.
𝐗 𝟎 𝟏 𝟐 𝟑
1 3 3 1
𝐩
8 8 8 8
1 3 3 1
E(X 2 )
= 02 2 2 2
⋅ + 1 ⋅ + 2 ⋅ + 3 ⋅ = 3.
8 8 8 8
D X = E X 2 − E X 2 = 3 − 1.52 = 0.75.
𝜎 𝑋 = 0.75 = 0.866025.
Variance
Properties (cont’):
D aX + b = a2 D X .
D X + Y = D X + D(Y) if X, Y are independent.
Binomial distribution
Definition:
Then X~Binom n, p .
Binomial distribution
Example:
Proposition:
n k n−k
1. P X=k = p 1−p for k = 0,1, … , n.
k
2. E X = np.
3. D X = np 1 − p .
Binomial distribution
Example:
Let X be the number of defective screws in each
package.
10
1. P X=2 = 0.12 1 − 0.1 10−2 = 0.19371.
2
2. E X = 10.0.1 = 1.
3. D X = 10.0.1. 1 − 0.1 = 0.9.
Poisson distribution
Definition:
Then X~Poi λ if
e−λ λk
P X=k =
k!
for k = 0,1,2, …
Poisson distribution
Proposition:
Examples:
Property:
E X = D X = λ.
Poisson distribution
Example:
e−1.25 1.25 5
P X=5 = ≈ 0.72%.
5!
Geometric distribution
Definition:
Example:
Proposition:
1. E X = 6.
5
2. D X = ⋅ 36 = 30.
6
3. The chance that the 7th roll gives the first 3 is
6
5 1
P X=7 = ⋅ ≈ 0.056.
6 6
Cummulative distribution function
Definition:
F: → 0,1
such that
F x ≔P X≤x .
Cummulative distribution function
Example:
Flip a coin three times.
X: number of Heads.
𝐗 𝟎 𝟏 𝟐 𝟑
1 3 3 1
𝐩
8 8 8 8
1 3 1
F 1 =P X≤1 =P X=0 +P X=1 = + = .
8 8 2
Cummulative distribution function
Properties:
F is non-decreasing.
lim F x = 0 on the left.
x→−∞
lim F x = 1 on the right.
x→+∞
P a < X ≤ b = P X ≤ b − P X ≤ a = F b − F(a) for
a < b.
Cummulative distribution function
Cummulative distribution of discrete random variable X:
Cummulative distribution function
Example:
0 if x < 0,
x
if 0 ≤ x < 1,
2
2
F x = if 1 ≤ x < 2,
3
11
if 2 ≤ x < 3,
12
1 if x ≥ 3.
11 1
P X=3 =F 3 −F 2 =1− = .
12 12
3. Continuous random variables
Density function
Example:
X Ann = 37.5oC.
X John = 36.2oC.
X Tom = 37.0oC.
P X = 37 =?
Density function
Definition:
Let f: → be an integrable function. We assume
f y ≥ 0 for all y ∈ and
+∞
f y dy = 1.
−∞
Suppose a continuous random variable X has its
cummulative distribution function
x
F x = f y dy.
−∞
Then f is the density function of X.
Cummulative distribution function
Properties:
F is non-decreasing.
lim F x = 0 on the left.
x→−∞
lim F x = 1 on the right.
x→+∞
F is differentiable and F ′ x = f(x).
P a < X ≤ b = P X ≤ b − P X ≤ a = F b − F(a) for
a < b.
P X = a = 0 for any constant a ∈ .
P a<X≤b =P a≤X≤b =P a≤X<b =
P a<X<b .
Density function
Cummulative distribution of continuous random variable X:
Density function
Density function of continuous random variable X. The red
region is P(a ≤ X ≤ b).
Expectation
Definition:
+∞
E X ≔ xf x dx.
−∞
Properties:
Let g: → , then
+∞
Eg X = g(x)f x dx.
−∞
As a consequence,
E aX + b = aE X + b.
Expectation
Properties (cont’):
E X + Y = E X + E(Y).
E XY = E X E(Y) if X, Y are independent.
Variance
Definition:
+∞
2
D X ≔E X−μ = x − μ 2 f x dx.
−∞
Properties:
D X = E X2 − E X 2.
D X ≥ 0. The equality occurs only if X = const.
Corollary, E X 2 ≥ E X 2 . The equality occurs only if
X = const.
Properties (cont’):
D aX + b = a2 D X .
D X + Y = D X + D(Y) if X, Y are independent.
Uniform distribution
Definition:
1
f x = b − a if x ∈ [a, b],
0 otherwise.
Uniform distribution
Uniform distribution
Proposition:
d
1 d−c
P c≤X≤d = dx = .
b−a b−a
c
b
x a+b
μ≔E X = dx = .
b−a 2
a
b
x−μ 2 b−a 2
D X = dx = .
b−a 12
a
Normal distribution
Definition:
1 x−μ 2
−
f x = e 2σ2
σ 2π
for all x ∈ .
Normal distribution
Normal distribution
Theorem:
a−μ b−μ
P a≤X≤b =P ≤Z≤ .
σ σ
Example:
5−6
P X<5 =P Z< ≈ −0.67 = F −0.67
1.5
= 0.2514.
Normal distribution
Proposition:
+∞
x x−μ 2
−
E X = e 2σ2 dx = μ.
σ 2π
−∞
+∞
x−μ 2 x−μ 2
−
D X = e 2σ2 dx = σ2 .
σ 2π
−∞
Normal distribution
Property:
Let
X~Poi λ .
X~N λ, λ .
Chi-square distribution
Definition:
Let n ∈ . X~χ2 n if
1 k
−1 −
x
f x = n x2 e 2
n
22 Γ
2
where
+∞
Proposition:
E X = n.
D X = 2n.
Chi-square distribution
Property:
Let
X~χ2 n .
X−n
~N 0,1 .
2n
Student’s t distribution
Definition:
Y
X≔
Z
n
Density function:
X~T n . Then
n+1 n+1
Γ x2
−
2
2
f x = n 1+ .
nπΓ n
2
Student’s t distribution
Student’s t distribution
Proposition:
E X = 0.
n
for n > 2,
D X = n−2
∞ for 1 < n ≤ 2.
Property:
Let
X~T n .
X~N 0,1 .