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

Untitled

The document discusses probability density functions (pdfs) and cumulative distribution functions (cdfs) for continuous random variables. It defines pdfs and cdfs, and how they are related - the pdf gives the probability of values within an interval using integrals, while the cdf gives the probability of values less than or equal to a value using integrals of the pdf. It also notes that continuous random variables have zero probability of single values.
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 views44 pages

Untitled

The document discusses probability density functions (pdfs) and cumulative distribution functions (cdfs) for continuous random variables. It defines pdfs and cdfs, and how they are related - the pdf gives the probability of values within an interval using integrals, while the cdf gives the probability of values less than or equal to a value using integrals of the pdf. It also notes that continuous random variables have zero probability of single values.
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/ 44

Recall that continuous random variables have uncountably

many possible values (think of intervals of real numbers).


Just as for discrete random variables, we can talk about
probabilities for continuous random variables using density
functions.

Definition
4.1.1
The probability density function (pdf), denoted

, of a continuous random variable

satisfies the following:

1. ( )≥0
, for all ∈ℝ
2.
is piecewise continuous


3.

−∞

( ) =1


4. ( ≤ ≤ )=
𝑓
𝑋
𝑓
𝑓
𝑓
𝑃
𝑎
𝑥
𝑥
𝑎
𝑑
𝑋
𝑥
𝑥
𝑏
( )
The first three conditions in the definition state the properties
necessary for a function to be a valid pdf for a continuous
random variable. The fourth condition tells us how to use a
pdf to calculate probabilities for continuous random variables,
which are given by integrals the continuous analog to sums.

Example
4.1.1
Let the random variable

denote the time a person waits for an elevator to arrive.


Suppose the longest one would need to wait for the elevator
is 2 minutes, so that the possible values of

(in minutes) are given by the interval

[0,2]
. A possible pdf for

is given by

( )=




𝑓
𝑏
𝑓
𝑋
𝑋
𝑋
𝑥
𝑥
𝑑
𝑥


,
2− ,
0,
for 0≤ ≤1
for 1< ≤2
otherwise

The graph of

is given below, and we verify that

satisfies the first three conditions in Definition 4.1.1:

1. From the graph, it is clear that ( )≥0


, for all ∈ℝ
.
2. Since there are no holes, jumps, asymptotes, we see
that ( )
is (piecewise) continuous.
3. Finally we compute:


−∞

𝑥
𝑓
𝑓
𝑥
𝑓
𝑥
𝑥
𝑥
𝑥
𝑓
𝑥

( ) =

0
2


=

0
1


+

1
2
(2− ) =1
𝑓
𝑥
𝑥
𝑑
𝑑
𝑥
𝑥
𝑥
𝑥
𝑑
𝑥
𝑑
𝑥
Figure 1: Graph of pdf for

( )
So, if we wish to calculate the probability that a person waits
less than 30 seconds (or 0.5 minutes) for the elevator to
arrive, then we calculate the following probability using the
pdf and the fourth property in Definition 4.1.1:

(0≤ ≤0.5)=


𝑓
𝑋
𝑃
𝑥
𝑋
0
0.5
( ) =


0
0.5
=0.125

Note that, unlike discrete random variables, continuous


random variables have zero point probabilities, i.e., the
probability that a continuous random variable equals a single
value is always given by 0. Formally, this follows from
properties of integrals:

( = )= ( ≤ ≤ )=

( ) =0.

Informally, if we realize that probability for a continuous


random variable is given by areas under pdf's, then,
since there is no area in a line, there is no probability
assigned to a random variable taking on a single value. This
does not mean that a continuous random variable will never
equal a single value, only that we do not assign any
probability to single values for the random variable. For this
reason, we only talk about the probability of a continuous
random variable taking a value in an INTERVAL, not at a
𝑓
𝑥
𝑃
𝑓
𝑎
𝑎
𝑑
𝑥
𝑥
𝑋
𝑥
𝑑
𝑑
𝑥
𝑥
𝑎
𝑃
𝑎
𝑋
𝑎
point. And whether or not the endpoints of the interval are
included does not affect the probability. In fact, the following
probabilities are all equal:

