0% found this document useful (0 votes)
10 views70 pages

PRV 03 RV Notes

The document discusses random variables, focusing on discrete random variables and their transformations, including examples such as rolling dice and various probability mass functions (PMFs). It covers different distributions like Bernoulli, Binomial, Geometric, and Poisson, explaining their applications and properties. Additionally, it touches on continuous random variables, cumulative distribution functions (CDFs), and the relationship between PMFs and probability density functions (PDFs).

Uploaded by

ctyws6rtw4
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)
10 views70 pages

PRV 03 RV Notes

The document discusses random variables, focusing on discrete random variables and their transformations, including examples such as rolling dice and various probability mass functions (PMFs). It covers different distributions like Bernoulli, Binomial, Geometric, and Poisson, explaining their applications and properties. Additionally, it touches on continuous random variables, cumulative distribution functions (CDFs), and the relationship between PMFs and probability density functions (PDFs).

Uploaded by

ctyws6rtw4
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

Probability & Random Variables

Random Variables & Transformations

Joohyun Lee

Department of Electronic Engineering


Sogang University
(Discrete) Random Variables
▪ A random variable (r.v.) is a function that assigns a real
number, X(s), to each outcome s in the sample space
▪ For a discrete r.v., the mapping is to the set of integer
Mapping, X(s) = x

S
s
real number line
x

2
Roll of Dice Example
▪ Random variable I is the number of dots on the die
sample space Mapping, I (  ) = 3

 
   
 i
1 2 3 4 5 6
fI[i]
▪ Sample space: SI = {1, 2, 3, 4, 5, 6}
▪ Probability Mass Function (PMF) fI[i] 1/6

6
f𝐼 𝑖 = Pr 𝐼 = 𝑖 i
෍ f𝐼 𝑖 = 1 1 2 3 4 5 6
𝑖=1
3
Roll a Pair of Dice
fI[i]
Find the PMF fI[i]
6
1/6

1/9
5
1/18
i
I=5 4 2 4 6 8 10 12

Pr[I=5] =
12
3
check: ෍ f𝐼 𝑖 = 1
𝑖=1
2
I=3 Pr[I=3] =

I=2 1 Pr[I=2] =
1 2 3 4 5 6 4
Some Distributions for Discrete R.V.
▪ Bernoulli
▪ e.g., binary data
▪ Uniform
▪ e.g., roll of a die
▪ Binomial
▪ e.g., sequence of binary events
▪ Geometric
▪ e.g., waiting times
▪ Poisson
▪ e.g., number of events or arrivals 5
Bernoulli Random Variable (Parameter p)
𝑆 = true, false PMF:
fI[i] p
𝐼 ∈ 1, 0 1−p

Pr 𝐼 = 1 = 𝑝 i
0 1
Pr 𝐼 = 0 = 1 − 𝑝

Example
sample space PMF:
fI[i]
+5 V
1 1/2 1/2 𝑆𝐼 = {0, 1}
0 −5 V
i
0 1 6
Discrete Uniform R.V. (Parameters n, m)
1
PMF: f𝐼 𝑖 = 𝑚≤𝑖≤𝑛
𝑛−𝑚+1
Example
Draw a ticket at a raffle; tickets numbered 0, 1, …, 9.
Selection of tickets equally likely. I is the ticket number.
The probability mass function is given by f 𝑖 = 1 𝑖 = 0,1, ⋯ , 9
𝐼
10

fI [i]

1/10
i
-1 0 2 4 6 8 10 7
Binomial R.V. (Parameters p, n)
Consider a binary sequence (ones and zeros) of length n
Let I be the number of times a one occurs in that sequence
𝑛 𝑖
The PMF is given by f𝐼 𝑖 = Pr 𝐼 = 𝑖 = 𝑝 1 − 𝑝 𝑛−𝑖
𝑖
fI[i]

i
Note 0 1 2 3 4 5

This model also applies to many other problems, for example,


I could be the number of bit errors in the sequence. 8
Using the Binomial Distribution
Consider sequences of n=5 binary digits
The sample space is
{00000, 00001, 00010, 00011, 00100, 00101, …, 11110, 11111}
25 = 32
Let I represent the number of 1’s in each sequence
Assuming that 𝑝 = Pr 1 = 0.5 , compute the probability that
I = 0, 1, 2, 3, 4, 5

9
Using the Binomial Distribution
0 5 3 2
5 1 1 1 5 1 1 1
f𝐼 0 = Pr 𝐼 = 0 = = Pr 𝐼 = 3 = = 10 ⋅
0 2 2 32 3 2 2 32
1 4 4
5 1 1 1 5 1 1 1
f𝐼 1 = Pr 𝐼 = 1 = =5⋅ Pr 𝐼 = 4 = =5⋅
1 2 2 32 4 2 2 32
2 3 5 0
5 1 1 1 5 1 1 1
f𝐼 2 = Pr 𝐼 = 2 = = 10 ⋅ Pr 𝐼 = 5 = =
2 2 2 32 5 2 2 32
10/32
fI[i]
5/32

