Lecture 04 05 Random Variable
Lecture 04 05 Random Variable
Ω
Department of Mathematical Sciences
IIT (BHU) Varanasi
σ
Lecture Outline
2 Random Variable
3 Distribution Function
Definition
Let C be a family of sets of Ω, then the σ-algebra generated by C, denoted
by σ(C), is the intersection of all sigma-algebras containing C.
Definition (continued)
If
then
F.
\
σ(C) =
F ∈I
Key Point: It is the smallest sigma algebra which contains all of the sets
in C.
Example
Consider Ω = [0, 1] and C = {[0, 0.3], [0.5, 1]} = {A1 , A2 }, say. Then
σ(C) = {∅, A1 , A2 , A3 , A1 ∪ A2 , A1 ∪ A3 , A2 ∪ A3 , Ω} ,
C = {{x} : x ∈ Ω}
Definition
Let C = {(a, b) : a < b}. Then σ(C) = BR is the Borel σ-algebra
generated by the family of all open intervals C. The elements of BR are
called Borel sets.
Theorem
The Borel σ-algebra on R is σ(C), the sigma algebra generated by each of
the classes of sets C described below:
1 C1 = {(a, b); a ≤ b}.
2 C2 = {(a, b]; a ≤ b}.
3 C3 = {[a, b); a ≤ b}.
4 C4 = {[a, b]; a ≤ b}.
Remark
Note that the σ-algebra generated by C1 , C2 , C3 and C4 are same.
Definition
Let (X, F1 ) and (Y, F2 ) be two measurable space. A function f : X → Y
is said to be measurable if for every E ∈ F2 ,
f −1 (E) ∈ F1 .
Random Variable
A random variable is a numerical version of the sample space. It assigns a real
value to each and every outcome of the sample space, that is, mathematically, it
is a function X : Ω → R.
Ω
E1
E2
X:Ω→R
E3
| | | | | R
-2 -1 0 1 2
Let X denote the number of tails. Then, X : Ω → R can takes the values
0, 1, 2, 3.
T T T} Ω
HT T
T HT}
TTH
HHT X:Ω→R
HT H}
T HH
HHH}
| | | | | | | R
-3 -2 -1 0 1 2 3
Ω
F
an element of F
λ
| | | ||| R
-2 -1 0 1 2
Random Variable
Let X be defined as a random variable on (Ω, F ) if and only if any one of
the following conditions is satisfied.
1 {ω : X(ω) < λ} ∈ F , for all λ ∈ R.
2 {ω : X(ω) ≥ λ} ∈ F , for all λ ∈ R.
3 {ω : X(ω) > λ} ∈ F , for all λ ∈ R.
Property 1
lim FX (x) = 0 and lim FX (x) = 1.
x→−∞ x→∞
Proof
Let {xn } be a decreasing sequence such that limn→∞ xn = −∞ and
An = {ω : X(ω) ≤ xn } .
Then
lim An = ∅.
n→∞
Therefore,
lim P (An ) = P lim An
n→∞ n→∞
=⇒ lim F (xn ) = P(∅) = 0
xn →∞
=⇒ lim F (x) = 0.
x→−∞
Proof (continued)
Next, let {xn } be a increasing sequence such that limn→∞ xn = ∞ and
An = {ω : X(ω) ≥ xn } .
Then
lim An = ∅.
n→∞
Therefore,
lim P (An ) = P lim An
n→∞ n→∞
=⇒ lim (1 − F (xn )) = P(∅) = 0
xn →∞
=⇒ lim F (x) = 1.
x→∞
Property 2
If x1 < x2 then FX (x1 ) ≤ FX (x2 ) [FX is non-decreasing].
Proof
If x1 < x2 , then
{ω : X(ω) ≤ x1 } ⊂ {ω : X(ω) ≤ x2 }
=⇒ P ({ω : X(ω) ≤ x1 }) ≤ P ({ω : X(ω) ≤ x2 })
=⇒ FX (x1 ) ≤ FX (x2 ) .
Property 3
limh→0 FX (x + h) = FX (x) [FX is right continuous].
Proof
Let {xn } be a decreasing sequence such that limn→∞ xn = x and
An = {ω : x < X(ω) ≤ xn }
T∞
Then, {An } ∈ B, {An } is monotonically decreasing and limn→∞ An = n=1
An = ∅.
Therefore,
lim P (An ) = P lim An
n→∞ n→∞
=⇒ lim [F (xn ) − F (x)] = 0
n→∞
=⇒ lim F (xn ) = F (x)
n→∞
=⇒ lim F (x + h) = F (x).
h→0
Property 4
For any a, b ∈ R with a < b, show that
1 P(a < X ≤ b) = FX (b) − FX (a).
2 P(a < X < b) = FX (b−) − FX (a).
3 P(a ≤ X < b) = FX (b−) − FX (a−).
4 P(a ≤ X ≤ b) = FX (b) − FX (a−).
5 P(X > b) = 1 − FX (b).
Remark
(i) If P(X = a) = P(X = b) = 0 then
P(a ≤ X ≤ b) = P(a < X < b) = P(a ≤ X < b) = P(a < X ≤ b) = FX (b) − FX (a).
Theorem
For any given distribution function F , there exists a unique probability
space and a random variable X defined on the space such that F is a
distribution function of X.
Ω = {(i, j) : 1 ≤ i, j ≤ 6}.
Let X denote the sum of the upward faces. Then the probability mass function (PMF) is:
1 2 3 4
P(X = 2) = , P(X = 3) = , P(X = 4) = , P(X = 5) = ,
36 36 36 36
5 6 5 4
P(X = 6) = , P(X = 7) = , P(X = 8) = , P(X = 9) = ,
36 36 36 36
3 2 1
P(X = 10) = , P(X = 11) = , P(X = 12) = .
36 36 36
1−
x
-4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12
Example
Let the distribution function of a random variable X is given by
0, x < 0,
1
FX (x) = x, 0≤x< 2
,
1, x ≥ 1 .
2
FX (x)
1
0.5
x
-4 -3 -2 -1 0 1 2 3 4
C = {x1 , x2 , x3 , . . .}
Definition
Let (Ω, F , P) be a probability space and X be a discrete random variable
with respect to F , and the range C = {x1 , x2 , . . .} ⊂ R. The real-valued
function pX : R → [0, 1] defined by
PMF Conditions
The probability mass function pX (x) satisfies:
(a) pX (xi ) ≥ 0, for all i = 1, 2, . . .
∞
X
(b) pX (xi ) = 1
i=1
·
·
·
·
·
·
| | | | | x
x1 x2 x3 . . . xixi+1 . . .
Integer-Valued Discrete RV
(ii) Note that if xi = i, that is, C = {1, 2, . . .} then we have
(a) pX (x) ≥ 0, for all x.
X∞
(b) pX (x) = 1.
x=1
⌊x⌋
X
(c) FX (x) = P(X ≤ x) = pX (y), for all x ∈ R, where ⌊x⌋ denotes the
y=1
greatest integer function of x.
(d) pX (x) = FX (x) − FX (x − 1), for all x ∈ R.
Definition
Let X be a random variable on (Ω, F , P) with distribution function FX .
Then X is said to be continuous if FX is absolutely continuous, i.e., there
exists a non-negative function fX (·) such that
Z x
FX (x) = fX (t) dt
−∞
Examples
1 Life of a bulb
2 Weights of people
3 Volume of water in a bottle
Important Properties
1 P(a < X ≤ b) = P(a ≤ X < b) = P(a ≤ X ≤ b) = P(a < X < b)
2 Difference from PMF:
(
2, 0 ≤ x ≤ 21
fX (x) =
0, otherwise
Example
The diameter of an electric cable, say X, is assumed to be a continuous
random variable with pdf
(
6x(1 − x), 0 ≤ x ≤ 1,
fX (x) =
0, otherwise.
Solution (b)
Z 3/4
1 3
P X∈ , = 6(x − x2 )dx
2 4 1/2
11
=
32
CDF
Note that
Z x Z x
FX (x) = fX (t)dt = 6t(1 − t)dt
−∞ 0
" #x !
t2
t3 x2 x3
=6 − =6 − = x2 (3 − 2x)
2 3 0
2 3
Also,
d d
fX (x) = FX (x) = (3x2 − 2x3 ) = 6x − 6x2 = 6x(1 − x), 0≤x≤1
dx dx
Example
A person is travelling to his office everyday by a car. There is a traffic
signal on the way to the office. Let X denote the waiting time at the
traffic signal. Assume there is a green signal at 25% of the cases, that is,
1
P(X = 0) =
4
If red, then X becomes continuous with pdf:
(
3
4, 0<x≤1
fX (x) =
0, otherwise
1
0.75
0.5
0.25
x
0 1
Note that the random variable X is neither discrete nor continuous and it is a mixture of both.
Therefore, the random variable X is of mixed type. Observe that
Z 1
3 3
P(0 < X ≤ 1) = dx =
0
4 4
and
1
P(X = 0) = 4
=⇒ P(0 ≤ X ≤ 1) = 1.
example continued
The CDF of X is given by
0, x < 0,
1,
x = 0,
FX (x) = 4
1 3
4 + 4 x, 0 < x ≤ 1,
1, x ≥ 1.
FX (x)
1
0.75
0.5
0.25
x
-1 0 1
Graphical Features:
The x-axis represents the possible values of the random variable x.
The y-axis shows the density fX (x), not actual probabilities.
The area under the curve between two values a and b gives:
Z b
P (a ≤ X ≤ b) = fX (x) dx
a
F (x) = P (X ≤ x)
Mathematical expectation
Variance
Moment generating function
Probability generating function
Mode, Median, and Quantiles