You are on page 1of 17

INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Course Name: Mathematics & Statistics III (BSC-301)

1
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Cumulative Distribution Function(cdf)/Distribution Function


Consider a random variable X, then the cumulative distribution function of
X at a particular point ‘x’ is denoted by F(x) and is defined as
𝑥

𝑓 𝑥 , 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒


;∞
𝑤ℎ𝑒𝑟𝑒 𝑓 𝑥 𝑖𝑠 𝑎 𝑝𝑚𝑓
𝐹 𝑥 = 𝑥

𝑓 𝑥 𝑑𝑥, 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒


;∞
𝑤ℎ𝑒𝑟𝑒 𝑓 𝑥 𝑖𝑠 𝑎 𝑝𝑑𝑓

Now let us consider X to be a discrete random variable taking the mass


points 𝑥1 , 𝑥2 , 𝑥3 , … … 𝑥𝑛 with corresponding probabilities 𝑝1 , 𝑝2 , … … 𝑝𝑛
2
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

The probability distribution of X is given by


𝑃(𝑋 = 𝑥𝑖 ) 𝑥1 𝑥2 ………… 𝑥𝑛 Total
𝑓(𝑥𝑖 ) 𝑝1 𝑝2 …………. 𝑝𝑛 1

The cdf of X is defined by


0, 𝑥 < 𝑥1
𝑝1 , 𝑥1 ≤ 𝑥 < 𝑥2
𝐹 𝑥 = 𝑝1 + 𝑝2 , 𝑥2 ≤ 𝑥 < 𝑥3
⋮ ⋮ ⋮
𝑝1 : 𝑝2 :⋯:𝑝𝑛 , 𝑥𝑛 ≤𝑥

In the previous example we have the following probability distribution

𝑃(𝑋 = 𝑥𝑖 ) 0 1 2 Total
𝑓(𝑥𝑖 ) 1 1 1 1
4 2 4
3
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Here the cdf of X is given by


0, 𝑖𝑓 𝑥 < 0
1
, 𝑖𝑓 0 ≤ 𝑥 < 1
𝐹 𝑥 = 4
3
, 𝑖𝑓 1 ≤ 𝑥 < 2
4
1. 𝑖𝑓 2 ≤ 𝑥
The graph of the above function is given by

From the graph it is clear that the cdf of a discrete random variable is always
a step function. The points of discontinuities of the function are the mass
points i.e. 0, 1 and 2.
4
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Properties of CDF/Distribution Function

Prop 1: For a random variable X we have


𝐹 ∞ = 𝑓 𝑥 = 1, 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒


;∞

= ;∞
𝑓 𝑥 𝑑𝑥 = 1, 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒

and 𝐹 −∞ = ;∞
;∞ 𝑓 𝑥 = 0, 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒
;∞
= ;∞
𝑓 𝑥 𝑑𝑥 = 0, 𝑖𝑓 𝑋 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒

Thus 𝑭 ∞ = 𝟏 𝒂𝒏𝒅 𝑭 −∞ = 𝟎

5
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Prop 2: If X is a continuous random variable, then we have


𝑋 ≤𝑏 =𝑎 <𝑋 ≤𝑏+𝑋 ≤𝑎
Taking probability of the events on both sides we get

𝑃 𝑋 ≤ 𝑏 = 𝑃 𝑎 < 𝑋 ≤ 𝑏 + 𝑃(𝑋 ≤ 𝑎)
(since the two events 𝑎 < 𝑋 ≤ 𝑏 and 𝑋 ≤ 𝑎 are mutually exclusive to each
other)
∴ 𝑃 𝑎 < 𝑋 ≤ 𝑏 = 𝑃 𝑋 ≤ 𝑏 − 𝑃(𝑋 ≤ 𝑎)

⇒ 𝑃 𝑎 < 𝑋 ≤ 𝑏 = 𝐹 𝑏 − 𝐹(𝑎)
𝑏
Again we know 𝑃 𝑎 < 𝑋 ≤ 𝑏 = 𝑎
𝑓 𝑥 𝑑𝑥
𝑏