1/32 i

0 1 2 3 4 5 10
Binomial Distribution: Another Example
Consider a binary communication channel with channel error probability, p = 10–2.
The length of the binary sequence being transmitted is one hundred (100).
The number of errors I in 100 bits is a binomial random variable.
What is the probability of more than 3 errors?
3

Pr 𝐼 ≥ 4 = 1 − Pr 𝐼 < 4 = 1 − ෍ f𝐼 [𝑖]
𝑖=0
=

11
Geometric Random Variable (Parameter p)
Consider a sequence of trials (length indefinite) in which an event A may occur with Pr 𝐴 = 𝑝

Define the random variable I as


I = the number trials until the first occurrence of A or between two successive
occurrences of A.
The PDF is
f𝐼 𝑖 = 𝑝(1 − 𝑝)𝑖 𝑖≥0
or

f𝐼 𝑖 = 𝑝(1 − 𝑝)(𝑖−1) 𝑖≥1

Example: Waiting for the right bus.


12
Geometric Random Variable (Parameter p)
The probability mass function for the geometric random variable:
Type 1: SI = {1, 2, 3, …, }
f𝐼 [𝑖] = Pr[ 𝐼 = 𝑖] = (1 − 𝑝)𝑖−1 𝑝, 𝑖 = 1,2,3, ⋯ , ∞
∞ ∞ ∞
Check:
෍ f𝐼 [𝑖] = Pr[ 𝐼 = 𝑖] = 𝑝 ෍(1 − 𝑝)𝑖−1 = 𝑝 ෍(1 − 𝑝)𝑗 =
𝑖=1 𝑖=1 𝑗=0

f𝐼 [𝑖] = Pr[ 𝐼 = 𝑖] = (1 − 𝑝)𝑖 𝑝, 𝑖 = 0,1,2, ⋯ , ∞


Type 0: SI = {0, 1, 2, …, }
∞ ∞

Check: ෍ f𝐼 𝑖 = 𝑝 ෍ 1 − 𝑝 𝑖
=
𝑖=0 𝑖=0 13
Binary Symmetric Channel Application
Consider a binary symmetric communication channel with channel error
probability Pr[1|0] = Pr[0|1] = p = 10–2.
The length of the binary sequence being transmitted is very large (infinite).
What is the probability that the first error occurs after the third transmission?
The waiting time J to the first error is a geometric random variable.
The probability of the first error occurs after the 3rd transmission is

Pr 𝐽 ≥ 3 =

14
Poisson Random Variable (parameter 𝛼)
Consider the occurrence of an event in a certain time period or in a
certain region of space.

I is the number of occurrences

𝛼 𝑖 −𝛼
f𝐼 𝑖 = Pr 𝐼 = 𝑖 = 𝑒 ​𝑖 ≥ 0
𝑖!

Applies to:
Number of packets arriving at a network switch (time).
Number of defects in a semiconductor chip (space).
15
Poisson Random Variable (parameter 𝛼)
The probability mass function is given by
𝛼 𝑖 −𝛼
f𝐼 𝑖 = Pr 𝐼 = 𝑖 = 𝑒
𝑖!

In many applications,  = T,


where  is the average number of occurrences per second
and T is a time period in seconds.

𝛼 𝑖 −𝛼
Check: ෍ 𝑒 =
𝑖!
𝑖=0
16
Poisson as Approximation to Binomial
Let N be large and p be small such that Np =  for a binomial random variable.
It can be shown that:
𝑁 𝑖 𝑁−𝑖
𝛼 𝑖 −𝛼
Pr 𝐼 = 𝑖 = 𝑝 1−𝑝 ≅ 𝑒
𝑖 𝑖!

17
(Continuous) Random Variables
▪ A random variable (r.v.) is a function that assigns a real
number, X(s), to each outcome s in the sample space
▪ The mapping may be to any real numbers, rational or irrational
Mapping, X(s) = x

S
s
real number line
x

18
Cumulative Distribution Function (Continuous)
The fundamental description of a continuous random variable X is
through its cumulative distribution function (CDF), defined as
𝐹𝑋 (𝑥) = Pr[ 𝑋 ≤ 𝑥]

FX(x)
1.0
A typical CDF has the form:

x
0
19
Cumulative Distribution Function (Discrete)
Discrete random variables also have a CDF
𝑖

𝐹𝐼 [𝑖] = Pr[ 𝐼 ≤ 𝑖] = ෍ f𝐼 [𝑗]


𝑗=−∞

PMF CDF

20
Properties of the CDF
𝐹𝑋 (𝑥) = Pr[ 𝑋 ≤ 𝑥]
FX(x)
1.0

