Untitled
Untitled
Definition
4.1.1
The probability density function (pdf), denoted
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
[0,2]
. A possible pdf for
is given by
( )=
⎧
⎩
⎨
𝑓
𝑏
𝑓
𝑋
𝑋
𝑋
𝑥
𝑥
𝑑
𝑥
⎪
⎪
,
2− ,
0,
for 0≤ ≤1
for 1< ≤2
otherwise
The graph of
∫
−∞
∞
𝑥
𝑓
𝑓
𝑥
𝑓
𝑥
𝑥
𝑥
𝑥
𝑓
𝑥
∫
( ) =
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
( = )= ( ≤ ≤ )=
( ) =0.
( )
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
is given by
( )= ( ≤ )=
∫
−∞
𝑃
𝑓
𝑏
𝑎
𝐹
𝐹
𝑓
𝑋
𝑥
𝑥
𝑎
𝑥
𝑑
𝑋
𝑥
𝑃
𝑋
𝑏
𝑥
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
𝑃
𝑎
𝑋
𝑏
( ) ,for ∈ℝ.
and cdf
.
• By definition, the cdf is found by integrating the pdf:
∫
( )=
−∞
()
[ ( )]
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
( )=
⎧
⎩
⎨
⎪
⎪
⎪
⎪
0,
2
2
𝑓
𝑥
𝐹
𝐹
𝑥
𝑡
𝑥
𝑑
𝑡
,
2 −
2
2
−1,
1,
for <0
for 0≤ ≤1
for 1< ≤2
for >2
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
−∞
() =
Special Cases: There are a few values of
• Median or 50
ℎ
percentile:
.5
= =
2
percentile:
.25
=
1
, separates 1
percentile:
.75
=
3
, separates 3
, 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
, 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
Definition
4.1.1
The probability density function (pdf), denoted
𝑓
𝜋
𝑄
, of a continuous random variable
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
[0,2]
. A possible pdf for
is given by
( )=
⎧
⎩
⎨
⎪
⎪
,
2− ,
0,
for 0≤ ≤1
for 1< ≤2
otherwise
𝑓
𝑋
𝑋
𝑋
𝑥
𝑥
𝑥
𝑥
𝑥
The graph of
∫
−∞
∞
∫
( ) =
0
2
∫
=
0
1
𝑓
𝑓
𝑓
𝑥
𝑑
𝑥
𝑥
𝑑
𝑓
𝑥
𝑥
𝑥
𝑓
𝑥
∫
+
1
2
(2− ) =1
( )
𝑥
𝑓
𝑋
𝑑
𝑥
𝑥
𝑥
𝑑
𝑥
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
( = )= ( ≤ ≤ )=
( ) =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 ∈ℝ.
and cdf
.
𝐹
𝐹
𝑓
𝑥
𝐹
𝑓
𝑋
𝑡
𝑥
𝑑
𝑡
𝑃
𝑋
𝑥
𝑥
• By definition, the cdf is found by integrating the pdf:
∫
( )=
−∞
()
[ ( )]
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
( )=
⎧
⎩
⎨
⎪
𝑓
𝑥
𝑥
𝐹
𝐹
𝑡
𝑥
𝑑
𝑡
𝑥
⎪
⎪
⎪
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
∫
𝑝
𝜋
𝐹
𝑝
𝜋
𝐹
𝑝
𝜋
𝜋
𝑝
𝜋
𝑝
𝑝
𝜋
𝑃
𝑝
𝑋
−∞
() =
Special Cases: There are a few values of
• Median or 50
ℎ
percentile:
.5
= =
2
percentile:
.25
=
1
, separates 1
percentile:
.75
=
3
, separates 3
• 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.293