0% found this document useful (0 votes)
11 views60 pages

Lec 11 Probability Density Function PDF

NOTES of probability of chapter 5

Uploaded by

Shahzeb Hussain
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)
11 views60 pages

Lec 11 Probability Density Function PDF

NOTES of probability of chapter 5

Uploaded by

Shahzeb Hussain
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/ 60

Chapter 4 One Random Variable

Continuous Random Variables

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 1 / 19


Continuous Random Variables

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 2 / 19


Continuous Random Variables

A random variable is said to be continuous if it takes a continuum of


values.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 2 / 19


Continuous Random Variables

A random variable is said to be continuous if it takes a continuum of


values.

For example, current in a wire, velocity and position of an airliner on


radar, lifetime of a device, temperature of a city, waiting time in a
queue etc.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 2 / 19


Continuous Random Variables

A random variable is said to be continuous if it takes a continuum of


values.

For example, current in a wire, velocity and position of an airliner on


radar, lifetime of a device, temperature of a city, waiting time in a
queue etc.

For a continuous RV X, the range of X includes all values in an


interval of real numbers. This could be an infinite interval such as
(−∞, ∞).

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 2 / 19


Continuous Random Variables

Definition (Continuous RV)

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 3 / 19


Continuous Random Variables

Definition (Continuous RV)


An RV X with CDF FX (x) is said to be continuous if FX (x) is a
continuous function for all x ∈ R.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 3 / 19


Continuous Random Variables

Definition (Continuous RV)


An RV X with CDF FX (x) is said to be continuous if FX (x) is a
continuous function for all x ∈ R.

The CDF is a continuous function with no jumps.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 3 / 19


Continuous Random Variables

Definition (Continuous RV)


An RV X with CDF FX (x) is said to be continuous if FX (x) is a
continuous function for all x ∈ R.

The CDF is a continuous function with no jumps.

No jumps is consistent with the fact that P [X = x] = 0 for all x.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 3 / 19


Continuous Random Variables

Definition (Continuous RV)


An RV X with CDF FX (x) is said to be continuous if FX (x) is a
continuous function for all x ∈ R.

The CDF is a continuous function with no jumps.

No jumps is consistent with the fact that P [X = x] = 0 for all x.

CDF of a continuous random variable is differentiable almost


everywhere in R.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 3 / 19


Continuous RV - Probability Density Function (PDF)

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 4 / 19


Continuous RV - Probability Density Function (PDF)
For continuous random variables, CDF works but PMF does not since
P (X = x) = 0.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 4 / 19


Continuous RV - Probability Density Function (PDF)
For continuous random variables, CDF works but PMF does not since
P (X = x) = 0.
Instead we define a Probability Density Function (PDF).

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 4 / 19


Continuous RV - Probability Density Function (PDF)
For continuous random variables, CDF works but PMF does not since
P (X = x) = 0.
Instead we define a Probability Density Function (PDF).
For a continuous random variable X, we define the function fX (x) as
P (x < X ≤ x + δ)
fX (x) = lim .
δ→0+ δ
fX (x) is limit of the probability of an interval as the length of the
interval goes to 0 and it gives the probability density at point x.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 4 / 19


Graphically, this means that the entire area under the graph of the PDF must
Continuous
be equal to 1.
RV - Probability Density Function (PDF)
To interpret the PDF, note that for an interval [x, x + δ] with very small
For δ,
length continuous
we have random variables, CDF works but PMF does not since
P (X = x) = 0.
 x+δ

Instead we define 
P [x,a xProbability
+ δ] = Density
fX (t) dt ≈Function
fX (x) · δ, (PDF).
For a continuous random variable
x X, we define the function fX (x) as
so we can view fX (x) as the “probability P (x mass ≤ xunit
< X per + δ)length” near x (cf.
f (x) = lim
Fig. 3.2). It is importantXto realize that even though a PDF
.
is used to calculate
δ→0 + δ
event probabilities, fX (x) is not the probability of any particular event. In
fX (x) isit limit
particular, is not of the probability
restricted to be lessof an or
than interval
equal toasone.
the length of the
interval goes to 0 and it gives the probability density at point x.

PDF fX(x )
Figure 3.2: Interpretation of the PDF
fX (x) as “probability mass per unit length”
around x. If δ is very small, the prob-
ability that X takes value in the inter-
val [x, x + δ] is the shaded area in the
 figure, which is approximately equal to
x fX (x) · δ.
x +

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 4 / 19


Continuous RV - PDF

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 5 / 19


Continuous RV - PDF

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 5 / 19


Continuous RV - PDF

We know that
P (x < X ≤ x + δ) = FX (x + δ) − FX (x).

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 5 / 19


Continuous RV - PDF

We know that
P (x < X ≤ x + δ) = FX (x + δ) − FX (x).
Thus we get