( ≤ ≤ )= ( < < )= ( ≤ < )= ( < ≤ )=

( )
Cumulative Distribution Functions
(CDFs)
Recall Definition 3.2.2, the definition of the cdf, which applies
to both discrete and continuous random variables. For
continuous random variables we can further specify how to
calculate the cdf with a formula as follows. Let

have pdf

, then the cdf

is given by

( )= ( ≤ )=


−∞
𝑃
𝑓
𝑏
𝑎
𝐹
𝐹
𝑓
𝑋
𝑥
𝑥
𝑎
𝑥
𝑑
𝑋
𝑥
𝑃
𝑋
𝑏
𝑥
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
( ) ,for ∈ℝ.

In other words, the cdf for a continuous random variable is


found by integrating the pdf. Note that the Fundamental
Theorem of Calculus implies that the pdf of a continuous
random variable can be found by differentiating the cdf. This
relationship between the pdf and cdf for a continuous random
variable is incredibly useful.

Relationship between PDF and CDF for a


Continuous Random Variable
Let

be a continuous random variable with pdf

and cdf

.
• By definition, the cdf is found by integrating the pdf:


( )=

−∞

()

• By the Fundamental Theorem of Calculus, the pdf can be


found by differentiating the cdf:
𝑓
𝐹
𝐹
𝑓
𝑋
𝑓
𝑥
𝑡
𝑡
𝑥
𝑑
𝑑
𝑡
𝑡
𝑥
( )=

[ ( )]

Example
4.1.2
Continuing in the context of Example 4.1.1, we find the
corresponding cdf. First, let's find the cdf at two possible
values of

=0.5
and

=1.5
:

(0.5)
(1.5)
=


−∞
0.5
() =
𝑓
𝑑
𝑓
𝐹
𝐹
𝑥
𝑥
𝑋
𝐹
𝑥
𝑥
𝑡
𝑥
𝑑
𝑡
𝑑

0
0.5
=

2
2




0.5
0
=0.125
=


−∞
1.5
() =


0
1
+
𝑡
𝑓
𝑡
𝑡
𝑑
𝑑
𝑡
𝑡
𝑡
𝑑
𝑡

1
1.5
(2− ) =

2
2




1
0

+(2 −

2
2

)



1.5
1
𝑡
𝑡
𝑡
𝑡
𝑑
𝑡
=0.5+(1.875−1.5)=0.875

Now we find

( )
more generally, working over the intervals that

( )
has different formulas:

for <0: ( )
for 0≤ ≤1: ( )
for 1< ≤2: ( )
for >2: ( )
=


−∞

0 =0
=


0

2
2
𝐹
𝑓
𝑥
𝑡
𝑥
𝑡
𝑑
𝑑
𝑡
𝑥
𝑥
𝑡
𝑥
𝑥
𝑥
𝑥
𝐹
𝐹
𝑥
𝑥
𝐹
𝐹
𝑥
𝑥


0
=

2
2


0
1
+


1

(2− ) =

2
2



𝑡
𝑥
𝑥
𝑥
𝑡
𝑑
𝑡
𝑡
𝑑
𝑡

1
0

+(2 −

2
2

)


=0.5+(2 −

2
2

)−(2−0.5)=2 −

2
2
𝑥
𝑡
𝑥
𝑥
𝑡
𝑥
𝑥
−1
=


−∞

( ) =1

Putting this altogether, we write

as a piecewise function and Figure 2 gives its graph:

( )=








0,

2
2
𝑓
𝑥
𝐹
𝐹
𝑥
𝑡
𝑥
𝑑
𝑡
,
2 −

2
2

−1,
1,
for <0
for 0≤ ≤1
for 1< ≤2
for >2

Figure 2: Graph of cdf in Example 4.1.2


𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Recall that the graph of the cdf for a discrete random variable
is always a step function. Looking at Figure 2 above, we note
that the cdf for a continuous random variable is always a
continuous function.

