# CMPE 320 MCRC The Functions of A Random Variable & the Received Signal Question

MEMO Number CMPE320-S22-0102DATE: 1 February 2022
TO: CMPE320 Students
FROM: EFC LaBerge
SUBJECT: Functions of a Random Variable
1
INTRODUCTION
This project will explore the pdf of functions of a random variable, including the pdf of a mixture
random variable.
Warning #1: Thinking is required!
Warning #3: It isn’t on the web, so don’t bother looking. You may, however, look up background
material, such as the definition of terms, etc. All of the terms are well-defined in your textbook
and the lectures.
This project involves concepts spread across the various lectures in Module 2, and uses elements
of the solution to Project 1. It is, however, perfectly acceptable (and desirable) to start early, to do
what you can and then go back and do more as the course content expands.
Remember, there are no exams in S22 CMPE320, so I’m looking for you to develop and explain
concepts we have developed in class.
This project involves analytical computation as well as simulation. Express your math well! If
necessary, you may hand-write your equations and insert them as pictures in your writeup.
You may not collaborate with any other CMPE320 student or students, nor consult with any other
humans other than Dr. LaBerge. You may ask all the questions you like in office hours, review
sessions, but the preferred method of clarification is via the Ask the Professor discussion forum on
2
FUNCTIONS OF A RANDOM VARIABLE
The engineers at Universally Marvelous Broadcasting and Communications (UMBC) are designing
how to detect the amplitude or the power of a bipolar signal of known amplitude but random sign
(or phase) that is corrupted by Additive White Gaussian Noise (AWGN)1. Three methods have
been suggested:
1) When the signal is received, it is passed the signal through a perfect diode detector, and
only the positive values are used; or,
1
The model for a signal with AWGN is
r(t) = (± A) + n(t), where r(t) is the received signal, (± A) is the desired signal, and n(t) ~ N (0,σ 2 )
2) When the signal is received, the processor computes the amplitude by taking the absolute
value of measured signal plus the noise; or,
3) When the signal is received, the processor computes the amplitude squared by taking the
square of the measured signal plus the noise, thus producing an estimate of the power.
The engineers have determined that method 1 will cost \$10 in production, but that method 2 will
cost \$20 in production and method 3 will cost \$40 in production. Any of the methods will produce
a result that meets the product requirements.
For all of the following questions, assume that the known amplitude is A = 2V , that the known
9
2
amplitude is equally likely (hint!) to be + A or − A , and the noise variance is σ = .
16
2.1
In this section we will build the model shown in Figure 1, which is known as the Additive White
Gaussian Noise Model for Binary Amplitude Shift Keying.
Random Variable X
!!