1. 0 ≤ 𝐹𝑋 𝑥 ≤ 1 x
0 a b
2. lim 𝐹𝑋 𝑥 = 1; lim 𝐹𝑋 𝑥 = 0
𝑥→∞ 𝑥→−∞

3. Monotonically increasing function: For any x > 0, FX(x+ x)  FX(x)

4. Pr 𝑎 < 𝑋 ≤ 𝑏 = 𝐹𝑋 𝑏 − 𝐹𝑋 𝑎
21
Probability Density Function (PDF)
PDF CDF

fX(x) FX(x)
1.0

x 0 x
a b a b
𝑥
𝑑𝐹𝑋 (𝑥)
𝑓𝑋 (𝑥) = 𝐹𝑋 (𝑥) = Pr[ 𝑋 ≤ 𝑥] = න 𝑓𝑋 (𝑧)𝑑𝑧
𝑑𝑥
𝑏 𝑏 𝑎 −∞

Pr[ 𝑎 < 𝑋 ≤ 𝑏] = න 𝑓𝑋 (𝑥)𝑑𝑥 = න 𝑓𝑋 (𝑥)𝑑𝑥 − න 𝑓𝑋 (𝑥)𝑑𝑥 = 𝐹𝑋 (𝑏) − 𝐹𝑋 (𝑎)


𝑎 −∞ −∞
22
Properties of the PDF

𝑓𝑋 (𝑥) ≥ 0 න 𝑓𝑋 (𝑥)𝑑𝑥 = 1
−∞ 𝑎+Δ𝑥

Pr[ 𝑎 < 𝑋 ≤ 𝑎 + Δ𝑥] = න 𝑓𝑋 𝑥 𝑑𝑥 ≈ 𝑓𝑋 (𝑎) ⋅ Δ𝑥


𝑎
fX(x)

x
x
a

Note that lim Pr[ 𝑎 < 𝑋 ≤ 𝑎 + Δ𝑥] = 0


Δ𝑥→0 23
Continuous-to-Discrete Signal Conversion
An analog to digital converter (ADC)
has a continuous random variable X X ADC K
as input and a discrete random
variable K as output.

The input is mapped into discrete


integer values:

24
PMF approximates PDF
The PMF approximates the pdf as follows: 𝐿𝑘 +Δ

f𝐾 [𝑘] = Pr[ 𝐾 = 𝑘] = Pr[ 𝐿𝑘 < 𝑋 ≤ 𝐿𝑘 + Δ] = න 𝑓𝑋 (𝑥)𝑑𝑥


𝐿𝑘
For a small positive , we have f𝐾 [𝑘] ≈ 𝑓𝑋 (𝑥)Δ
While fK[k]  1, fX(x) can take values greater than 1; however, both must satisfy:

fK[k] න 𝑓𝑋 (𝑥)𝑑𝑥 = 1
fX(x) −∞

෍ f𝐾 [𝑘] = 1
𝑘=−∞

Lk x …-3 - -1 0 1 2 3 … k
A B
 2 25
Some Distributions for Continuous RVs
▪ Uniform
▪ random number generation
▪ secure communication
▪ Exponential
▪ message interarrival times
▪ computer network service times
▪ system failures
▪ Gaussian
▪ noise in electronic systems
▪ sums of random variables
26
Uniform Random Variable (Parameters a, b)
Probability density function: fX(x)
1/(b−a)
1
𝑓𝑋 (𝑥) = ቐ𝑏 − 𝑎 , 𝑎 ≤ 𝑥 ≤ 𝑏
0, otherwise x
a b
Cumulative distribution function:
𝑥 𝑥
1 FX(x)
𝐹𝑋 (𝑥) = Pr[ 𝑋 ≤ 𝑥] = න 𝑓𝑋 (𝑧)𝑑𝑧 = න 𝑑𝑧
−∞ 𝑎 𝑏 − 𝑎 1
0, 𝑥<𝑎
𝑥−𝑎
𝐹𝑋 (𝑥) = , 𝑎≤𝑥<𝑏 x
𝑏−𝑎 a b
1, 𝑥≥𝑏
27
Uniform Random Variable: Example
Let a = 0, b = 10. Find Pr[2 < X ≤ 6]

fX(x) FX(x)
1/10
1

x x
0 2 6 10 2 6

Pr 2 < 𝑋 ≤ 6 =

28
Exponential Random Variable (Parameter 𝜆)
Probability density function: fX(x)
0 𝑥<0 e−x
𝑓𝑋 𝑥 = ቊ −𝜆𝑥
𝜆𝑒 𝑥≥0
x
Cumulative distribution function:
𝑥
𝐹𝑋 𝑥 = Pr 𝑋 ≤ 𝑥 = න 𝑓𝑋 𝑧 𝑑𝑧 = FX(x) 1−e−x
−∞
0 𝑥<0
𝐹𝑋 𝑥 = ቊ
1 − 𝑒 −𝜆𝑥 𝑥≥0 x