∴𝑃 𝑎<𝑋≤𝑏 = 𝑓 𝑥 𝑑𝑥 = F b − F(a)
𝑎
6
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Prop 3: If X is a continuous random variable then,


𝑑(𝐹 𝑥 )
= 𝑓 𝑥 , where F(x) and f(x) are the cdf and the pdf of the
𝑑𝑥
continuous random variable X.

7
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Examples of PMF, PDF & CDF


Example 1:A random variable X has the following pmf

X -2 -1 0 1 2 3

f(x) 0.1 k 0.2 2k 0.3 3k

(i) Find k (ii) Evaluate 𝑃 𝑋 < 2 , 𝑃(𝑋 − 2 < 𝑋 < 2)


(iii) Determine the distribution function F(x)
Solution: (i) Since f(x) is a pmf so 3;2 𝑓 𝑥 = 1
∴ 0.1 + 𝑘 + 0.2 + 2𝑘 + 0.3 + 3𝑘 = 1
⇒ 6𝑘 + 0.6 = 1
2 1
⇒ 6𝑘 = 0.4 = ⇒ 𝑘 =
5 15
8
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

The pmf of X changes to

X -2 -1 0 1 2 3

f(x) 0.1 1/15 0.2 2/15 0.3 1/5

Now P(X<2) = f(-2) +f(-1) + f(0) + f(1) = 0.1+1/15+0.2+2/15 = 0.5


P(-2 < X < 2) = f(-1) + f(0) + f(1) = 1/15 + 0.2 + 2/15 = 0.4
(iii) The cdfor distribution function of X is given by
0, 𝑖𝑓 𝑥 < −2
0.1, 𝑖𝑓 − 2 ≤ 𝑥 < −1
0.167, 𝑖𝑓 − 1 ≤ 𝑥 < 0
𝐹 𝑥 = 0.367, 𝑖𝑓 0 ≤ 𝑥 < 1
0.5, 𝑖𝑓 1 ≤ 𝑥 < 2
0.8, 𝑖𝑓 2 ≤ 𝑥 < 3
1, 𝑖𝑓 3 ≤ 𝑥
9
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Example 2: Show that f(x) is given by


𝑥, 0 ≤ 𝑥 < 1
𝑓 𝑥 = 𝑘 − 𝑥, 1 ≤ 𝑥 ≤ 2
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
is a pdf for a suitable value of k. Find the distribution function of the random
variable X. Calculate the probability that the random variable lies between
1 3
𝑎𝑛𝑑 .
2 2
Solution: For f(x) to be a possible pdf the value of k must be greater than or

equal to 2. So if f(x) is a pdf then ;∞ 𝑓 𝑥 𝑑𝑥 = 1
0 1 2 ∞
So, ;∞
𝑓 𝑥 𝑑𝑥 + 0
𝑓 𝑥 𝑑𝑥 + 1
𝑓 𝑥 𝑑𝑥 + 2
𝑓 𝑥 𝑑𝑥 = 1
1 2
or, 0
𝑥𝑑𝑥 + 1
(𝑘 − 𝑥)𝑑𝑥 = 1
1
𝑥2 𝑥2 2
or, [ ] +[𝑘𝑥 − ]1 = 1
2 0 2
1 4 1
or, + 2𝑘 − − 𝑘 − = 1 𝑜𝑟, 𝑘 = 2 10
2 2 2
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Therefore the pdf changes to


𝑥, 0 ≤ 𝑥 < 1
𝑓 𝑥 = 2 − 𝑥, 1 ≤ 𝑥 ≤ 2
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Since the value of k = 2 so it is a possible pdf.
If F(x) be the corresponding distribution function, then
𝑥

𝐹 𝑥 =𝑃 𝑋≤𝑥 = 𝑓 𝑥 𝑑𝑥
;∞
𝑥
Thus for −∞ < 𝑥 < 0, 𝐹 𝑥 = ;∞
𝑓 𝑥 𝑑𝑥 = 0
0 𝑥 𝑥2
For 0 ≤ 𝑥 < 1, 𝐹 𝑥 = ;∞
0𝑑𝑥 + 0
𝑥𝑑𝑥 =
2
0 1 𝑥
For 1 ≤ 𝑥 < 2, 𝐹 𝑥 = ;∞
0𝑑𝑥 + 0
𝑥𝑑𝑥 + 1
2 − 𝑥 𝑑𝑥
𝑡2 1 𝑡2 𝑥
=0+ [ ]0 +[2𝑡 − ]
2 2 1
𝑥2
= 2𝑥 − −1 11
2
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