Percentiles of a Distribution
Definition
4.1.2
The (100p)th percentile (

0≤ ≤1
) of a probability distribution with cdf

is the value

such that

)= ( ≤

)= .
To find the percentile
𝑝
𝜋
𝐹
𝑝
𝜋
𝐹
𝑝
𝜋
𝑝
𝜋
𝑃
𝑝
𝑝
𝑋
of a continuous random variable, which is a possible value of
the random variable, we are specifying a cumulative
probability

and solving the following equation for

−∞
() =
Special Cases: There are a few values of

for which the corresponding percentile has a special name.

• Median or 50

percentile:
.5
= =
2

, separates probability (area under pdf) into two equal


halves
𝑓
𝑝
𝜋
𝑝
𝜋
𝑝
𝑡
𝑝
𝜇
𝑡
𝑑
𝑄
𝑡
𝑝
𝜋
• 1st Quartile or 25

percentile:
.25
=
1

, separates 1

quarter (25%) of probability (area) from the rest


• 3rd Quartile or 75

percentile:
.75
=
3

, separates 3

quarter (75%) of probability (area) from the rest


Example
4.1.3
Continuing in the context of Example 4.1.2, we find the
median and quartiles.
𝑡
𝑠
𝑡
𝑟
𝑑
𝑡
𝑄
𝑄
𝜋
𝜋
• median: find
.5

, such that (
.5
)=0.5⇒
.5
=1
(from graph in Figure 1)
• 1st quartile: find
1
=
.25

, such that (
.25
)=0.25
. For this, we use the formula and the graph of the cdf in
Figure 2:

2
.25

=0.25⇒
1
𝜋
𝜋
𝜋
𝑄
𝐹
𝐹
𝜋
𝜋
𝜋
𝑄
=
.25
=0.5



≈0.707

• 3rd quartile: find


3
=
.75

, such that (
.75
)=0.75
. Again, use the graph of the cdf:
2
.75

2
.75

2
𝜋
𝜋
𝜋
𝜋
𝐹
𝜋
𝑄
−1=0.75 ⇒ (using Quadratic Formula)
3
=
.75
=4−2

≈1.293

This page titled 4.1: Probability Density Functions (PDFs) and


Cumulative Distribution Functions (CDFs) for Continuous
Random Variables is shared under a not declared license and
was authored, remixed, and/or curated by Kristin Kuter.

Recall that continuous random variables have uncountably


many possible values (think of intervals of real numbers).
Just as for discrete random variables, we can talk about
probabilities for continuous random variables using density
functions.

Definition
4.1.1
The probability density function (pdf), denoted
𝑓
𝜋
𝑄
, of a continuous random variable

satisfies the following:

1. ( )≥0
, for all ∈ℝ
2.
is piecewise continuous


3.

−∞

( ) =1


4. ( ≤ ≤ )=

( )
The first three conditions in the definition state the properties
necessary for a function to be a valid pdf for a continuous
random variable. The fourth condition tells us how to use a
pdf to calculate probabilities for continuous random variables,
which are given by integrals the continuous analog to sums.

Example
4.1.1
Let the random variable
𝑓
𝑋
𝑓
𝑓
𝑃
𝑓
𝑏
𝑎
𝑥
𝑥
𝑥
𝑎
𝑑
𝑑
𝑋
𝑥
𝑥
𝑥
𝑏
denote the time a person waits for an elevator to arrive.
Suppose the longest one would need to wait for the elevator
is 2 minutes, so that the possible values of

(in minutes) are given by the interval

[0,2]
. A possible pdf for

is given by

( )=






,
2− ,
0,
for 0≤ ≤1
for 1< ≤2
otherwise
𝑓
𝑋
𝑋
𝑋
𝑥
𝑥
𝑥
𝑥
𝑥
The graph of

is given below, and we verify that

satisfies the first three conditions in Definition 4.1.1:

1. From the graph, it is clear that ( )≥0


, for all ∈ℝ
.
2. Since there are no holes, jumps, asymptotes, we see
that ( )
is (piecewise) continuous.
3. Finally we compute:


−∞


( ) =

0
2


=

0
1
𝑓
𝑓
𝑓
𝑥
𝑑
𝑥
𝑥
𝑑
𝑓
𝑥
𝑥
𝑥
𝑓
𝑥

+

1
2
(2− ) =1

Figure 1: Graph of pdf for

( )
𝑥
𝑓
𝑋
𝑑
𝑥
𝑥
𝑥
𝑑
𝑥
So, if we wish to calculate the probability that a person waits
less than 30 seconds (or 0.5 minutes) for the elevator to
arrive, then we calculate the following probability using the
pdf and the fourth property in Definition 4.1.1:

(0≤ ≤0.5)=


0
0.5
( ) =


0
0.5
=0.125

Note that, unlike discrete random variables, continuous


random variables have zero point probabilities, i.e., the
probability that a continuous random variable equals a single
value is always given by 0. Formally, this follows from
properties of integrals:

( = )= ( ≤ ≤ )=

( ) =0.
𝑃
𝑓
𝑥
𝑃
𝑓
𝑎
𝑎
𝑑
𝑥
𝑥
𝑋
𝑥
𝑑
𝑑
𝑋
𝑥
𝑥
𝑎
𝑃
𝑎
𝑋
𝑎
Informally, if we realize that probability for a continuous
random variable is given by areas under pdf's, then,
since there is no area in a line, there is no probability
assigned to a random variable taking on a single value. This
does not mean that a continuous random variable will never
equal a single value, only that we do not assign any
probability to single values for the random variable. For this
reason, we only talk about the probability of a continuous
random variable taking a value in an INTERVAL, not at a
point. And whether or not the endpoints of the interval are
included does not affect the probability. In fact, the following
probabilities are all equal:

( ≤ ≤ )= ( < < )= ( ≤ < )= ( < ≤ )=

( )
Cumulative Distribution Functions
(CDFs)
Recall Definition 3.2.2, the definition of the cdf, which applies
to both discrete and continuous random variables. For
continuous random variables we can further specify how to
calculate the cdf with a formula as follows. Let

have pdf
𝑃
𝑓
𝑏
𝑎
𝑓
𝑋
𝑥
𝑎
𝑑
𝑋
𝑥
𝑏
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
, then the cdf

is given by

( )= ( ≤ )=


−∞

( ) ,for ∈ℝ.

In other words, the cdf for a continuous random variable is


found by integrating the pdf. Note that the Fundamental
Theorem of Calculus implies that the pdf of a continuous
random variable can be found by differentiating the cdf. This
relationship between the pdf and cdf for a continuous random
variable is incredibly useful.

Relationship between PDF and CDF for a


Continuous Random Variable
Let

be a continuous random variable with pdf

and cdf

.
𝐹
𝐹
𝑓
𝑥
𝐹
𝑓
𝑋
𝑡
𝑥
𝑑
𝑡
𝑃
𝑋
𝑥
𝑥
• By definition, the cdf is found by integrating the pdf:


( )=

−∞

()

• By the Fundamental Theorem of Calculus, the pdf can be


found by differentiating the cdf:
( )=

[ ( )]

Example
4.1.2
Continuing in the context of Example 4.1.1, we find the
corresponding cdf. First, let's find the cdf at two possible
values of

=0.5
and

=1.5
:

(0.5)
𝐹
𝑓
𝑥
𝑓
𝑑
𝐹
𝑥
𝑥
𝑋
𝐹
𝑥
𝑡
𝑥
𝑥
𝑥
𝑑
𝑡
𝑑
(1.5)
=


−∞
0.5
() =


0
0.5
=

2
2




0.5
0
=0.125
=


−∞
1.5
𝑓
𝐹
𝑡
𝑡
𝑑
𝑡
𝑡
𝑑
𝑡
() =


0
1
+


1
1.5
(2− ) =

2
2




1
0

+(2 −

2
2
𝑓
𝑡
𝑡
𝑡
𝑑
𝑡
𝑡
𝑡
𝑑
𝑡
𝑡
𝑑
𝑡
)



