0% found this document useful (0 votes)
15 views

Tutorial 5 Solution

Uploaded by

dannyyang2222
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Tutorial 5 Solution

Uploaded by

dannyyang2222
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

ELEC2600 Tutorial 5

CDF and PDF


Conditional CDF and PDF
Examples
Cumulative Distribution Function (CDF)
2
 CDF defined as FX ( x) = P[ X ≤ x] for - ∞ < x < ∞
 Properties of the CDF
0 ≤ FX ( x ) ≤ 1 lim FX ( x ) = 1 lim FX ( x) = 0
x →∞ x → −∞

 FX(x) is non-decreasing: a < b ⇒ FX ( a ) ≤ FX (b)


 FX(x) is continuous from the right:
FX (b) = FX (b + ) = lim FX (b + h) for h > 0
h →0

 If FX(x0) = 0, then FX(x) = 0 for all x < x0. P[ X > a ] = 1 - FX ( a )

P ({X > a})

x a
Cumulative Distribution Function (CDF
3
 Properties of the CDF
P ({a < X ≤ b}) = FX (b) − FX (a )

P ({ X < a} ) =
FX ( a − ) FX ( a − ) =lim FX ( a − δ ) where δ > 0
δ →0

P[ a ≤ X ≤ b] = FX (b) − FX ( a − )

P ({= } ) FX (a) − FX (a − )
X a=
 Note: if the cdf is continuous, the endpoints can be excluded

P ({a < X ≤ b})


P ({a ≤ X ≤ b} )
P ({ X = a} )
P ({ X < a} )

a
Probability Density Function (PDF)
4
 PDF defined as
dF ( x) F (x + h ) − F (x )
f X ( x) = = lim h→0
dx h

 Properties of PDF
+∞
f X ( x) ≥ 0
x
FX ( x) = ∫−∞
f X (t )dt
∫−∞
f X (t )dt = 1

P [ a < X ≤ b=
] FX (b) − FX (a+=)
b a

−∞
f X ( x)dx − ∫
−∞
f X ( x)dx
b
=∫ f X ( x)dx
a+

P[ a < X ≤ b]
f X (x )

a b
Conditional CDF and PDF
5
 The conditional cdf a random variable X given an event C is

 The conditional pdf of a random variable X given and event C is

 Total probability theorem

 Differentiating with respect to x,


Expectation & Variance of Continuous Random
Variables
6
 The expected value or mean of a RV is defined as:
 Let Y=g(X) where X is a random variable. The expected value of Y
can be computed from

 Linearity of expected value:

 The variance of a RV, VAR[X] or σX2, is defined by:

 The standard deviation of a RV, STD[X] or σX, is defined by:


Important Continuous Random Variables
Continuous Uniform Exponential Gaussian (Normal)
Random Random Random Variable Random Variable
Variable Variable
Sample Space Sx=[a, b] Sx=[0, ∞) Sx=(– ∞, +∞)
Cumulative
Distribution
Function

Probability
Density Function

Expected Value
Variance 7
Φ(x) and Q-function
8
 Define Φ(x) to be the cdf of the “normalized” Gaussian with mean
m = 0 and standard deviation σ = 1:
Example 1 – CDF and PDF

The random variable X has CDF as shown in the figure below.

9
Example 1 – CDF and PDF Solution

(c)

10
Example 1 – CDF and PDF Solution
(d)

11
Example 2 – CDF and PDF Solution
The time (measured in hours) required to repair a machine is an
1
exponential random variable with parameter 𝜆𝜆 = .
2
(a) Find the probability that a repair time exceeds 2hours.
(b) Find the probability that a machine is not repaired in an
additional 1 hour, given that the repair time exceeds 9 hours.
Solution
Let X be the repair time of a machine
+∞ 1 −1𝑥𝑥
(a) P 𝑋𝑋 > 2 = ∫2 2 𝑒𝑒 2 𝑑𝑑𝑑𝑑 = e−1
(b) From the memoryless property of exponential distribution
1

𝑃𝑃 𝑋𝑋 > 1 + 9|𝑋𝑋 > 9 = 𝑃𝑃 X > 1 = e 2

12
Example 3 – Conditional CDF and PDF
A point is selected at random inside a square defined by {(𝑥𝑥,𝑦𝑦): 0≤𝑥𝑥≤𝑏𝑏,
0≤𝑦𝑦≤𝑏𝑏}. Assume the point is equally likely to be anywhere in the
square. Let 𝑋𝑋 be the x coordinate of the point, and 𝑌𝑌 be the y
coordinate of the point. Let 𝑍𝑍 be the minimum of the two coordinates
of the selected point.
(a) Find the region in the square corresponding to the event {𝑍𝑍≤𝑏𝑏/2}.
(b) Find the cdf of 𝑍𝑍.
(c) Compute the conditional cdf 𝐹𝐹𝑍𝑍(𝑧𝑧|𝑏𝑏/4≤𝑍𝑍≤𝑏𝑏/2) and the conditional
pdf 𝑓𝑓𝑍𝑍(𝑧𝑧|𝑏𝑏/4≤𝑍𝑍≤𝑏𝑏/2).
(d) Compute the conditional cdf 𝐹𝐹𝑍𝑍(𝑧𝑧|𝐵𝐵) and the conditional pdf 𝑓𝑓𝑍𝑍(𝑧𝑧|
𝐵𝐵), where 𝐵𝐵={𝑋𝑋>𝑏𝑏/2}.

13
Example 3 – Conditional CDF and PDF Solution
(a) We can see in the figure below, the area beneath the line y=x
correspond to the area y<𝑥𝑥. In this case, 𝑍𝑍≤𝑏𝑏/2 means that𝑦𝑦≤𝑏𝑏/2, as
shown in the blue area.
Similarly, for the case that 𝑦𝑦>𝑥𝑥, we can get the purple area.
Thus, the region corresponding to the event {𝑍𝑍≤𝑏𝑏/2} is just the blue
plus the purple area.

14
Example 3 – Conditional CDF and PDF Solution
(b) To find the CDF of 𝑍𝑍, we need to find 𝑃𝑃[𝑍𝑍≤𝑧𝑧] for any 𝑧𝑧.
If 𝑧𝑧<0, 𝑃𝑃[𝑍𝑍≤𝑧𝑧]=0.And if 𝑧𝑧>𝑏𝑏, 𝑃𝑃[𝑍𝑍≤𝑧𝑧]=1.
For 0≤𝑧𝑧≤𝑏𝑏, the event that 𝑍𝑍≤𝑧𝑧 will correspond to a similar region as
that of 𝑍𝑍≤𝑏𝑏/2, as shown by the region included in the red dashed line.
So
the area of the region inside the red dashed line b − ( b − z )
2 2 2
 z
P[ Z ≤ z ] = = =1 − 1 − 
 b
2
the area of the whole square b

0, z<0
 2
  z 
FZ ( z ) = 1 − 1 −  , 0 ≤ z ≤ b
  b
1, z >b

15
Example 3 – Conditional CDF and PDF Solution

16
Example 3 – Conditional CDF and PDF Solution

To calculate 𝑃𝑃[{𝑍𝑍≤𝑧𝑧}∩{𝑋𝑋>𝑏𝑏/2}], let’s see the figure again.


If 0≤𝑧𝑧≤𝑏𝑏/2, the intersection of the two events is shown in the shaded
field in figure (a)below.
If 𝑏𝑏/2≤𝑧𝑧≤𝑏𝑏, the intersection of the two events is shown in the shaded
field in figure (b) below.

17
Example 3 – Conditional CDF and PDF Solution

18
Example 4 - Gaussian Random Variable
Let X be a Gaussian random variable with m=5 and σ=4.
(a)Find 𝑃𝑃 𝑋𝑋 ≤ 𝑚𝑚 .
(b)Find 𝑃𝑃 𝑋𝑋 − 𝑚𝑚 ≤ 3𝜎𝜎 .
(c)Express 𝑃𝑃 𝑎𝑎 ≤ 𝑋𝑋 ≤ 𝑏𝑏 in terms of the Q function.
(d)Express 𝑃𝑃 𝑎𝑎 ≤ 𝑋𝑋 ≤ 𝑏𝑏 in terms of the Φ function.
Solution
(a) X be a Gaussian random variable with m=5 and σ=4, the we have its pdf:
𝑥𝑥−𝑚𝑚 2
1
𝑓𝑓𝑋𝑋 𝑥𝑥 = 2 𝑒𝑒 2𝜎𝜎2 .
2𝜋𝜋𝜎𝜎2
1
The pdf if symmetric over the mean, we have 𝑃𝑃 𝑋𝑋 ≤ 𝑚𝑚 = . (You can also get the
2
same result by integrating 𝑓𝑓𝑋𝑋 𝑥𝑥 ).
(b) 𝑃𝑃 𝑋𝑋 − 𝑚𝑚 ≤ 3𝜎𝜎 = 𝑃𝑃 −3𝜎𝜎 ≤ 𝑋𝑋 − 𝑚𝑚 ≤ 3𝜎𝜎 = 1 − 2𝑄𝑄 3
𝑎𝑎−𝑚𝑚 𝑋𝑋−𝑚𝑚 𝑏𝑏−𝑚𝑚 𝑎𝑎−𝑚𝑚 𝑏𝑏−𝑚𝑚
(c) 𝑃𝑃 𝑎𝑎 ≤ 𝑋𝑋 ≤ 𝑏𝑏 = 𝑃𝑃 ≤ ≤ = 𝑄𝑄 − 𝑄𝑄
𝜎𝜎 𝜎𝜎 𝜎𝜎 𝜎𝜎 𝜎𝜎
𝑎𝑎−𝑚𝑚 𝑋𝑋−𝑚𝑚 𝑏𝑏−𝑚𝑚 𝑏𝑏−𝑚𝑚 𝑎𝑎−𝑚𝑚
(d) 𝑃𝑃 𝑎𝑎 ≤ 𝑋𝑋 ≤ 𝑏𝑏 = 𝑃𝑃 ≤ ≤ =Φ −Φ
𝜎𝜎 𝜎𝜎 𝜎𝜎 𝜎𝜎 𝜎𝜎

19
Example 5 - Gaussian Random Variable
Let X be Gaussian random variable with m = 5 and σ2 = 16.
P[X < a] = 0.8869, find a.

Solution
 a −5  a −5
P [ X < a] =Φ =1− Q  =
0.8869
 4   4 
 a −5 a −5
⇒ Q  = 0.1131 ⇒ = 1.2
 4  4
⇒a= 9.8

20
Example 6 - Gaussian Random Variable
Measurement error X follows Gaussian distribution with zero mean
and σ = 20. Find the probability that the absolute error, |X|, is less than
20 meters.

Solution:
P  X < 20 = P [ −20 < X < 20=
] P [ X < 20] − P [ X ≤ −20]
 20   −20 
= Φ −Φ  = Φ (1) − Q (1) = Φ (1) − (1 − Φ (1) )
 20   20 
=Φ2 (1) − 1

21

You might also like