Observe that: Pr[ 𝑋 > 𝑥] = 1 − Pr[ 𝑋 ≤ 𝑥] =


29
Exponential Random Variable: Example
The waiting time X, in a printer queue, is exponential fX(x)
with PDF 𝑓𝑋 𝑥 = 𝜆𝑒 −𝜆𝑥 ​, 𝑥 ≥ 0
e−x
(a) Pr 𝑇 < 𝑋 ≤ 2𝑇
2𝑇 x
−𝜆𝑢
= න 𝜆𝑒 𝑑𝑢 =
𝑇

(b) Pr 𝑇 < 𝑋 ≤ 2𝑇 = 𝐹𝑋 (2𝑇) − 𝐹𝑋 (𝑇) FX(x)


1−e−x
​ =

x
1
Let 𝜆 = ∶ Pr 𝑇 < 𝑋 ≤ 2𝑇 =
𝑇 30
The Memoryless Property
▪ Given that a system has been operational at time t sec, the probability that
it operates an additional h sec is same as the probability that it operates h
sec to begin with
▪ Applications of this property exist in queuing theory, communication and
computer networks
▪ Proof (for Exponential R.V.):
Show that Pr 𝑋 > 𝑡 + ℎȁ𝑋 > 𝑡 = 𝑃𝑟[𝑋 > ℎ]

31
Gaussian R.V. (Parameters 𝜇, 𝜎)
1 𝑥−𝜇 2
Probability density function: −
𝑓𝑋 𝑥 = 𝑒 2𝜎2 ,​ −∞ < 𝑥 < ∞
2𝜋𝜎

 = mean
fX(x)
 = standard deviation
1
0.607
2 
2𝜋𝜎

x
m− m m+
32
Gaussian R.V. (Parameters 𝜇, 𝜎)
𝑥
Cumulative distribution function:
𝐹𝑋 𝑥 = Pr 𝑋 ≤ 𝑥 = න 𝑓𝑋 𝑧 𝑑𝑧
−∞

1 𝑥 𝑧−𝜇 2

= න 𝑒 2𝜎2 𝑑𝑧
FX(x) 2𝜋𝜎 −∞

1
0.841


0.682 0.500
0.159
x
m− m m+
33
Transformations of Random Variable
If Y = g(X) and X is random, then Y is also random.

Find fY(y) given fX(x).


X Y
𝑔 ⋅

Y = g (X) and X = g−1 (Y) (Example: Y = 2X )

g(x) represents a system with no memory,


that is, Y only depends on present values of X.
- g(x) may be linear or nonlinear.
- Inverse g– 1(Y) may be multi-valued. 34
Gaussian vs. Normalized Gaussian

35
Finding Probabilities for Gaussian RVs
±
∞ 𝑧2
1
Define 𝑄 𝑦 = න 𝑒 −
2 𝑑𝑧 𝑥−𝜇
2𝜋 𝑦 𝑄
𝜎
then 𝑄 −𝑦 = 1 − 𝑄 𝑦 x

When x >  Pr[X > x] is the shaded area.
𝑥−𝜇
and Pr 𝑋 > 𝑥 = 𝑄 ±
𝜎 𝑥−𝜇
𝑄
𝜎
𝑥−𝜇
𝐹𝑋 𝑥 = Pr 𝑋 ≤ 𝑥 = 1 − 𝑄
𝜎
x 
When x <  Pr[X > x] is the unshaded area.
Table of inverse Q function values
l x = Q−1(10−l ) l x = Q−1(10−l ) l x = Q−1(10−l ) l x = Q−1(10−l )
1 1.2816 7 5.1993 13 7.3488 19 9.0133
2 2.3263 8 5.6120 14 7.6506 20 9.2623
3 3.0902 9 5.9978 15 7.9413 21 9.5050
4 3.7190 10 6.3613 16 8.2221 22 9.7418
5 4.2649 11 6.7060 17 8.4938 23 9.9730
6 4.7534 12 7.0345 18 8.7573 24 10.1990

Table of error function values


