Ch4 Lec Continuous RV PDF
Ch4 Lec Continuous RV PDF
Ch4 Lec Continuous RV PDF
F(t)
1
t
10 10.5
a b x
CDF for a continuous RV uniformly distributed over [a, b].
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 x + fX (x) · δ.
FX (x + δ) − FX (x)
fX (x) = lim
δ→0 δ
dFX (x) 0
= = FX (x).
dx
if FX (x) is differentiable at x.
FX (x) fX (x)
1
1 b−a
a b x
a b x
CDF for a continuous RV uniformly distributed over PDF for a continuous RV uniformly distributed over
[a, b]. [a, b].
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
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
3 P (a ≤3.1
Sec. X ≤ b)Continuous
= FX (b) − FX (a)Variables
Random = fX (u)du.
and PDFs 3
a
PDF fX(x)
Sample Space
a b x
Event {a < X < b}
Properties of PDF
Ra
For any single value a, we have P [X = a] = fX (u)du = 0. For this reason,
a
PDF fX(x)
Sample Space
a b x
Event {a < X < b}
Range of Continuous RV
Range of a RV X is the set of all possible values of the RV.
For a continuous RV, we can define it as the set of all real numbers with
non-zero PDF.
SX = {x|fX (x) > 0}
SX defined here might not show all possible values of X but the difference is
unimportant.
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.
Z2
C (4x − 2x2 )dx = 1
0
Example (Cont.)
2x3 2
⇒ C 2x2 − =1
3 0
3
⇒ C=
8
b.
Z∞ Z2
3 1
P [X > 1] = fX (x)dx = (4x − 2x2 )dx =
8 2
1 1
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
1
⇒ λ=
100
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.
Homework
Assume that X is a continuous random variable with the following PDF:
A(2x − x2 ) for 0 < x < 2
fX (x) =
0 otherwise
Homework
Consider the function
2x for 0 ≤ x ≤ b
fX (x) =
0 otherwise
Suppose that event C is given and that P [C] > 0. The conditional CDF of
X given C is defined by:
P [{X ≤ x} ∩ C]
FX (x|C) = if P [C] > 0
P [C]
Example
The lifetime X of a machine has a continuous CDF FX (x). Find the conditional CDF
and PDF given the event C = {X > t} (i.e., “machine is still working at time t”).
Sol: P [{X ≤ x} ∩ {X > t}]
FX (x|X > t) = P [X ≤ x|X > t] =
P [{X > t}]
But, {X ≤ x} ∩ {X > t} = ∅ for x < t and {X ≤ x} ∩ {X > t} = {t < X ≤ x} for
x ≥ t. Therefore,
(
0 for x ≤ t
FX (x|X > t) = FX (x)−FX (t)
1−FX (t)
for x > t
fX (x)
fX (x|X > t) = for x ≥ t
1 − FX (t)
Suppose that we have a partition of the sample space S into the union of
disjoint events B1 , B2 , · · · , Bn . Let FX (x|Bi ) is the conditional CDF of X
given event Bi .
The theorem on total probability allows us to find the CDF of X in terms of
the conditional CDFs:
n
X n
X
FX (x) = P [X ≤ x] = P [X ≤ x|Bi ]P [Bi ] = FX (x|Bi )P [Bi ]
i=1 i=1
Y = X + N
where X is the transmitted signal, and N is a noise voltage with pdf fN1x2. Assume that
Chapter 4= p =One
P3“1”4 1 -Random
P3“0”4. Find the pdf of Y.
Variable
Sol: Let B0 be the event “0” is transmitted and B1 be the event “1” is transmitted, then B0 , B1
form a partition, and
Figure 4.5 shows the two conditional pdfs. We can see that the transmitted signal X shif
ter of mass of the Gaussian pdf.
x
⫺v 0 v
FIGURE 4.5
The conditional pdfs given the input signal
We can see that the transmitted signal X shifts the center of mass of the Gaussian
PDF.
Dr. Babar Mansoor EEE251 Probability Methods in Engineering 29 / 43
Expected Value of Continuous RVs
Expected Value
The expected value or mean of a continuous RV X is defined by
Z ∞
E[X] = xfX (x)dx
−∞
Therefore, Z∞
E[X] = xfX (x)dx
−∞
Zb
1
= x( )dx
b−a
a
b
1 1 2
= x dx
b−a 2 a
a+b
=
2
2p 2p
du
= a cos1vt + u2 = -a sin1vt + u2 `
L0 2p 0
a2 a2
E3Y24 = E3a2 cos21vt + ®24 = E B + cos12vt + 2®2 R
2 2
2p
a2 a2 du a2
= + cos12vt + u2 = .
2 2 L0 2p 2
Note that these answers are in agreement with the time averages of sinusoids: the time average
(“dc” value) of the sinusoid is zero; the time-average power is a2/2.
Dr. Babar Mansoor EEE251 Probability Methods in Engineering 33 / 43
Variance of a Continuous RV
Variance of a Continuous RV
For a continuous RV
Z∞
Var(X) = E (X − E[X])2 = (x − E[X])2 fX (x)dx
−∞
Z∞
2 2
= E[X ] − (E[X]) = x2 fX (x)dx − (E[X])2
−∞
Therefore,
4 3
Var[X] = E[X 2 ] − (E[X])2 = 3 − = .
9 4
1 y−b
fY (y) = − fX a<0
a a
Example:
Let X be a U nif orm(0, 1) RV, and let Y = eX .
Find the CDF and PDF of Y .
Find E[Y ].
Sol: First, note that we already know the CDF and PDF of X. In particular,
0 for x < 0
FX (x) = x for 0≤x≤1
1 for x > 1
It is a good idea to think about the range of Y before finding the distribution.
Since ex is an increasing function of x and SX = [0, 1], therefore,
SY = [1, e]. So we immediately know that
FY (y) = P (Y ≤ y) = 0, for y < 1,
FY (y) = P (Y ≤ y) = 1, for y ≥ e.
Example Cont.
To find FY (y) for y ∈ [1, e], we can write
FY (y) = P (Y ≤ y)
= P (eX ≤ y)
= P (X ≤ ln y) since ex is an increasing function
= FX (ln y)
= ln y since 0 ≤ ln y ≤ 1
Therefore,
0 for y < 1
FY (y) = ln y for 1 ≤ y < e
1 for y ≥ e
Z∞ Z1
X x
E[Y ] = E[g(X)] = E[e ] = e fX (x)dx = ex dx = e − 1
−∞ 0
Example:
Let X ∼ U nif orm(−1, 1), and Y = X 2 .
Find the CDF and PDF of Y .
Find E[Y ].
Sol: First, we note that SY = [0, 1]. As usual, we start with the CDF. For
y ∈ [0, 1], we have
FY (y) = P [Y ≤ y]
= P (X 2 ≤ y)
√ √
= P (− y ≤ X ≤ y)
√ √
y − (− y)
= since X ∼ U nif orm(−1, 1)
1 − (−1)
√
= y
Example Cont.
Therefore,
0 for y < 0
√
FY (y) = y for 0 ≤ y ≤ 1
1 for y > 1
Note that the CDF is a continuous function of Y , so Y is a continuous random
variable. Thus, we can find the PDF of Y by differentiating FY (y),
1
0
√
2 y for 0 ≤ y ≤ 1
fY (y) = FY (y) =
0 otherwise