FX (x + δ) − FX (x)
fX (x) = lim
δ→0 δ
dFX (x)
= = FX0 (x).
dx
if FX (x) is differentiable at x.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 5 / 19


Continuous RV - PDF

The PDF of a random variable with U nif orm(a, b) distribution is


given by  1
b−a a<x<b
fX (x) =
0 x < a or x > b

FX (x) fX (x)

1
1 b−a

a b x
a b x
CDF for a continuous RV uniformly distributed PDF for a continuous RV uniformly distributed
over [a, b]. over [a, b].

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 6 / 19


Continuous RV - PDF

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 7 / 19


Continuous RV - PDF

If fX (x1 ) > fX (x2 ), we can say the value of X is more likely to be


around x1 than x2 .

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 7 / 19


Continuous RV - PDF

If fX (x1 ) > fX (x2 ), we can say the value of X is more likely to be


around x1 than x2 .

The CDF can be obtained from PDF by integration


Z x
FX (x) = fX (u)du.
−∞

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 7 / 19


Continuous RV - PDF

If fX (x1 ) > fX (x2 ), we can say the value of X is more likely to be


around x1 than x2 .

The CDF can be obtained from PDF by integration


Z x
FX (x) = fX (u)du.
−∞

We also have
Z b
P (a < X ≤ b) = FX (b) − FX (a) = fX (u)du.
a

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 7 / 19


Continuous RV - PDF

Properties of PDF
Consider a continuous random variable X with PDF fX (x). We have
1 fX (x) ≥ 0 for all x ∈ R (above the horizontal axis)
R∞
2 fX (u)du = P [−∞ < X < ∞] = 1. (area under the curve is 1)
−∞
Rb
Sec.≤3.1
P (a X ≤ Continuous
b) = FX (b) − FXVariables
(a) = and fX (u)du.
3
Random PDFs 3
a

PDF fX(x)
Sample Space

a b x
Event {a < X < b}

Figure 3.1: Illustration of a PDF. The probability that X takes value in an


b
Dr. Babarinterval
Mansoor [a, b] isfEEE251 Probability
X (x) dx, which is Methods in Engineering
the shaded area in the figure. 8 / 19
Continuous RV - PDF
Properties of PDF
Ra
For any single value a, we have P [X = a] = fX (u)du = 0. For this
a
reason,

P [a ≤ X ≤ b] = P [a < X < b] = P [a ≤ X < b] = P [a < X ≤ b]


R
More generally, for a set A, P (X ∈ A) = fX (u)du.
A
Sec. 3.1 Continuous Random Variables and PDFs 3

PDF fX(x)
Sample Space

a b x
Event {a < X < b}

Figure 3.1: Illustration of a PDF. The probability that X takes value in an



Important! A pdf is [a,not
interval b] is af probability!
b
Only
(x) dx, which is the shaded
a X area inwhen
the figure. you integrate it does it

give you a probability. In fact, you can have pdfs where the value fX (x) is
Graphically, this means that the entire area under the graph of the PDF must
Dr. Babar Mansoor EEE251 Probability Methods in Engineering 9 / 19
Continuous RV - PDF

Example

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 10 / 19


Continuous RV - PDF

Example
Is the following functions pdf?
 1 2
fX (x) = 2 − 2x if x ∈ [−1, 1]
0 elsewhere

Answer No! fX (1) = − 32 and a pdf must always be non-negative.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 10 / 19


Continuous RV - PDF

Example

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 11 / 19


Continuous RV - PDF

Example
Is the following functions pdf?

sin(x) if x ∈ [ π2 , π]
fX (x) =
0 elsewhere

Answer Yes! Here we have fX (x) ≥ 0, and we can verify that it


integrates to one over the range it is non-zero:
Z π Z π
π
π
fX (x) = sin(x)dx = − cos(x) = − cos(π) + cos( ) = 1
π π
π
2
2 2
2

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 11 / 19


Continuous RV - PDF

Example

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

a. What is the value of C?

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

a. What is the value of C?


b. Find P [X > 1]

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

a. What is the value of C?


b. Find P [X > 1]

Sol:

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

a. What is the value of C?


b. Find P [X > 1]
R∞
Sol: a. Since fX (x) is a PDF, we have fX (x)dx = 1, therefore,
−∞

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example
Suppose that X is a continuous RV whose probability density function is
given by 
C(4x − 2x2 ) for 0 < x < 2
fX (x) =
0 otherwise.

a. What is the value of C?


b. Find P [X > 1]
R∞
Sol: a. Since fX (x) is a PDF, we have fX (x)dx = 1, therefore,
−∞

Z2
C (4x − 2x2 )dx = 1
0

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 12 / 19


Continuous RV - PDF

Example (Cont.)

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 13 / 19


Continuous RV - PDF

Example (Cont.)
 