x erf(x ) x erf(x ) x erf(x ) x erf(x )
0.00 0.00000 0.40 0.42839 0.80 0.74210 1.20 0.91031
0.01 0.01128 0.41 0.43797 0.81 0.74800 1.21 0.91296
0.02 0.02257 0.42 0.44747 0.82 0.75381 1.22 0.91553
0.03 0.03384 0.43 0.45689 0.83 0.75952 1.23 0.91805
0.04 0.04511 0.44 0.46623 0.84 0.76514 1.24 0.92051
0.05 0.05637 0.45 0.47548 0.85 0.77067 1.25 0.92290
0.06 0.06762 0.46 0.48466 0.86 0.77610 1.30 0.93401
0.07 0.07886 0.47 0.49375 0.87 0.78144 1.35 0.94376
0.08 0.09008 0.48 0.50275 0.88 0.78669 1.40 0.95229
0.09 0.10128 0.49 0.51167 0.89 0.79184 1.45 0.95970
0.10 0.11246 0.50 0.52050 0.90 0.79691 1.50 0.96611
0.11 0.12362 0.51 0.52924 0.91 0.80188 1.55 0.97162
0.12 0.13476 0.52 0.53790 0.92 0.80677 1.60 0.97635
0.13 0.14587 0.53 0.54646 0.93 0.81156 1.65 0.98038
0.14 0.15695 0.54 0.55494 0.94 0.81627 1.70 0.98379
0.15 0.16800 0.55 0.56332 0.95 0.82089 1.75 0.98667
0.16 0.17901 0.56 0.57162 0.96 0.82542 1.80 0.98909
0.17 0.18999 0.57 0.57982 0.97 0.82987 1.85 0.99111
0.18 0.20094 0.58 0.58792 0.98 0.83423 1.90 0.99279
0.19 0.21184 0.59 0.59594 0.99 0.83851 1.95 0.99418
0.20 0.22270 0.60 0.60386 1.00 0.84270 2.00 0.99532
0.21 0.23352 0.61 0.61168 1.01 0.84681 2.05 0.99626
0.22 0.24430 0.62 0.61941 1.02 0.85084 2.10 0.99702
0.23 0.25502 0.63 0.62705 1.03 0.85478 2.15 0.99764
0.24 0.26570 0.64 0.63459 1.04 0.85865 2.20 0.99814
0.25 0.27633 0.65 0.64203 1.05 0.86244 2.25 0.99854
0.26 0.28690 0.66 0.64938 1.06 0.86614 2.30 0.99886
0.27 0.29742 0.67 0.65663 1.07 0.86977 2.35 0.99911
0.28 0.30788 0.68 0.66378 1.08 0.87333 2.40 0.99931
0.29 0.31828 0.69 0.67084 1.09 0.87680 2.45 0.99947
0.30 0.32863 0.70 0.67780 1.10 0.88021 2.50 0.99959
0.31 0.33891 0.71 0.68467 1.11 0.88353 2.55 0.99969
0.32 0.34913 0.72 0.69143 1.12 0.88679 2.60 0.99976
0.33
0.34
0.35928
0.36936
0.73
0.74
0.69810
0.70468
1.13
1.14
0.88997
0.89308
2.65
2.70
0.99982
0.99987
37
0.35 0.37938 0.75 0.71116 1.15 0.89612 2.75 0.99990
Using the Q-function
Gaussian random variable X has mean  and standard deviation .

a) Find the probability that X is within two  values of the mean.


Pr 𝜇 − 2𝜎 < 𝑋 ≤ 𝜇 + 2𝜎 =

𝑥−𝜇
𝑄 = Pr 𝑋 > 𝑥
𝜎
use tables

b) Repeat this problem for  –  < X ≤  + 


38
Communication System Example
Comm. Y = V + N
V System  = 10−2
N is Gaussian with  = 0 and  = 2

(a) Given that V = 500, find Pr[Y < 0]

Pr 𝑌 < 0 =

Since the noise PDF is symmetric around N = 0,


it follows that Pr[N < −x] = Pr[N > x], therefore
Pr[ 𝑌 < 0] =
39
Communication System Example
(b) Find V such that Pr[Y < 0] = 10–6.
Following the previous analysis, we can write

Pr 𝑌 < 0 =

Then setting this to the required value


and using the inverse Q-function table:

10−2 𝑉 10−2 𝑉
𝑄 = 10−6 ⇒ = 4.753
2 2
40
Finding Probabilities Using “Error Function”
𝑥
1 (𝑧−𝑚)2 1 𝑥−𝑚

𝐹𝑋 𝑥 = න 𝑒 2𝜎2 𝑑𝑧 = 1 + erf
2𝜋𝜎 2 2 2𝜎
−∞
where
2 𝑦 −𝑧 2
erf 𝑦 = න 𝑒 𝑑𝑧​ and erf −𝑦 = −erf 𝑦
𝜋 0

A “complementary error function” is sometimes also used:

2 ∞ −𝑧 2 1
erfc 𝑦 = න 𝑒 𝑑𝑧 = − erf 𝑦
𝜋 𝑦 2

Both “erf” and “erfc” are available in MATLAB. 41


Error Function Example
Random variable X is Gaussian with mean =1 and variance 2 = 6.25.
Find:
a Pr 𝑋 ≤ 1.7

b Pr 𝑋 ≤ 0.2

(c) Pr 𝑋 > 3.5

42
Unit Impulse Function (= Delta Function)