1.5
1
=0.5+(1.875−1.5)=0.875

Now we find

( )
more generally, working over the intervals that

( )
has different formulas:

for <0: ( )
for 0≤ ≤1: ( )
for 1< ≤2: ( )
for >2: ( )
=


−∞

0 =0
=
𝐹
𝑓
𝑥
𝑑
𝑥
𝑥
𝑡
𝑥
𝑥
𝑥
𝑥
𝐹
𝐹
𝑥
𝑥
𝐹
𝐹
𝑥
𝑥

0

2
2



0
=

2
2


0
1
+


1
𝑡
𝑥
𝑡
𝑥
𝑥
𝑡
𝑑
𝑑
𝑡
𝑡
(2− ) =

2
2




1
0

+(2 −

2
2

)


=0.5+(2 −
𝑥
𝑡
𝑥
𝑡
𝑥
𝑡
𝑡
𝑑
𝑡
𝑥
2
2

)−(2−0.5)=2 −

2
2

−1
=


−∞

( ) =1

Putting this altogether, we write

as a piecewise function and Figure 2 gives its graph:

( )=





𝑓
𝑥
𝑥
𝐹
𝐹
𝑡
𝑥
𝑑
𝑡
𝑥



0,

2
2

,
2 −

2
2

−1,
1,
for <0
for 0≤ ≤1
for 1< ≤2
for >2
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Figure 2: Graph of cdf in Example 4.1.2

Recall that the graph of the cdf for a discrete random variable
is always a step function. Looking at Figure 2 above, we note
that the cdf for a continuous random variable is always a
continuous function.

Percentiles of a Distribution
Definition
4.1.2
The (100p)th percentile (

0≤ ≤1
) of a probability distribution with cdf
𝑝
is the value

such that

)= ( ≤

)= .
To find the percentile

of a continuous random variable, which is a possible value of


the random variable, we are specifying a cumulative
probability

and solving the following equation for


𝑝
𝜋
𝐹
𝑝
𝜋
𝐹
𝑝
𝜋
𝜋
𝑝
𝜋
𝑝
𝑝
𝜋
𝑃
𝑝
𝑋
−∞
() =
Special Cases: There are a few values of

for which the corresponding percentile has a special name.

• Median or 50

percentile:
.5
= =
2

, separates probability (area under pdf) into two equal


halves
• 1st Quartile or 25

percentile:
.25
=
1

, separates 1

quarter (25%) of probability (area) from the rest


𝑓
𝑝
𝑡
𝑝
𝑡
𝑠
𝑡
𝜇
𝑄
𝑡
𝑑
𝑄
𝑡
𝑝
𝜋
𝜋
• 3rd Quartile or 75

percentile:
.75
=
3

, separates 3

quarter (75%) of probability (area) from the rest


Example
4.1.3
Continuing in the context of Example 4.1.2, we find the
median and quartiles.

• median: find
.5

, such that (
.5
)=0.5⇒
.5
=1
(from graph in Figure 1)
• 1st quartile: find
1
𝑡
𝑟
𝑑
𝑄
𝜋
𝐹
𝜋
𝜋
𝜋
𝑄
=
.25

, such that (
.25
)=0.25
. For this, we use the formula and the graph of the cdf in
Figure 2:

2
.25

=0.25⇒
1
=
.25
=0.5



≈0.707
𝜋
𝜋
𝜋
𝑄
𝐹
𝜋
• 3rd quartile: find
3
=
.75

, such that (
.75
)=0.75
. Again, use the graph of the cdf:
2
.75

2
.75

−1=0.75 ⇒ (using Quadratic Formula)


3
=
.75
=4−2

2
𝜋
𝜋
𝜋
𝜋
𝐹
𝜋
𝑄
𝑄
≈1.293

This page titled 4.1: Probability Density Functions (PDFs) and


Cumulative Distribution Functions (CDFs) for Continuous
Random Variables is shared under a not declared license and
was authored, remixed, and/or curated by Kristin Kuter.

You might also like