Uploaded by dhip58

Slide 4 03 (Lecture 4.3 Cumulative Distribution Function)

advertisement
ECE 302: Lecture 4.3 Cumulative Distribution Function
Prof Stanley Chan
School of Electrical and Computer Engineering
Purdue University
c Stanley Chan 2020. All Rights Reserved.
1 / 21
Outline
Cumulative distribution function (CDF):
def
FX (x) = P[X ≤ x]
(1)
What is a CDF?
What are the properties of CDF?
How are CDFs related to PDF?
c Stanley Chan 2020. All Rights Reserved.
2 / 21
Definition
Definition
Let X be a continuous random variable with a sample space Ω = R. The
cumulative distribution function (CDF) of X is
def
FX (x) = P[X ≤ x].
(2)
c Stanley Chan 2020. All Rights Reserved.
3 / 21
Example
Question. (Uniform random variable) Let X be a continuous random
1
variable with PDF fX (x) = b−a
for a ≤ x ≤ b, and is 0 otherwise. Find
the CDF of X .
Solution.
FX (x) =
=


0,
x−a
,
 b−a

1,
x ≤ a,
a < x ≤ b,
x > b.
c Stanley Chan 2020. All Rights Reserved.
4 / 21
Example 2
Question.(Exponential random variable) Let X be a continuous random
variable with PDF fX (x) = λe −λx for x ≥ 0, and is 0 otherwise. Find the
CDF of X .
Solution.
FX (x) =
(
0,
=
1 − e −λx ,
x < 0,
x ≥ 0.
c Stanley Chan 2020. All Rights Reserved.
5 / 21
Properties 1-3
Theorem
Let X be a random variable (either continuous or discrete), then the CDF
of X has the following properties:
(i) The CDF is a non-decreasing.
(ii) The maximum of the CDF is when x = ∞: FX (+∞) = 1.
(iii) The minimum of the CDF is when x = −∞: FX (−∞) = 0.
c Stanley Chan 2020. All Rights Reserved.
6 / 21
Property 4
Theorem
Let X be a continuous random variable. If the CDF FX is continuous at
any a ≤ x ≤ b, then
P[a ≤ X ≤ b] = FX (b) − FX (a).
(3)
c Stanley Chan 2020. All Rights Reserved.
7 / 21
Example
Example 1. (Exponential random variable.) fX (x) = λe −λx for x ≥ 0,
FX (x) = 1 − e −λx for x ≥ 0. Find P[1 ≤ X ≤ 3].
(a) PDF approach:
P[1 ≤ X ≤ 3] =
= e −3λ − e −λ
(b) CDF approach:
P[1 ≤ X ≤ 3] =
= e −3λ − e −λ
c Stanley Chan 2020. All Rights Reserved.
8 / 21
Example
Example 2. Let X be a random variable with PDF fX (x) = 2x for
0 ≤ x ≤ 1, and is 0 otherwise.
(a) Find CDF.
FX (x) =
(b) Find P[1/3 ≤ X ≤ 1/2].
1
1
≤X ≤
=
P
3
2
= x 2,
0 ≤ x ≤ 1.
=
5
.
36
c Stanley Chan 2020. All Rights Reserved.
9 / 21
Left and Right Continuous
Definition
A function FX (x) is said to be
def
Left-continuous at x = b if FX (b) = FX (b − ) = limh→0 FX (b − h);
def
Right-continuous at x = b if FX (b) = FX (b + ) = limh→0 FX (b + h);
Continuous at x = b if it is both right-continuous and
left-continuous at x = b. In this case, we have
lim FX (b − h) = lim FX (b + h) = F (b).
h→0
h→0
c Stanley Chan 2020. All Rights Reserved.
10 / 21
Left and Right Continuous
Figure: The definition of left and right continuous at a point b.
c Stanley Chan 2020. All Rights Reserved.
11 / 21
Property 5: CDF must be right continuous
Theorem
For any random variable X (discrete or continuous), FX (x) is always
right-continuous. That is,
def
FX (b) = FX (b + ) = lim FX (b + h)
h→0
(4)
Figure: A CDF must be right continuous
c Stanley Chan 2020. All Rights Reserved.
12 / 21
Property 6: Jump
Theorem
For any random variable X (discrete or continuous), P[X = b] is
(
FX (b) − FX (b − ), if FX is discontinuous at x = b
P[X = b] =
0, otherwise.
(5)
c Stanley Chan 2020. All Rights Reserved.
13 / 21
Example
Example. Consider a random variable


x,
fX (x) = 21 ,


0,
X with a PDF
0 ≤ x ≤ 1,
x = 3,
otherwise.
Find CDF.
(a) 0 ≤ x < 1:
FX (x) =
=
x2
,
2
0 ≤ x < 1.
(b) 1 ≤ x < 3:
FX (x) =
1
= ,
2
1 ≤ x < 3.
c Stanley Chan 2020. All Rights Reserved.
14 / 21
Example
Figure: An example of converting a PDF to a CDF.
c Stanley Chan 2020. All Rights Reserved.
15 / 21
Example
(c) x = 3:
FX (3) =
= 1,
x = 3.
= 1,
x > 3.
(d) x > 3:
FX (x) =
Therefore,
FX (x) =


0,



 x2 ,
2
1


2,


1,
x < 0,
0 ≤ x < 1,
1 ≤ x < 3,
x ≥ 3.
c Stanley Chan 2020. All Rights Reserved.
16 / 21
Retrieving PDF from CDF
Theorem
The probability density function (PDF) is the derivative of the
cumulative distribution function (CDF):
Z x
dFX (x)
d
fX (x) =
=
fX (x 0 )dx 0 ,
dx
dx −∞
(6)
provided FX is differentiable at x. If FX is not differentiable at x, then,
fX (x) = P[X = x] = FX (x) − lim FX (x − h).
h→0
(7)
c Stanley Chan 2020. All Rights Reserved.
17 / 21
Example
Consider a CDF
(
0,
FX (x) =
1 − 41 e −2x ,
x < 0,
x ≥ 0.
Find PDF fX (x).
Figure: An example of converting a PDF to a CDF.
c Stanley Chan 2020. All Rights Reserved.
18 / 21
Example
(a) When x < 0:
fX (x) =
=0
(b) When x = 0:
fX (x) =
=
3
4
(c) When x > 0:
1
= e −2x
2
fX (x) =
Therefore, the overall PDF is


0,
fX (x) = 34 ,

 1 −2x
,
2e
x < 0,
x = 0,
x > 0.
c Stanley Chan 2020. All Rights Reserved.
19 / 21
Summary
The cumulative distribution function (CDF) of X is
def
FX (x) = P[X ≤ x]
CDF must satisfy these properties:
Non-decreasing, FX (−∞) = 0, and FX (∞) = 1.
P[a ≤ X ≤ b] = FX (b) − FX (a).
Right continuous: Solid dot on at the start.
If discontinuous at b, then P[X = b] = Gap.
Relationship between CDF and PDF:
PDF → CDF: Integration
CDF → PDF: Differentiation
c Stanley Chan 2020. All Rights Reserved.
20 / 21
Questions?
c Stanley Chan 2020. All Rights Reserved.
21 / 21
Download