43
Representation of Discrete R.V.
Impulses (x) provide finite probability with zero width (see Appendix B)

44
Mixed Random Variables
The pdf contains impulses and is continuous over one or several intervals.

fX(x) FX(x)
A
1
A

x0 x x
x0

45
Transformations of Random Variable
If Y = g(X) and X is random, then Y is also random.

Find fY(y) given fX(x).


X Y
𝑔 ⋅

Y = g (X) and X = g−1 (Y) (Example: Y = 2X )

g(x) represents a system with no memory,


that is, Y only depends on present values of X.
- g(x) may be linear or nonlinear.
- Inverse g– 1(Y) may be multi-valued. 46
Transformations: The Single Valued Case
Transfer Characteristic:

dy
y Y=g(X)

dx
0 x 1
𝑓𝑌 𝑦 = 𝑓 𝑥
𝑑𝑦 𝑋 ቮ
Pr 𝑦 < 𝑌 ≤ 𝑦 + 𝑑𝑦 = Pr 𝑥 < 𝑋 ≤ 𝑥 + 𝑑𝑥 𝑑𝑥
𝑥=𝑔−1 𝑦

𝑓𝑌 𝑦 𝑑𝑦 = 𝑓𝑋 𝑥 𝑑𝑥
47
Transformations: Example 1
𝑓𝑋 𝑥
Let Y = g(X) = 2X with 1/4
1/4 0 ≤ 𝑋 ≤ 4 x
𝑓𝑋 𝑥 = ቊ 0 4
0 otherwise
y8

Then 𝑑𝑦 and 𝑋 = 𝑔−1 𝑌 =


=
𝑑𝑥
The pdf of Y can be obtained as:
x
1 0 4
𝑓𝑌 𝑦 = 𝑓 𝑥 ​= 𝑓𝑌 𝑦
𝑑𝑦 𝑋 ቮ
𝑑𝑥
𝑥=𝑔−1 𝑦 1/8
0 y 48
8
Transformations: Example 2
𝑓𝑋 𝑥
Let Y = g(X) = -2X with 1/4
1/4 0 ≤ 𝑋 ≤ 4 x
𝑓𝑋 𝑥 = ቊ 0 4
0 otherwise

Then 𝑑𝑦 and 𝑋 = 𝑔−1 𝑌 =


=
𝑑𝑥
The pdf of Y can be obtained as:
1
𝑓𝑌 𝑦 = 𝑓 𝑥 ​=
𝑑𝑦 𝑋 ቮ
𝑑𝑥
𝑥=𝑔−1 𝑦
49
Graphical Illustrations for Examples 1 & 2
y y y

y
4 x

fY(y)
8

0
8

x
0 4 -8
0
1/8

-8
fY(y)

𝑓𝑋 𝑥 𝑓𝑋 𝑥
1/4 1/4
x x
0 4 0 4 50
Transformations: Example 3
𝑓𝑋 𝑥
Let Y = g(X) = X + 3 with 1/4
1/4 0 ≤ 𝑋 ≤ 4 x
𝑓𝑋 𝑥 = ቊ 0 4
0 otherwise

Then 𝑑𝑦 and 𝑋 = 𝑔−1 𝑌 =


=
𝑑𝑥
The pdf of Y can be obtained as:
1
𝑓𝑌 𝑦 = 𝑓 𝑥 ​=
𝑑𝑦 𝑋 ቮ
𝑑𝑥
𝑥=𝑔−1 𝑦
51
Graphical Illustration of Example 3

y
y

7
7

3
3 0 4 x
1/4

0
fY(y)

𝑓𝑋 𝑥
1/4
x
0 4 52
Straight Line Transformation
Let Y = g(X) = aX + b
𝑑𝑦 𝑌−𝑏
Then = 𝑎, ​𝑋 =𝑔 −1
𝑌 =
𝑑𝑥 𝑎 1
y 𝑓𝑌 𝑦 = 𝑓 𝑥
Transfer Characteristic: 𝑑𝑦 𝑋 ቮ
d 𝑑𝑥 𝑦−𝑏
𝑥=
y 𝑎
1 𝑦−𝑏
= 𝑓𝑋
b dx 𝑎 𝑎

x
−𝑏ൗ 0
𝑎
53
Straight Line Transformation (Using CDF)
Let 𝑌 = 𝑎𝑋 + 𝑏, assume​ 𝑎 > 0
y Y = aX +b
Starting with FY(y) we can write:

𝐹𝑌 𝑦 = Pr 𝑌 ≤ 𝑦 = Pr 𝑎𝑋 + 𝑏 ≤ 𝑦
b
𝑦−𝑏 𝑦−𝑏
= Pr 𝑋 ≤ = 𝐹𝑋
𝑎 𝑎 x = (y -b)/a

