Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views42 pages

Lecture 04 05 Random Variable

probability

Uploaded by

gagansiddartha7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views42 pages

Lecture 04 05 Random Variable

probability

Uploaded by

gagansiddartha7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Probability and Statistics

Lecture 04 & 05: Random Variable

Dr. Anuradha Banerjee


Department of Mathematical Sciences
IIT (BHU) Varanasi

August 28, 2025

σ
Lecture Outline

1 Borel -algebra and Measurable Function

2 Random Variable

3 Distribution Function

4 Discrete Random Variable

5 Continuous Random Variable

6 Mixed Random Variable

7 Next Lecture Preview

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 2 / 41
σ-algebra Generated by a Family of Subsets

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

I = {F : F ⊆ P(Ω), F is a σ-algebra, and C ⊆ F }

then

F.
\
σ(C) =
F ∈I

Key Point: It is the smallest sigma algebra which contains all of the sets
in C.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 3 / 41
Examples of Generated σ-algebras

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 , Ω} ,

where we define A3 = (0.3, 0.5).

Example - Singleton Sets


Let Ω be a non-empty set and

C = {{x} : x ∈ Ω}

Then the σ-algebra generated by C is

σ(C) = {E ⊆ Ω : either E or E c is countable } .

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 4 / 41
Borel σ-algebra

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 5 / 41
Elements of Borel σ-algebra
Remark
In general, it is not always possible to find explicit form of generated
σ-algebra, however, some of its element can be recognized as follows:
∞  ∞ 
1 1 1
\  \ 
[c, d] = c− ,d + , (c, d] = c, d + ,
n=1
n n n=1
n
∞  ∞
1
\  [
[c, d) = c− ,d , (−∞, c) = (c − n, c) ,
n=1
n n=1
∞  ∞
1
[  [
(−∞, c] = c − n, c + , (c, ∞) = (c, c + n) ,
n=1
n n=1
[∞ ∞
[
[c, ∞) = (c, c + n) , (−∞, ∞) = (−n, n) and {c} = [c, c].
n=1 n=1

We can say all reasonable elements belongs to the Borel σ-algebra in


general.
Dr. Anuradha Banerjee Department of Mathematical SciencesMA
IIT 202
(BHU) Varanasi August 28, 2025 6 / 41
Equivalent Ways to Define Borel σ-algebra

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 7 / 41
Measurable Function

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 .

Equivalent Ways to Define Measurable Function on R


If (Ω, F ) is a measurable space, then f : Ω → R is a measurable function
if and only if one of the following conditions holds:

{ω ∈ Ω : f (ω) < λ} ∈ F , for all λ ∈ R.


{ω ∈ Ω : f (ω) ≤ λ} ∈ F , for all λ ∈ R.
{ω ∈ Ω : f (ω) > λ} ∈ F , for all λ ∈ R.
{ω ∈ Ω : f (ω) ≥ λ} ∈ F , for all λ ∈ R.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 8 / 41
Random Variable

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 9 / 41
Example
Let us consider an experiment of tossing of 3 coins. Then, we have

Ω = {HHH, HHT, HT H, T HH, T T H, T HT, HT T, T T T }.

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 10 / 41
Definition -1:Random Variable

Random Variable in terms of σ-algebra


Let (Ω, F , P) be a probability space. A function X : Ω → R is called a
random variable if it is a measurable function. That is,

X −1 (B) ∈ F, for all B ∈ BR ,

where BR is a Borel σ-algebra.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 11 / 41
Definition-2: Random Variable
Random Variable
Let (Ω, F , P) be a probability space. A function X : Ω → R is called a
random variable if

X −1 {(−∞, λ)} = {ω : X(ω) ≤ λ} ∈ F, for all λ ∈ R.


F

an element of F

λ
| | | ||| R
-2 -1 0 1 2

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 12 / 41
Equivalent Way to Define a Random Variable

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 13 / 41
Cumulative Distribution Function (CDF)

Cumulative Distribution Function (CDF)


Let (Ω, F , P) be a probability space and let X be a random variable with
respect to F . Then the function defined by

FX (x) = P({X ≤ x}), for all x ∈ R

is called a distribution function of the random variable X (also called the


cumulative distribution function).

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 14 / 41
Properties of cumulative distribution function

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→−∞

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 15 / 41
Proof of Property 1 - Part 2

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→∞

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 16 / 41
Property 2 - Non-decreasing

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 ) .

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 17 / 41
Property 3 - Right Continuity

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 18 / 41
Property 4 - Probability Calculations

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).

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 19 / 41
Remark on Distribution Function Properties

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).

(ii) Note that 0 ≤ FX (x) ≤ 1.


(ii) If any function F : R → R satisfies properties (1), (2)&(3) is a CDF
of some random variable.

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 20 / 41
Example
Example
Consider the experiment of rolling two dice. The sample space is

Ω = {(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

Therefore, the cumulative distribution function (CDF) is



0, x < 2,
 1


 36
, 2 ≤ x < 3,
3

, 3 ≤ x < 4,
36
FX (x) = P(X ≤ x) = 6
, 4 ≤ x < 5,
 36

..
.



1, x ≥ 12.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 21 / 41
2D visualization
FX (x)

1−

x
-4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 22 / 41
Example

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

Note that FX (x) is a valid distribution function as it satisfies all the


necessary properties of a CDF.

FX (x)

1
0.5
x
-4 -3 -2 -1 0 1 2 3 4

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 23 / 41
Example
Let the distribution function of a random variable X is given by

x < 0,
0,


FX (x) = x, 0 ≤ x ≤ 21 ,

1, x > 1 .

2

Note that FX (·) is not a valid CDF as it is not right continuous at


x = 1/2.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 24 / 41
Definition: Discrete Random Variable
Definition
Let (Ω, F , P) be a probability space and let X be a random variable with
respect to F that takes only a finite or countably infinite number of
values x1 , x2 , . . .. Then X is called a discrete random variable.
Remark
From the above definition, a random variable X is said to be discrete if
there exists a countable set

C = {x1 , x2 , x3 , . . .}

such that P(X ∈ C) = 1. That is, the range of X is at most countable.


Examples
(a) Number of customers arriving at a store.
(b) Number of accidents happening in a city.
(c) Number of children in a family.
(d) Number of defective light bulbs in a box.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 25 / 41
Definition: Probability Mass Function (PMF)

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

pX (xi ) = P(X = xi ), for i = 1, 2, . . .

is called the probability mass function (PMF) or the probability


distribution of X.

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 26 / 41
Special cases

CDF from PMF


If the PMF is known, the distribution function of X is:
X
FX (x) = P(X ≤ x) = pX (y), x∈R
y∈C
y≤x

PMF from CDF


If the CDF is known, the PMF is given by:

pX (xi ) = P(X = xi ) = P(X ≤ xi ) − P(X < xi )


= FX (xi ) − FX (xi−1 )

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 27 / 41
Remark: Step Function
Important Observation
(i) For a discrete random variable, the CDF FX (x) is a step function
with jump size pX (xi ) at each xi .
FX (x)

·
·
·

·
·
·

| | | | | x
x1 x2 x3 . . . xixi+1 . . .

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 28 / 41
Special Case: Integer-Valued Discrete RV

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 29 / 41
Definition: Continuous Random Variable

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
−∞

The function fX (x) is called the probability density function (pdf) of X.

Examples
1 Life of a bulb
2 Weights of people
3 Volume of water in a bottle

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 30 / 41
Properties of the PDF

Key Observations on Continuous Random Variables


1 fX (x) ≥ 0, for all x ∈ R
Z ∞
2 fX (t) dt = 1
−∞
3 P(X = x) = 0, for all x ∈ R
Rb
4 P(a < X ≤ b) = a fX (t) dt = FX (b) − FX (a)

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 31 / 41
More observations on Continuous RVs

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

The pdf itself is not a probability and can be > 1.


3 If FX is known, then:
d
fX (x) = FX (x)
dx

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 32 / 41
Example: Continuous Random Variable

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.

(a) Check fX (·) is a valid pdf.


  
1 3
(b) Compute P X ∈ 2, 4 .
(c) Find the cdf of X.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 33 / 41
Solution (a)
Solution
Obviously, for 0 ≤ x ≤ 1, fX (x) ≥ 0 and
Z ∞ Z 1
fX (x)dx = 6x(1 − x)dx
−∞ 0
Z 1
=6 (x − x2 )dx
0
 1
x2 x3 1 1
 
=6 − =6 − =1
2 3 2 3
0

Therefore, fX (x) is a valid pdf.

Solution (b)

Z 3/4
1 3
  
P X∈ , = 6(x − x2 )dx
2 4 1/2
11
=
32

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 34 / 41
Solution (c)

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 35 / 41
Mixed Random Variable

Definition: Mixed Random Variable


A random variable is said to be a mixed random variable if it is neither
discrete nor continuous, but it is a mixture of both.

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 36 / 41
Mixed RV: Example continued
example continued
fX (x)

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.

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 37 / 41
Mixed RV: Example continued

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

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 38 / 41
1. Probability Density Function (PDF)
Definition: The PDF fX (x) describes how densely packed the probability
is around each value of a continuous random variable X.

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

The total area under the curve is always 1.

Example: Standard Normal Distribution


Bell-shaped curve centered at x = 0
Symmetric about the y-axis
Tails decrease rapidly but never touch the x-axis
Dr. Anuradha Banerjee Department of Mathematical SciencesMA
IIT 202
(BHU) Varanasi August 28, 2025 39 / 41
Standard Normal Distribution: PDF and CDF

PDF (Probability Density Function)


The PDF shows how densely packed
the probability mass is around a point.
For the standard normal, the peak is
≈ 0.3989 at x = 0.
Probability is obtained by integration:
Rb
P (a ≤ X ≤ b) = f (x) dx
a
CDF (Cumulative Distribution
Function)
The CDF gives the probability that
X ≤ x:

F (x) = P (X ≤ x)

Always between 0 and 1. For


standard normal: F (−∞) =
0, F (0) = 0.5, F (+∞) = 1

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 40 / 41
Next Lecture Preview

Mathematical expectation
Variance
Moment generating function
Probability generating function
Mode, Median, and Quantiles

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 41 / 41
Thank You!

Questions & Discussion

Dr. Anuradha Banerjee – Mathematical Sciences, IIT (BHU)

Dr. Anuradha Banerjee Department of Mathematical SciencesMA


IIT 202
(BHU) Varanasi August 28, 2025 41 / 41

You might also like