2x3 2
2
⇒ C 2x − =1
3 0

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 13 / 19


Continuous RV - PDF

Example (Cont.)
 
2x3 2
2
⇒ C 2x − =1
3 0

3
⇒ C=
8

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 13 / 19


Continuous RV - PDF

Example (Cont.)
 
2x3 2
2
⇒ C 2x − =1
3 0

3
⇒ C=
8
b.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 13 / 19


Continuous RV - PDF

Example (Cont.)
 
2x3 2
2
⇒ C 2x − =1
3 0

3
⇒ C=
8
b.
Z∞ Z2
3 1
P [X > 1] = fX (x)dx = (4x − 2x2 )dx =
8 2
1 1

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 13 / 19


Continuous RV - PDF
Example (Exponential RV)

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

P [X > x] = e−λx x > 0.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

P [X > x] = e−λx x > 0.

Find the CDF and PDF of X.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

P [X > x] = e−λx x > 0.

Find the CDF and PDF of X.


Sol:

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

P [X > x] = e−λx x > 0.

Find the CDF and PDF of X.


Sol:
The CDF is given by FX (x) = 1 − P [X > x]

0 for x < 0
FX (x) = −λx
1−e for x ≥ 0

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19


Continuous RV - PDF
Example (Exponential RV)
The transmission time X of messages in a communication system has an
exponential distribution:

P [X > x] = e−λx x > 0.

Find the CDF and PDF of X.


Sol:
The CDF is given by FX (x) = 1 − P [X > x]

0 for x < 0
FX (x) = −λx
1−e for x ≥ 0

dFX (x)
As we know that the PDF fX (x) = dx , therefore,

0 for x < 0
fX (x) =
λe−λx for x ≥ 0
Dr. Babar Mansoor EEE251 Probability Methods in Engineering 14 / 19
Continuous RV - PDF
Example

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

What is the probability that:


(a) a computer will function between 50 and 150 hours before breaking down?

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

What is the probability that:


(a) a computer will function between 50 and 150 hours before breaking down?
(b) it will function for fewer than 100 hours?

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

What is the probability that:


(a) a computer will function between 50 and 150 hours before breaking down?
(b) it will function for fewer than 100 hours?
Sol:

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

What is the probability that:


(a) a computer will function between 50 and 150 hours before breaking down?
(b) it will function for fewer than 100 hours?
Sol:
R∞ R∞
(a) Since fX (x)dx = 1, therefore, λe−x/100 dx = 1
−∞ 0

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF
Example
The amount of time in hours that a computer functions before breaking down is a
continuous RV with PDF given by

λe−x/100 for x ≥ 0
fX (x) =
0 for x < 0

What is the probability that:


(a) a computer will function between 50 and 150 hours before breaking down?
(b) it will function for fewer than 100 hours?
Sol:
R∞ R∞
(a) Since fX (x)dx = 1, therefore, λe−x/100 dx = 1
−∞ 0

1
⇒ λ=
100

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 15 / 19


Continuous RV - PDF

Example
Hence, the probability that a computer will function between 50 and 150 hours
before breaking down is given by

Z150
1 −x/100
P [50 < X < 150] = e dx ≈ 0.384
100
50

(b) Similarly,
Z100
1 −x/100
P [X < 100] = e dx ≈ 0.633
100
0

In other words, approximately 63.3 percent of the time, a computer will fail
before registering 100 hours of use.

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 16 / 19


Continuous RV - PDF

Homework
Assume that X is a continuous random variable with the following PDF:

A(2x − x2 ) for 0 < x < 2
fX (x) =
0 otherwise

(a) Find the value of A.


(b) Find P [X > 1].

ANS (a) A = 3/4, (b) P [X > 1] = 1/2

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 17 / 19


Continuous RV - PDF
Example
Consider the function

c for a ≤ x ≤ b
fX (x) =
0 otherwise

(a) For what value of c is fX (x) a legitimate PDF?


(b) Find the CDF of the random variable X with the above PDF.
Solution:
(a) For fX (x) to be a legitimate PDF, we must have that
R∞
fX (x)dx = 1 i.e.
−∞
Zb
b 1
cdx = 1 ⇒ cx =1 ⇒ c=
a b−a
a

(b) The CDF FX (x) is


Dr. Babar Mansoor x

EEE251 Probability Methods in Engineering 18 / 19
Continuous RV - PDF

Homework
Consider the function

2x for 0 ≤ x ≤ b
fX (x) =
0 otherwise

(a) For what value of b is fX (x) a legitimate PDF?


(b) Find the CDF of the random variable X with the above PDF.
ANS (a) b = 1,

 0 for x < 0
(b) FX (x) = x2 for 0 ≤ x < 1

1 for x > 1

Dr. Babar Mansoor EEE251 Probability Methods in Engineering 19 / 19

You might also like