0 1 2 ∞
For 𝑥 ≥ 2, 𝐹 𝑥 = ;∞
0𝑑𝑥 + 0
𝑥𝑑𝑥 + 1
2 − 𝑥 𝑑𝑥 + 2
0𝑑𝑥
1 𝑥2 2
= 0 + + (2𝑥 − ) +0
2 2 1
1 1
= + 4−2 − 2− =1
2 2
3 3
1 3 1
Again, 𝑃 <X< = 1
2
𝑓 𝑥 𝑑𝑥 = 1 𝑥𝑑𝑥 + 2
1
2 − 𝑥 𝑑𝑥
2 2 2
2
3
𝑥2 1 𝑥2 2
= [ ]1 +[2𝑥 − ]
2 2 2 1
1 1 9 1 3
= − + 3− − 2− =
2 8 8 2 4

12
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Examples of PMF, PDF & CDF(contd.)


Example 3:Suppose a function F(x) is defined as below:
0, −∞ < 𝑥 < −2
1
, −2 ≤ 𝑥 < −1
𝐹 𝑥 = 3
1
, −1 ≤ 𝑥 < 0
2
1, 0 ≤ 𝑥 < ∞
Show that the function F(x) is a possible probability distribution function.
Also determine the corresponding probability mass function.
Solution: We see that F(x) is a non negative and non-decreasing function
with lower and upper bounds as 0 and 1.
Further F(x) is a step function and such that it is discontinuous to the left of
three possible spectrum points -2,-1 and 0 although continuous to the right
of everywhere.
Hence F(x) is a possible probability distribution function. 13
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Now the corresponding probability mass function f(x) is given by


1
𝑓 𝑥 = , x = −2
3
1 1 1
= − = , 𝑥 = −1
2 3 6
1 1
=1 − = ,𝑥 =0
2 2
= 0, elsewhere
Example 4: The distribution function F(x) of a variable X is defined as
follows:
𝐴, −∞ < 𝑥 < −1
𝐵, −1 ≤ 𝑥 < 0
𝐹 𝑥 =
𝐶, 0 ≤ 𝑥 < 2
𝐷, 2 ≤ 𝑥 < ∞
Where A,B,C,D are constants. Determine the values of A, B, C and D given
1 2
that 𝑃 𝑋 = 0 = 𝑎𝑛𝑑 𝑃 𝑋 > 1 =
6 3
14
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Solution: Here the probability distribution function is given by


𝐴, −∞ < 𝑥 < −1
𝐵, −1 ≤ 𝑥 < 0
𝐹 𝑥 =
𝐶, 0≤𝑥<2
𝐷, 2≤𝑥<∞
Since we know that 𝐹 −∞ = 0 𝑎𝑛𝑑 𝐹 ∞ = 1, therefore from above we
have, A = 0 and D = 1
2 2
Again it is given that P(X > 1)= 𝑖. 𝑒. 𝑃 𝑋 ≥ 2 = and hence
3 3
2 1
𝑃 𝑋 <2 =1− =
3 3
1 1
Therefore, C = . Also it is given that P(X = 0) =
3 6
1 1 1 1 1
Therefore 𝐹 0 − 𝐹 0 − 0 = i.e. C – B = i.e. B = − =
6 6 3 6 6

15
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

1 1
Hence the required values of the constants are 𝐴 = 0, 𝐵 = , 𝐶 = , 𝐷 = 1
6 3
And the corresponding probability distribution function is

0, −∞ < 𝑥 < −1
1
, −1 ≤ 𝑥 < 0
𝐹 𝑥 = 6
1
, 0≤𝑥<2
3
1, 2≤𝑥<∞

16
INSTITUTE OF ENGINEERING & MANAGEMENT, KOLKATA

Thank You

17

You might also like