0.HUST ASB Intro
0.HUST ASB Intro
Introduction
evans.gouno@univ-ubs.fr
2022–2023
1 Random variables
2 Distribution Functions
3 Exponential
4 Gamma
5 Normal
Random variables
Definition
A random variable (r.v.) X is a mapping that assigns a real number to each
outcome:
X : Ω −→ V
ω 7−→ x = X (ω)
• discrete:
number of failures of a system component in a given time period,
• continue:
times to failure of a device,
measurement errors.
Universe:
Ω = Tail, Head
We have:
X
P(X = x ) ∈ [0, 1], ∀x ∈ V et P(X = x ) = 1.
x ∈V
Ω = R+ .
Distribution function
Definition
The cumulative distribution function is the function FX : R −→ [0, 1] defined
by
FX (x ) = P(X 6 x ).
fX (x ) = F ′ (x ).
We have:
Z Z
FX (x ) = P(X 6 x ) = fX (y )dy and fX (y )dy = 1.
{y 6x } V
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
1
Moment generating function: MX (t) = .
1 − θt
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
1
Moment generating function: MX (t) = .
1 − θt
Expectation:
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
1
Moment generating function: MX (t) = .
1 − θt
Expectation: E (X ) = θ.
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
1
Moment generating function: MX (t) = .
1 − θt
Expectation: E (X ) = θ.
Variance:
Exponential distribution
Definition
A r.v. X has an exponential distribution with parameter θ > 0 iff its p.d.f. has
the form:
1 x
n o
f (x | θ) = exp − , x ∈ R+ .
θ θ
Notation: X ∼ E (θ)
1
Moment generating function: MX (t) = .
1 − θt
Expectation: E (X ) = θ.
Variance: Var (X ) = θ2 .
Gamma distribution
Definition
A r.v. X has a gamma distribution with parameter α, β > 0 iff its p.d.f. has
the form:
βα
f (x | α, β) = x α−1 e −βx , x ∈ R+
Γ(α)
Z +∞
where Γ(.) is the gamma function defined by: Γ(α) = u α−1 e −u du.
0
Notation: X ∼ G (α, β)
Expectation: E (X ) = α/β.
Variance: Var (X ) = α/β 2 .
α
β
Moment generating function: MX (t) = .
β−t
Definition
A r.v. X has a normal with parameters (µ, σ 2 ) µ > 0, σ 2 > 0 iff its p.d.f. is:
2 1 (x − µ)2
f (x | µ, σ ) = √ exp − , x ∈ R.
2πσ 2σ 2
Notation: X ∼ N (µ, σ 2 ).
Definition
A r.v. X has a normal with parameters (µ, σ 2 ) µ > 0, σ 2 > 0 iff its p.d.f. is:
2 1 (x − µ)2
f (x | µ, σ ) = √ exp − , x ∈ R.
2πσ 2σ 2
Notation: X ∼ N (µ, σ 2 ).
(x −µ)2
1 −
fX (x ) = √ e 2σ 2
2πσ
µ = 0, σ 2 = 1
2
µ = 2, σ = 5
µ = 4, σ 2 = 2
0 x
Normal distribution
Normal distribution
Normal distribution
Normal distribution
Proposition
X −µ
X ∼ N (µ, σ 2 ) ⇐⇒ Z =
∼ N (0, 1) .
σ
Normal distribution
Expectation
Let Z ∼ N (0, 1), then E (Z ) = 0.
Let X = µ + σZ , X ∼ N (µ, σ 2 ) and E (X ) = µ.
Variance
Var (Z ) = E (Z 2 ) − (EZ )2 .
It can be shown that: E (Z 2 ) = 1. Thus: Var (Z ) = 1.
Var (X ) = Var (µ + σZ ) = σ 2 Var (Z ) = σ 2 .
Conclusion
If X ∼ N (µ, σ 2 ), then E (X ) = µ and Var (X ) = σ 2 .
Normal distribution
Proposition
Normal distribution
Proposition
1 −x 2 /2
φ(x ) = √ e
2π
−z 0 z x
Normal distribution
Proposition
Let Z ∼ N (0, 1), P(|Z | 6 a) = 2Φ(a) − 1.
1 −x 2 /2
φ(x ) = √ e
2π
−a a x
Normal distribution
Normal distribution
Exercises
I. Let X be the cost of natural gas per metric cubic foot (MCF) for customers.
Suppose that X is normally distributed with a mean of $ 6.00 and a standard
deviation of $ 1.20.
1 What is the probability that the cost of natural gas per MCF for a
particular customer is between $ 7.60 and $ 8.00?
2 What is the median cost per MCF for natural gas?
3 What are the upper and lower quartiles for the cost per MCF of natural
gas?
II. Let X be the length of life of a type of automatic washer.
Suppose that this random variable is approximately normally distributed with
mean 3.1 years and standard deviation of 1.2 years.
If this type of washer is guaranteed for one year, what fraction of original sales
will require replacement?
The statistic X n
CLT
Simulation:
Choose a value for p e.g. p = 0.8.
Draw 100 realizations of a Bernoulli with parameter 0.8.
Compute X n , the mean of the 100 values.
Reproduce this experiment 1000 times to obtain a sample of X n .
build the histogram to investigate the distribution of the variables
√ p
n (X n − p)/ p(1 − p) .
Density
−3 −2 −1 0 1 2 3
R code
Exercise:
Exercise:
Chi-square distribution
Chi-square distribution
The summation of the square of n independent standard normal r.v.’s follows a
Chi-square distribution with n degrees of freedom (d.o.f.).
Chi-square distribution
The summation of the square of n independent standard normal r.v.’s follows a
Chi-square distribution with n degrees of freedom (d.o.f.).
Definition
A r.v. X has a chi-square distribution with n degrees of freedom (d.o.f.) iff its
p.d.f has the form:
2−n/2 n/2−1 −x /2
fX (x ) = x e , x ∈ R+ , n ∈ N∗ .
Γ(n/2)
Chi-square distribution
The summation of the square of n independent standard normal r.v.’s follows a
Chi-square distribution with n degrees of freedom (d.o.f.).
Definition
A r.v. X has a chi-square distribution with n degrees of freedom (d.o.f.) iff its
p.d.f has the form:
2−n/2 n/2−1 −x /2
fX (x ) = x e , x ∈ R+ , n ∈ N∗ .
Γ(n/2)
Chi-square distribution
0.5 n=2
n=5
0.4
n=10
0.3
Density
0.2
0.1
0.0
0 5 10 15
Notation: Z ∼ T (n).
0.4
n=1
n=5
0.3
n=10
Density
0.2
0.1
0.0
−6 −4 −2 0 2 4 6
Fisher distribution
Let Y1 ∼ χ2 (n1 ) and Y2 ∼ χ2 (n2 ), be two independent r.v.’s, then
Y1 /n1
Y =
Y2 /n2
follows a Fisher distribution with (n1 , n2 ) degrees of freedom.
Notation: Y ∼ F (n1 , n2 ).
0.8
n2=20
n2=8
n2=2
0.6
Density
0.4
0.2
0.0
0 1 2 3 4 5 6