Random Variable R
+
0.5 for + = += #0.5 for + = −0 otherwise
!) (;) = ! = +- ; +- !* ++! = −- ; −- !* −-
by Law of Total Probability
Random Variable N
!#
\$
=
1
278 %
9 &\$
! /%( !
Define a random variable, R , to be the sum of two other random variables, X and N , where
⎪⎧ 0.5 x = A
f X (x) = ⎨
⎩⎪ 0.5 x = − A
f N (n) =
1
,
( 1)
− n2 /(2σ 2 )
e
2πσ 2
so that R = X + N . Assume that X and N are independent. We can use the Law of
Total Probability to write
(
)
(
)
f R (r) = f R|+ A (r | X = A) f X X = + A + f R|− A (r | X = − A) f X X = − A ,
Page: 2
S22 CMPE320
( 2)
Project 2 rev0 220201.docx saved 2/27/22 1:40:00 PM printed 3/1/22 4:32:00 PM
where f R|A (r | X = A) and f R|− A (r | X = − A) are Gaussian with means A and − A,
respectively, and both have the same variance as the noise.
Using ( 2), write out the analytical form of f R (r) as a function of r and A . Then perform
a large number of simulations to get sample values of R , using the values for A and σ 2
given above. Plot a scatterplot of the simulated values of R as a function of the index in
your array (i.e., x-axis goes from 1 to the number of trials, and explain how that plot
represents the signal model you have. Do the samples cluster around the values of + A
and − A ? (If not, there’s something wrong!)
Then, on a new figure, use techniques from Project 1 to plot the appropriately scaled
histogram representing f R (r) . Plot your analytical result for f R (r) on the same set of
axes as your appropriately scaled histogram. Discuss why the plot looks like it does.
You may use your random samples of R as the input in 2.2, 2.3, and 2.4, below.
There are two plots required for Section 2.1.
2.2
Method 1
2.2.1
Analytical PDF
Let S be the signal the output from the perfect diode detector that is the first method considered
by UMBC engineers, as shown in Figure 2. S is a function of the random variable R , and,
therefore is itself a random variable. Using the CDF method developed in class, analytically derive
the probability density function. That is, find the CDF, FS (s) = Pr ( S ≤ s ) and then differentiate
with respect to S to get the pdf f S (s) =
dFS
.
ds
Hint 1: A detailed example computation is given in the appendix.
Hint 2: −∞ < R < ∞ , so what range of S must be considered? Hint 3: The derivative has different forms for S < 0 and S > 0 .
The analytical result from this section will be used in 2.2.2, below.
Page: 3
S22 CMPE320
Project 2 rev0 220201.docx saved 2/27/22 1:40:00 PM printed 3/1/22 4:32:00 PM
Random Variable R
!! (#) = ! & +( # +( !” +(
+! & −( # −( !” −(
by Law of Total Probability
&
Perfect
Diode
Detector
*
!#\$%
Random Variable S
*=+ & =,
r ≤0
R
0
(B2)
By the Law of Total Probability
f R (r) = f R|+ A (r | + A) f X (+ A) + f R|− A (r | − A) f X (− A)
If we know that the value of X = A , then f R|A (r | A) = f N (r − A) =
1
X = − A, then f R|A (r | − A) = f N (r − A) =
f R (r) =
=
1
2
2πσ
1
2 2πσ 2
(e
2
2
e−(r− A) /2σ ×
−(r− A)2 /2σ 2
2πσ
2
2
(B3)
1
2πσ 2
2
2
e−(r− A) /2σ , and if
2
e−(r+ A) /2σ . Substituting in (B3) ,
2
2
1
1
1
+
e−(r+ A) /2σ ×
2
2
2
2πσ
2
+ e−(r+ A) /2σ
2
)
(B4)
The CDF for the new random variable, D = g( R) = R , or, equivalently, R = g −1 (D) = D 2
⎧⎪
0
d ≤0
FD (d) = ⎨
⎪⎩ Pr ⎡⎣ D ≤ d ⎤⎦ d > 0

0
r ≤0

=⎨
2

⎪⎩ Pr ⎣ R ≤ d ⎦ r > 0
⎧⎪
0
d ≤0
=⎨
2
F
(d
)
d >0
⎩⎪ R

⎪⎪
=⎨

⎪⎩
d

⎪⎪
== ⎨
1
d >0

2
⎪⎩ 2 2πσ
d ≤0
0
2
f R (r) dr
−∞
d ≤0
0
∫ (e
d2
−(r− A)2 /2σ 2
2
+ e−(r+ A) /2σ
2
−∞
) dr
d >0
(B5)
We don’t actually need to evaluate (B5), because our goal is the pdf, f D (d) =
that differentiation for d > 0 needs Liebniz Rule, and looks like this
dFD (d)
. Performing
dd
d2

d ⎡
1
−(r− A)2 /2σ 2
−(r+ A)2 /2σ 2
f D (d) =
e
+
e
dr

dd ⎢ 2 2πσ 2 −∞
⎥⎦

⎡⎛ dd 2 ⎞

−( d 2 − A)2 /2σ 2
−( d 2 + A)2 /2σ 2
×
e
+
e
⎢⎜

⎢⎝ dd ⎠

⎢ ⎛

1
d(−∞) ⎞
−( d 2 − A)2 /2σ 2
−( d 2 + A)2 /2σ 2

⎥ for d > 0
=
−⎜
+e
⎟× e

2 2πσ 2 ⎢ ⎝ dd ⎠
⎢ d2

d −(r− A)2 /2σ 2
−(r+ A)2 /2σ 2
+e
dr
⎢ + ∫ dd e

⎣ −∞

(
)
((
))
((
))
(
)
= 0 for d < 0 = δ (d) × FR (0) for d = 0 (B6) where the third expression comes from Lecture 8 on mixture random variable, and δ (d) is the Dirac Delta function. Simplifying the terms of (B6), ⎧ ⎪ ⎪ ⎪ f D (d) = ⎨ ⎪ ⎪ ⎪ ⎩ Page: 11 S22 CMPE320 d 0 Project 2 rev0 220201.docx saved 2/27/22 1:40:00 PM printed 3/1/22 4:32:00 PM We can evaluate FR (0) using the definition of our Q(x) function, where Q(x) = ∞ 1 2πσ 2 ∫e −u 2 /2σ 2 du . The computation looks like this: x ( ) ( ) 0 ⎡ 0 −(r− A)2 /2σ 2 ⎤ 2 2 FR (0) = e dr + ∫ e−(r+ A) /2σ dr ⎥ ⎢ ∫ ⎥⎦ 2 2πσ 2 ⎢⎣ −∞ −∞ A− r dr A Let v = , dv = − or − σ dv = dr,r = −∞ → v = +∞,r = 0 → v = σ σ σ r+A dr A Let w = ,dw = or − σ dw = dr,r = −∞ → w = −∞,r = 0 → w = σ σ σ Substituting 1 = = = ∫( 1⎡ σ ⎢− 2 ⎢⎣ 2πσ 2 FR (0) = 1⎡ 1 ⎢ 2 ⎢⎣ 2π 1⎡ 1 ⎢ 2 ⎢⎣ 2π ∫ (e ∞ − v 2 /2 A/σ ∫( ∞ e− v 2 /2 A/σ A/σ e− v ) /2 ∞ ) dv + ) 2 ∫ (e A/σ 1 2π 2πσ − w2 /2 −∞ ⎛ 1 dv + ⎜ ⎝ 2π ∫( ∞ 2 ∫ (e A/σ σ dv + 2 0 ) dw⎥⎥⎦ ⎤ ) e− w /2 dw − −∞ − w2 /2 ) dw⎥⎥⎦ ⎤ (note the σ cancelled ∫( ∞ 1 2π A/σ 1 σ2 ⎞⎤ 2 e− w /2 dw⎟ ⎥ ⎠ ⎥⎦ ) 1 1 ⎡Q( A / σ ) + 1− Q( A / σ ) ⎤ = ⎣ ⎦ 2 2 ( ) ) (B8) In the next-to-last step of (B8), we manipulated the equality 1 2π ∫( ∞ ) 2 e− w /2 dw = −∞ 1 2π ∫( e− w /2 dw + ∫( e− w /2 dw − A/σ 2 −∞ ) 1 2π ∫ (e ∞ − w2 /2 A/σ ) dw (B9) to get 1 2π ∫( A/σ −∞ 2 ) e− w /2 dw = 1 2π ∞ −∞ 2 ) 1 2π ∫ (e ∞ A/σ − w2 /2 ) dw . (B10) The first term on the right side of (B10) is the integral of an N (0,1) pdf over the region (−∞,∞) , which is equal to 1. That substitution gives us the final equality of (B8) This gives our final answer Page: 12 S22 CMPE320 Project 2 rev0 220201.docx saved 2/27/22 1:40:00 PM printed 3/1/22 4:32:00 PM ⎧ ⎪ ⎪ ⎪⎪ f D (d) = ⎨ ⎪ ⎪ ⎪ ⎪⎩ d 2πσ 2 (e d 0 (B11) Figure 5 show a plot of (B11). f D (d) for D = g(R) = sqrt(R) for R>=0, 0 otherwise
1
0.9
Impulse with area 0.5
0.8
0.7
f D (d)
0.6
0.5
0.4
0.3
0.2
0.1
0
-3
-2
-1
0
1
2
3
d Value of Random Variable D
Figure 5 Plot of f D (d)
Page: 13
S22 CMPE320
Project 2 rev0 220201.docx saved 2/27/22 1:40:00 PM printed 3/1/22 4:32:00 PM
Appendic C: Detailed Example of analytical method of determining fY ( y)
for a transformation Y = g( X )
Let’s apply the analytical method to the previous problem. Again, D = g( R) = R, R > 0, and 0
otherwise.
For d < 0, f D (d) = 0 , by the definition of the random variable D . 1 For d = 0, f D (0) = Pr ⎡⎣ D = 0 ⎤⎦ = Pr ⎡⎣ R ≤ 0 ⎤⎦ δ (d) = δ (d) , by the same derivation in (B8) . 2 For D > 0, the analytical method gives us
⎡ 1

f D (d) = ⎢
fR r ⎥
⎢⎣ dd / dr
⎥⎦ r=g −1 ( d )
()
(C1)
d = g(r) = r for r > 0
dd
1
1
=−
=−
dr
2d
2 r
(C2)
g −1 (r) = d 2
Substituting (C2) into Error! Reference source not found. and combining all of the results

0

⎪⎪
1
f D (d) = ⎨
δ (d)
2

2
2
2
2
2
2
2d

e−( d − A) /2σ + e−( d + A) /2σ

2
⎪⎩ 2 2πσ
(
which is the same as (B11).
d 0
(C3)

Don't use plagiarized sources. Get Your Custom Essay on
CMPE 320 MCRC The Functions of A Random Variable & the Received Signal Question
Just from \$13/Page

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

## Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.