Then
𝑑 𝑑 𝑦−𝑏 1 𝑦−𝑏
𝑓𝑌 𝑦 = 𝐹 𝑦 = 𝐹 = 𝑓𝑋
𝑑𝑦 𝑌 𝑑𝑦 𝑋 𝑎 𝑎 𝑎 54
Straight Line Transformation (Using CDF)
Let 𝑌 = 𝑎𝑋 + 𝑏, 𝑛𝑜𝑤​ assume 𝑎 < 0
b
𝑦−𝑏
𝐹𝑌 𝑦 = Pr 𝑌 ≤ 𝑦 = Pr 𝑋 > y
𝑎
𝑦−𝑏 𝑦−𝑏
= 1 − Pr 𝑋 ≤ = 1​ − 𝐹𝑋
𝑎 𝑎 x = (y -b)/a

Then 𝑑 𝑑 𝑦−𝑏 1 𝑦−𝑏


𝑓𝑌 𝑦 = 𝐹𝑌 𝑦 = 1 − 𝐹𝑋 = − 𝑓𝑋
𝑑𝑦 𝑑𝑦 𝑎 𝑎 𝑎

𝑑 1 𝑦−𝑏
Combine to find 𝑓𝑌 𝑦 = 𝐹 𝑦 = 𝑓
𝑑𝑦 𝑌 𝑎 𝑋 𝑎 55
Straight Line Transformation Summary

𝑌 = 𝑎𝑋 + 𝑏
General Case 1 𝑦−𝑏
𝑓𝑌 𝑦 = 𝑓
𝑎 𝑋 𝑎

Special Cases

𝑌 = 𝑎𝑋 𝑌 =𝑋+𝑏
1 𝑦
𝑓𝑌 𝑦 = 𝑎
𝑓𝑋 𝑎 𝑓𝑌 𝑦 = 𝑓𝑋 𝑦 − 𝑏

56
Straight Line Transformation Example
(The Gaussian Case)
Suppose that X is Gaussian with parameters X and X :
𝑥−𝜇𝑋 2
1 − 2
2𝜎𝑋
𝑓𝑥 𝑥 = 𝑒 −∞<𝑥 <∞
2𝜋𝜎𝑋
2
𝑦−𝑏 2
−𝜇𝑋
then 1 1 −
𝑎
1 −
𝑦− 𝑏+𝑎𝜇𝑋
2
2𝜎𝑋 2
2𝑎 2 𝜎𝑋
𝑓𝑦 𝑦 = 𝑒 = 𝑒
𝑎 2𝜋𝜎𝑋 2𝜋 𝑎 𝜎𝑋

Therefore Y is also Gaussian but with parameters Y = b + aX,


Y = |a|X
57
Transformations: the Multiple Valued Case
Transfer Characteristic: y
dy
Y=g (X)

dx1 dx2 dxm

x1 x2 xm
Pr 𝑦 < 𝑌 ≤ 𝑦 + 𝑑𝑦 = Pr 𝑥1 < 𝑋 ≤ 𝑥1 + 𝑑𝑥1 + ⋯ + Pr 𝑥𝑚 < 𝑋 ≤ 𝑥𝑚 + 𝑑𝑥𝑚

𝑓𝑌 𝑦 𝑑𝑦 = 𝑓𝑋 𝑥 𝑑𝑥1 ቚ + 𝑓𝑋 𝑥 𝑑𝑥2 ቚ + ⋯ + 𝑓𝑋 𝑥 𝑑𝑥𝑚 ቚ


𝑥=𝑥1 𝑥=𝑥2 𝑥=𝑥𝑚
𝑚
1
𝑓𝑌 𝑦 = ෍ 𝑓 𝑥 ቚ −1
𝑑𝑦 𝑋 𝑥=𝑔𝑘 𝑦
𝑘=1 58
𝑑𝑥
Example
𝑌 = 𝑔 𝑋 = 𝑎𝑋 2 , 𝑎 > 0 (−∞ < 𝑋 < ∞) dy
y
The pdf of X is known; find fY(y). Y=g (X)
1 1 dx
𝑓𝑌 𝑦 = 𝑓 𝑥 + 𝑓 𝑥 x1 x2
𝑑𝑦 𝑋 ቮ 𝑑𝑦 𝑋 ቮ
𝑑𝑥 𝑑𝑥
𝑥=𝑔1−1 𝑦 𝑥=𝑔2−1 𝑦
𝑦 𝑦
𝑥1 = 𝑔1−1 𝑦 =− ​ 𝑥2 = 𝑔2−1 𝑦 =+
𝑎 𝑎
𝑑𝑦
= 2𝑎𝑥 = 2 𝑎𝑦
𝑑𝑥
1 𝑦 𝑦
𝑓𝑌 𝑦 = 𝑓 − + 𝑓𝑋 + , ​𝑦 > 0 59
2 𝑎𝑦 𝑋 𝑎 𝑎
Example: Alternative method (using CDF)
Again consider 𝑌 = 𝑔 𝑋 = 𝑎𝑋 2 ​ 𝑎 > 0
y
where the of X is known.
Y=g (X)
To find fY(y), write:

𝐹𝑌 𝑦 = Pr 𝑌 ≤ 𝑦 = Pr 𝑎𝑋 2 ≤ 𝑦 x1 x2

𝑦 𝑦 𝑦 𝑦
= Pr − ≤𝑋≤ = 𝐹𝑋 − 𝐹𝑋 −
𝑎 𝑎 𝑎 𝑎

Then 𝑑 𝑦 𝑦 1 𝑦 𝑦
𝑓𝑌 𝑦 = 𝐹 − 𝐹𝑋 − = 𝑓 + 𝑓𝑋 −
𝑑𝑦 𝑋 𝑎 𝑎 2 𝑎𝑦 𝑋 𝑎 𝑎
60
The Radar Detection Problem
Consider a simple radar detection scheme:

Envelope X Y
Received Detector + +

RF Pulse
plus noise Threshold xT

Let Y = X – xT, where X is the received signal and xT is a threshold.


𝑋 > 𝑥𝑇 ​ or​ 𝑌 > 0​ target present
𝑋 ≤ 𝑥𝑇 ​ or​ 𝑌 ≤ 0​ target absent only noise received
Clearly xT should depend on the intensity of noise
61
The Radar Detection Problem
A FALSE ALARM occurs when the target is absent, but noise exceeds xT
A MISS occurs when the target is present, but the target signal is too weak to
exceed xT
Choose xT for an acceptable probability of false alarm and miss

Steps in the detection problem:


- Given fX(x) and the acceptable false alarm probability (pfa), find the threshold xT
- Using xT find the probability of detection (pd)

62
The Radar Detection Problem: Example
The received signal at a radar detector output is
𝑋 𝑡 =𝐴+𝑊 𝑡

where A is a constant and W(t) is Gaussian noise with mean zero and variance  2

For a fixed probability of false alarm (pfa),

find and plot the probability of detection (pd) versus signal-to-noise ratio (SNR):

signal power 𝐴2
𝑆𝑁𝑅 = 10 log10 = 10 log10 2
noise power 𝜎
63
The Radar Detection Problem: Example
Suppose A = 2 and it is required that pfa = 0.01

Case 1:

Let  2 = ¼ and find xT and pd.

The signal-to noise ratio in dB (decibel) is

𝐴2 22
𝑆𝑁𝑅 = 10 log10 2
= 10 log10 = 12.04 dB
𝜎 1/4
64
The Radar Detection Problem: Example
Target absent: X(t) = W(t) fX(x| Target absent)

pfa
Select xT such that

xT x
න 𝑓𝑋 𝑥 𝑑𝑥 = 𝑝𝑓𝑎 0
𝑥𝑇

Using the Q function, we require


𝑥𝑇 − 0
𝑄 = 𝑝𝑓𝑎
1
2
Then from the table: xT =
65
The Radar Detection Problem: Example
Target present: X(t) = 2 + W(t) fX(x| Target present)

𝑥𝑇 − 2 pd
𝑝𝑑 = න 𝑓𝑋 𝑥 𝑑𝑥 = 𝑄
𝑥𝑇
1
2
0 1.16
xT A
2
= 𝑄 −1.68 = 1 − 𝑄 1.68

= 1 − 0.047 = 0.953 fX(x| Target present)


fX(x| Target absent)
pd

xT A x
0 66
The Radar Detection Problem: Example
Case 2 (increased noise)
22 fX(x)
 2 = 4. Find pd. 𝑆𝑁𝑅 = 10 log10
4
= 0dB
pfa
Target absent: X(t) = W(t)
𝑥𝑇 − 0 xT x
𝑄 = 𝑝𝑓𝑎 0
2
From table: xT =
fX(x)
Target present: X(t) = 2 + W(t)
pd
4.65 − 2
𝑝𝑑 = 𝑄 = 𝑄 1.32 x
2 0 2 4.65
= 0.094 A xT 67
The Radar Detection Problem: Example
Case 3 (intermediate noise level):
Let  2 = 1. Find pd.
𝑆𝑁𝑅 = 6.02dB

Target absent: X(t) = W(t)

𝑥𝑇 − 0
𝑄 = 𝑝𝑓𝑎 ⇒ 𝑥𝑇 = 2.32​ from inverse Q table
1

Target present:

2.32 − 2
𝑄 = 68
1
Radar Detection (Concluded)
Plot of detection probability vs. SNR for fixed pfa:

pd
1 0.9496
0.9978

pfa = 0.01
0.5
0.38
0.034
0.094
−6 0 6 12 18 SNR
69
Radar Detection

70

You might also like