chapter 3: functions of random variablesbazuinb/ece3800sw/sw_notes03.pdf · notes and figures are...

48
Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012. B.J. Bazuin, Fall 2016 1 of 48 ECE 3800 Henry Stark and John W. Woods, Probability, Statistics, and Random Variables for Engineers, 4th ed., Pearson Education Inc., 2012. ISBN: 978-0-13-231123-6 Chapter 3: Functions of Random Variables Sections 3.1 Introduction 151 Functions of a Random Variable (FRV): Several Views 154 3.2 Solving Problems of the Type Y = g(X) 155 General Formula of Determining the pdf of Y = g(X) 166 3.3 Solving Problems of the Type Z = g(X, Y ) 171 3.4 Solving Problems of the Type V = g(X, Y ), W = h(X, Y ) 193 Fundamental Problem 193 Obtaining f VW Directly from f XY 196 3.5 Additional Examples 200 Summary 205 Problems 206 References 214 Additional Reading 214 Input signals to electrical systems are often modeled as values with some random components and potential a random noise process. A system will then modify the signal in some mathematical fashion to create and output. The output signal characteristics can be describe based on the input and the linear or non-linear operation performed. By understanding how functions modify both deterministic and random inputs, we can correctly predict the and model the system. .

Upload: others

Post on 15-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 1 of 48 ECE 3800

Henry Stark and John W. Woods, Probability, Statistics, and Random Variables for Engineers, 4th ed.,

Pearson Education Inc., 2012. ISBN: 978-0-13-231123-6

Chapter 3: Functions of Random Variables

Sections 3.1 Introduction 151 Functions of a Random Variable (FRV): Several Views 154 3.2 Solving Problems of the Type Y = g(X) 155 General Formula of Determining the pdf of Y = g(X) 166 3.3 Solving Problems of the Type Z = g(X, Y ) 171 3.4 Solving Problems of the Type V = g(X, Y ), W = h(X, Y ) 193 Fundamental Problem 193 Obtaining fVW Directly from fXY 196 3.5 Additional Examples 200 Summary 205 Problems 206 References 214 Additional Reading 214

Input signals to electrical systems are often modeled as values with some random components and potential a random noise process. A system will then modify the signal in some mathematical fashion to create and output. The output signal characteristics can be describe based on the input and the linear or non-linear operation performed. By understanding how functions modify both deterministic and random inputs, we can correctly predict the and model the system. .

Page 2: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 2 of 48 ECE 3800

3.1 Introduction 151

Functions of random variables

In engineering analysis, many times one random variable is a function of a second random variable, for example,

random power derived from a random voltage 2XY circular area derived from a random measurement of the diameter 2XY DC voltage measurement in the presence of R.V. noise XaY linear relationships bXmY

Think of XgY

… what can be described for the probability density functions (pdf) of Y and X?

Since the PDF is the integral of the pdf, we should have:

dyyfdxxf YX

For XgY a monotonically increasing function of X, the new pdf should be related to the previous pdf as something like:

dy

dxxfyf XY

For XgY a monotonically decreasing function of X, the new pdf must be increasing. As a result the new pdf should be related to the previous pdf as:

dy

dxxfyf XY

Page 3: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 3 of 48 ECE 3800

Amplitudescaling(anamplifier)arandomvariable… XAY

dy

dxxfyf XY

Ady

dx 1

Therefore, AA

yfyf XY

1

Example:

else

xforxf X

0

101020

1

Let an amplifier have a gain of 5A

Then XAY and 5

1

dy

dx

And

else

yfor

AA

yfyf XY

0

105

1020

1

5

11

Or

else

yforyfY

0

5050100

1

A uniform distribution remains a uniform distribution when gain is applied.

Page 4: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 4 of 48 ECE 3800

Text Example 3.1—2

Pulse detection (think sonar or radar signal returns).

Figure 3.1-2 Decoding of a noise-corrupted digital pulse by sampling and hard clipping.

In this problem we have a “deterministic signal”, a pulse and a random time sequence, additive Gaussian noise.

tntstx

If we same the signal at a particular time, can we tell if the signal is present?

For x(t),

T

trecttx

A square signal of duration T centered at time t=. The time offset can be either defined or a random variable.

The noise is Gaussian of unit variance and mean = 0;

nfor

nnf N ,

2exp

2

1 2

Page 5: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 5 of 48 ECE 3800

The signal detector will take time samples of x(t). What we can expect is that

when signal s is present, the mean value is 1 and the signal distribution is Gaussian when signal s is not present, the mean value is 0 and the signal distribution is Gaussian.

To determine detection, we set a threshold at ½ and want to know.

2

1Pr 0tx and

02

1Pr tx

For the Noise only case, S=0

2exp

2

1 2

1,0

nnnf N

=

21

221

0 2exp

2

1

2

1Pr dn

ndnnftx N

=

6915.02

1

2

1Pr 0

Ntx

Similarly computing

3085.02

11

2

1Pr 0

Ntx

For the Noise plus signal case, S=1.

Figure 3.1-3 The area associated with P[Y = 0] in Example 3.1-2.

We can define a normal random variable with a mean of 1 or look at the “corrected threshold value for a zero mean function.

Page 6: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 6 of 48 ECE 3800

2

1exp

2

1 2

1,1

nnf N

=

21

221

1,10 2

1exp

2

1

2

1Pr dn

ndnnftx N

=

3085.02

11

2

11

2

11|

2

1Pr 0

NNNStx

Similarly computing

6915.02

11

2

111|

2

1Pr 0

NNStx

Probability of a correct detection … in both cases, the probability of detecting the correct values is

6915.01|2

1Pr 0

Stx

6915.00|2

1Pr 0

Stx

and there is a probability of a false detection of.

3085.01|2

1Pr 0

Stx

3085.00|2

1Pr 0

Stx

Page 7: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 7 of 48 ECE 3800

Matlab simulation: see Fig_3_1_23.m

Signal plus Noise Signal and detected outputs Prob of Error = 0.315051 Theory Prob of Error = 0.308538

Change the “Signal” to have an amplitude of 4, with detection at 4/2 =2.

Signal plus Noise Signal and detected outputs Prob of Error = 0.0219192 Theory Prob of Error = 0.0227501

Page 8: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 8 of 48 ECE 3800

Functions of a Random Variable (FRV): Several Views 154

A mapping view:

We previously discussed random variables as a mapping to the real number plane. By taking a function of a random variables, we are simply changing to an alternate mapping.

The input output view:

Figure 3.1-4 Input/output view of a function of a random variable.

In performing system engineering, we are continually defining either linear or non-linear relationships between inputs and outputs. And, in general the values we measure have been provided by a “measurement system” that is simply doing exactly the same things. Taking a measurement and based on the measurement function providing an output.

If two different systems provide different mapping from input to output, did the underlying input change … no! So both outputs must be derived from and be descriptive of the input.

Page 9: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 9 of 48 ECE 3800

3.2 Solving Problems of the Type Y = g(X) 155

Linear mapping bXmY

Example 3.2-1

Let X be a uniform density R.V. between 0 and 1.

else

xxf X ,0

10,1

else

xxxFX ,0

10,

Let Y be a linearly related as 32 XY

then … 2

3 YX

From a scaling perspective, we must have

2

3yFyF XY

Therefore

else

yyy

FyF XY

,0

12

30,

2

3

2

3

or applying a change in variable

else

yy

yFyF XY

,0

53,2

3

2

3

finding the density function

dy

dxyxF

dx

dyF

dy

dyF

dy

dXXY

2

3

2

3

else

yyfY

,0

53,2

1 or

2

3

2

1 yfyf XY

Page 10: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 10 of 48 ECE 3800

As described previously, the generalization of this concept becomes:

Letting bXmY

For m positive

m

byXybXmyY

m

byFyF XY

m

byf

mm

by

dy

d

m

byf

dy

dx

m

byxfyf XXXY

1

What if m is negative? (not the inequality sign changes when multiplying by a negative)

m

byXybXmyY

For the probabilities,

m

byX

m

byXybXmyY Pr1PrPrPr

For a continuous distribution (notice that there may have to be corrections for discrete).

m

byX

m

byXybXmyY Pr1PrPrPr

Using the CDFs

m

byFyF XY 1

Taking a derivative to find the density functions and recognizing that m is negative.

m

byf

mm

byf

mm

by

dy

d

m

byfyf XXXY

11

Therefore, for all linear cases …

m

byf

myf XY

1

But it also works for other cases when there is a one-to-one relationship between X and Y!

Page 11: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 11 of 48 ECE 3800

Another example with a one-to-one relationship:

xuexf xX

xforeeexF xxx

v

vX 0,11

0

With 3XY

What is the new pdf for Y dy

dxxfyf XY

3

23

1

3

1y

dy

yd

dy

dx

32

31

3

131

yyueyf yY

yuyeyf yY

323

1

3

1

Now for the hard ones … non-one-to-one mappings

Page 12: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 12 of 48 ECE 3800

Example 3.2-2 and also Cooper and McGillem Page 62 and HW 2-3.3

Let the functional relationship be 2XY

If we “plug and chug” using past formula

dy

dxxfyf XY

There will be a problem of uniqueness if X is allowed to be both positive and negative; we map 2 different X values into the same value of Y!

This may be easier to consider based on the Distribution (CDF) and definitions.

The probability and CDF definition of yY occurs when yX 2 . This is equivalently to the

following bounds yXy where y is nonnegative; see C&McG Fig. 2-9 or below. 2XY

yx yx

The event is null when y is negative. Thus, based on the definition of the CDF we must have

0,

0,0

yyFyF

yyF

XX

Y

Differentiating with respect to y,

yfyFdy

dYY

ydy

dyxfy

dy

dyxfyFyF

dy

dXXXX

Therefore

0,

22

y

y

yf

y

yfyf XX

Y

The complete functional definition would be

0,

2

0,0

yy

yfyf

y

yf XXY

Page 13: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 13 of 48 ECE 3800

Continuing with the text example 3.2-2, assume that X is a Gaussian normal distribution with zero mean and unit variance.

xfor

xxf X ,

2exp

2

1 2

For the mapping 2XY , we will have (plug and chug)

0,

2

0,0

yy

yfyf

y

yf XXY

where

2exp

2

12

yyf x

and

2exp

2

12

yyf x

And the new density function becomes

2

exp2

1

2exp

22

2

2

2exp

2

1

2exp

2

1

y

y

y

yy

yy

yfY

Resulting in

0,

2exp

2

1

0,0

yy

y

y

yfY

What about discontinuous functions …

Page 14: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 14 of 48 ECE 3800

Example 3.2-3 A Half-Wave Rectifier

Figure 3.2-2 Half-wave rectifier

Let the functional relationship be

0.0

0,

X

XXY

If we “plug and chug” using past formula

dy

dxxfyf XY

with the following restriction … (the derivative at x = 0 is not simply defined, discontinuous)

yyf

y

y

yf

X

Y

0,

0??,

00

Based on knowledge of the CDF, we must determine the CDF at y=0 and then the pdf. We must account for the CDF of X at x=0 and relate that to the CDF of y!

0

000 dxfFF XXY

Based on the X pdf and CDF, this function results in a magnitude delta function at y=0!

yyf

yyF

y

yf

X

xY

0,

0,0

0,0

If we again use a Gaussian with zero mean and unit variance for X

xfor

xxf X ,

2exp

2

1 2

Page 15: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 15 of 48 ECE 3800

The result becomes

yyf

yy

y

yf

X

Y

0,

0,2

1

00

and

yy

yyFY 0,

00

Figure 3.2-3 The CDF of Y when X: N(0,1) for the half-wave rectifier.

Page 16: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 16 of 48 ECE 3800

Example 3.2-5 Transformation of the CDF

This particular example demonstrates why the Matlab simulations for generating the random variables demonstrated as part of the homework for chapter 2 works!

If the function

1 yFX Y

can be defined, a random variable can be generated by the “inverse mapping” of a uniform random variables to the desired distribution function random variable.

The MATLAB examples were demonstrating the one-to-one mapping, with the underlying function being a uniform density function

y

y

y

xf X

1,0

10,1

00

Page 17: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 17 of 48 ECE 3800

Example 3.2-7 Quantizing – with truncation

Figure 3.2-9 An analog-to-digital converter.

Quantization is the assignment of discrete digital values to a range of analog values. In quantization, limiting may also be applied, but we won’t consider that here.

The assignment can be defined as (“truncation” toward infinity)

aixaiaixg 1,

A continuous waveform with truncated samples taken at discrete time intervals is shown in the next figure.

Figure 3.2-10 Quantizer output (staircase function) versus input (continuous line).

For X a continuous R.V. and Y the quantizer output, iXiPiYPiPY 1

1 iFiFiYPiP XXY

then defining the CDF for Y as a discrete summation

Y

iXX

iYY iyuiFiFiyuiPyF 1

A figure is shown on the next page …

Page 18: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 18 of 48 ECE 3800

Quantization of the CDF of X

Y

iXX

iYY iyuiFiFiyuiPyF 1

Figure 3.2-11 FX(y) versus FY(y).

Page 19: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 19 of 48 ECE 3800

General comments on quantization or digitization.

When working with digitized analog waveforms, I usually think of the values as discrete values with a continuous error added.

... VRcontdigitalcontinuous XX

The random variable that describes the error is readily defined (when rounding is used) as

2,0

22,

12

0

LSB

LSBLSB

LSB

LSB

f

The error is uniformly distributed.

If a value is truncated instead of rounded.

LSB

LSBLSB

f

,0

0,1

00

Note that this distribution has a mean value! (Bias in the signal processing …. summing to infinity?!)

The importance in looking at this is to determine numerical processing errors as computations are performed. This is the numerical bias and error in digital signal processing performed in many modern devices.

Page 20: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 20 of 48 ECE 3800

General Formula of Determining the pdf of Y = g(X) 166

dyyfdyyYyP Y

For xgy has a finite number of real roots (multiple solutions), then the disjoint events (related to each of the roots) have the form

ygxi1 are related to the events

iiii dxxXxE or iiiii dxxXdxxE

If we then accumulate all of them

i

iiXY dxxfdyyfdyyYyP

By engineering manipulation (divide by dy)

i

iiX

i

iiXY dy

dxxf

dy

dxxfyf

Which can also be perform in terms of the functional derivative xgxgdx

d

dx

dy'

i i

iX

i iiXY xg

xf

dx

dyxfyf

'

1

, for ygxi1

The text figure of the multiple solutions and dx segments follows.

Figure 3.2-15 The event {y < Y ≤ y + dy} is the union of two disjoint events on the probability

space of X.

Page 21: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 21 of 48 ECE 3800

An alternate description based on the ECE 5820 textbook ….

Multiple solutions due to mapping. (from Alberto Leon-Garcia, “Probability, Statistics, and Random Processes For Electrical Engineering, 3rd ed.”, Pearson Prentice Hall, Upper Saddle River, NJ, 2008, ISBN: 013-147122-8 )

If the equation has n solutions, nxxx ,, ,10 , then 0yfY will be equal to n terms of the type on

the right-hand side of the solution. We now show that this is generally true by using a method for directly obtaining the pdf of Y in terms of the pdf of X.

Consider a nonlinear function XgY such as the one shown in Fig. 4.13.

Consider the event dyyYyCy and let yB be its equivalent events in X. For y

indicated in the figure, the equation yXg has three solutions 1x , 2x , and 3x and the

equivalent event yB has a segment corresponding to each solution:

333222111 dxxXxdxxXxdxxXxBy

The probability of the event yC is approximately

dyyfCP Yy

where dy is the length of the interval dyyYy . Similarly, the probability of the events

defined by yB is approximately

332211 dxxfdxxfdxxfBP XXXy

Page 22: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 22 of 48 ECE 3800

Since yC and yB are equivalent events, their probabilities must be equal. By equating the two

equations we obtain

332211 dxxfdxxfdxxfBPdyyfCP XXXyYy

Therefore

dy

dxxf

dy

dxxf

dy

dxxfyf XXXY

33

22

11

Written generically for multiple roots as

k xx

Xk

xx

XY

k

k

dydxxf

dxdy

xfyf

It is clear that if the equation yxg has n solutions, the expression for the pdf of Y at that point is given by this equation and contains n terms.

Page 23: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 23 of 48 ECE 3800

Repeating our text’s example 3.2-2

Let 2XY . For 0y the equation has two solutions, yx 0 and yx 1 , so the

summation has two terms.

Since xdxdy 2 , or

yxdxdy 22

The summation becomes

y

yf

y

yf

dxdy

xfyf XX

k

xx

XY

k

22

As an alternative, the “scaling factor” could have been computed as

y

ydy

d

dy

dx

2

1

which when substituted then yields the correct result again.

y

yfy

yfdydxxfyf XX

k xxXY

k

2

1

2

1

(Example 3.2-2 in our textbook and example 4.35 in Alberto Leon-Garcia, “Probability, Statistics, and Random Processes For Electrical Engineering, 3rd ed.”, Pearson Prentice Hall, Upper Saddle River, NJ, 2008, ISBN: 013-147122-8 )

Page 24: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 24 of 48 ECE 3800

Example 3.2-8 Amplitude Samples of a Sinusoidal Waveform

Let XY sin where X is uniformly distributed in the interval (-π,π]. This can be viewed as the sample of a sinusoidal waveform at an instant of time that is uniformly distributed over the period of the sinusoid. Find the pdf of Y.

We have

xxf X ,2

1

And we want XY sin

Figure 3.2-12 Graph showing roots of y = sin x when 0 ≤ y < 1.

Figure 3.2-13 Plot showing roots of y = sin x when −1 < y < 0.

It can be seen that 11 y and within this region, the equation xy sin has two solutions in each of two separate intervals of interest, positive and negative x.

yx 10 sin and yx 1

1 sin for 10 y

yx 10 sin and yx 1

1 sin for 01 y

We will need the derivative,

210 1sincoscos

0

yyxdx

dy

x

Alternately

2

1

1

1sin

ydy

yd

dy

dx

or

2

1

1

1sin

ydy

yd

dy

dx

Page 25: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 25 of 48 ECE 3800

To determine the density of Y for 10 y , we have two points and therefore

222 1

1

1

21

1

21

yyydx

dy

xfyf

k

xx

XY

k

, 10 y

To determine the density of Y for 01 y , for we have two points and therefore

222 1

1

1

21

1

21

yyydx

dy

xfyf

k

xx

XY

k

, 01 y

As the results are the same in both regions,

21

1

yyfY

11 y

And

2

1sin1sinsinsin 111

1

1

1

yyuduuf

yy

Y

Resulting in,

y

yy

y

yFY

1,1

11,sin

2

1

1,01

pdf fY(y) and CDF FY(y)

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

pdfCDF

Page 26: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 26 of 48 ECE 3800

3.3 Solving Problems of the Type Z = g(X, Y ) 171

Most problems of interest involve the some or product of multiple variables. Therefore we must deal with functions involving two or more random variables.

YXgZ , or even nXXXgZ ,,, 21

From a communications class we have ….

This shows (1) multiple filter stages, (2) additive Noise, and (3) a signal detector).

The ability to detect a transmitted signal is directly related to the detection methodology which is determined based on probability and statistics.

Page 27: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 27 of 48 ECE 3800

Example 3.3-1 Conceptual solution for Z=XY.

The CDF will be defined for zZ

For YXZ

The CDF would be defined based on

zYXZFzZ Z PrPr

It is helpful to consider the 2_D plot of (x,y) with lines in z

Figure 3.3-3 The region xy ≤ z for z > 0 Figure 3.3-4 The region xy ≤ z for z < 0.

If the Joint density function is known, we consider z>0 first.

Summing the upper half of Fig. 3.3-3 and lower half first, due to z>0

0

,

0

, ,,Pr dydxyxfdydxyxfzYXzF

yz

YX

yz

YXZ , for 0z

Summing the upper half of Fig. 3.3-4 and lower half first, due to z<0

0

,

0

, ,,Pr dydxyxfdydxyxfzYXzF

yz

YX

yz

YXZ , for 0z

Page 28: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 28 of 48 ECE 3800

As an alternate derivation, define an indefinite integral function in one dimension

dxyxfyxG YXYX ,, ,,

This allows us to “eliminate” one of the double summations … for z>0 this becomes

0

,,

0

,,

,,

,,

dyyyzGyG

dyyGyyzGzF

YXYX

YXYXZ

, for 0z

If we differentiate by z to determine the pdf, the inner terms of the integral simplify as only one is a variable in z.

0 ,

0

, ,00

,dy

dz

yyzdG

dydz

yyzdG

dz

zdF YXYXZ , for 0z

Taking the derivative of the integral of G after substituting the definition of G becomes

0 ,

0

, ,

00

,

dydz

dxyyzfd

dydz

dxyyzfd

dz

zdFYXYX

Z , for 0z

0

,

0

,

1,

1, dy

yyy

zfdyy

yyzf

dz

zdFYXYX

Z , for 0z

dyyy

zfydz

zdFzf YX

ZZ ,

1, , for 0z

A similar approach can be used for z<0, resulting in

dyyy

zfydz

zdFzf YX

ZZ ,

1, , for z

Page 29: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 29 of 48 ECE 3800

Solving a specific problem with known X and Y properties.

Assume X and Y are independent and identically distributed with density functions:

22 x

xfxf YX

This is a Cauchy density. Then

2222, ,

yxxfxfyxf YXYX

And substituting for the function YXZ

dyyy

zfydz

zdFzf YX

ZZ ,

1, , for z

dyy

yzy

zf Z 2222

1

, for z

dyyzy

yzf Z 222222

2 1

This is symmetrical in y, therefore the infinity integral can become twice the positive integral

0222222

2 12dy

yzy

yzf Z

Letting 2yw and dyydw 2

0

2222

2 11dw

wzwzf Z

0

2224222

2 1dw

zzwwzf Z

Applying some math magic … (table with integral forms, polynomial in w)

4

2

422

2

ln1

z

zzf Z

Page 30: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 30 of 48 ECE 3800

More useful results …

Example 3.3-2 Z=max(X,Y)

For X and Y independent, zYzXzYzXzFzZ Z ,PrPrPr

Being independent yFxFyxF YXYX ,,

Therefore, zFzFzYzXzYzXzFzZ YXZ PrPr,PrPr

zFzFzF YXZ

Differentiating to determine the pdf

zfzFzFzfzf YXYXZ

HW 3.26 Z=min(X,Y)

For X and Y independent, performed based on min being the “inverse of max”.

With the CDF typically defined as qQqFQ Pr

We are interested in an “inverse” CDF defined as zZPzFZ 1

The events of interest are based on independence of X and Y, therefore zYPzXPzZP

But this can be defined as the product of two inverse CDFs or zYPzXPzZP 11

zFzFzFzFzFzFzZP YXYXYX 111

Using the “negative condition” probability zFzFzFzFzZPzF YXYXZ 1

The pdf can be computed as the derivative zfzFzFzfzfzfzf YXYXYXZ

Page 31: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 31 of 48 ECE 3800

Of more interest is HW 3.28 and 3.29:

HW 3.28: nXXXZ ,,,max 21 for Xi independent and identically distributed

n

iX

n

iXXXXZ zFzFzFzFzFzF

in11

21

nXZ zFzF

and then, taking the derivative,

zfzFnzf Xn

XZ 1

HW 3.29: nXXXZ ,,,min 21 for Xi independent and identically distributed

n

iXXXXZ zFzFzFzFzFzZ

in1

11111Pr21

nX

nXZ zFzFzFzZ

i 111Pr

nXZ zFzF 11

and we could expect

zfzFnzf Xn

XZ 11

Both the minimum and maximum of a set of “measured” values that are themselves R.V. is regularly encountered.

This establishes the resulting CDF and pdf or R.Vs that are independent and identically distributed (IID).

Page 32: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 32 of 48 ECE 3800

The sum of two random variables Z=X+Y

We are considering the CDF defined for YXZ zZzFZ Pr

For a kine, this can be observed in a 2-D plane as shown in Fig. 3.3-8.

Figure 3.3-8 The region Cz (shaded) for computing the pdf of Z ≜X + Y.

Defining the CDF in terms of the joint density function in X and Y

zyx

YXZ dydxyxfzF ,,

Suing the linear relationship

dydxyxfzFyz

YXZ ,,

Again defining an indefinite integral (as before)

dxyxfyxG YXYX ,, ,,

The inner integral in terms of G becomes

dyyGyyzGzF YXYXZ ,, ,,

Page 33: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 33 of 48 ECE 3800

Forming the density function based in the derivative

dy

dz

ydG

dz

yyzdG

dz

zdFzf YXYXZ

Z

,, ,,

dyyyzfdyyyzfzf YXYXZ ,0, ,,

If X and Y are independent,

yfxfyxf YXYX ,,

And

dyyfyzfdyyyzfzf YXYXZ ,,

The result is a convolution of the two independent density functions!

A note, the convolution can be performed in either of the two forms:

dyyfyzfdxxzfxfzf YXYXZ

Page 34: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 34 of 48 ECE 3800

Example 3.3-4 Z=X+Y where X is exponential and Y is uniform.

xforxxf X 0,exp

22

1 yrectyfY

We are convolving a rectangular window with an exponential. There are three regions to consider:

1) the density functions not overlapping (z<-1)

2) the density functions starting to overlap (-1<z<1

3) the density functions completely overlapping (1<z)

Figure 3.3-10 Relative positions fX(z − y) and fY(y) for (a) z < 1; (b) −1 ≤ z < 1; (c) z > 1.

Computations:

In region 1 1,0 zzfZ

In region 2 11,exp1

zdyyzzfz

Z

11,expexp1

zdyyzzfz

Z

Page 35: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 35 of 48 ECE 3800

11,1expexpexp zzzzfZ

11,1exp1 zzzfZ

In region 3 zdyyzzfZ

1,exp1

1

zdyyzzfZ

1,expexp1

1

zzzfZ 1,1exp1expexp

zzzzfZ 1,1exp1exp

The result can be stated as

zzz

zz

z

zfZ

1,1exp1exp

11,1exp1

1,0

`The result then appears in Fig. 3.3-11

Figure 3.3-11 The pdf fZ(z) from Example 3.3-4.

Page 36: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 36 of 48 ECE 3800

Extending the convolution result

For YbXaZ

Assume two changes of variables:

XaV and YbW

Then the new marginal pdf can be defined as

a

vf

avf XV

1 and

b

wf

bwf XW

1

and we have

a

vf

avf XV

1

dw

b

wf

ba

wzf

adv

b

vzf

ba

vf

azf YXYXZ

1111

dw

b

wf

a

wzf

badv

b

vzf

a

vf

bazf YXYXZ

11

Page 37: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 37 of 48 ECE 3800

Discrete Convolutions

The sum of two fait die

66

15

6

14

6

13

6

12

6

11

6

1 kkkkkkkpmf

YXZ

A discrete convolution is in the form.

122,6

1

mkpmfkzpmfmpmfk

Matlabconvolution.pmf1=[1 1 1 1 1 1] pmf1 = 1 1 1 1 1 1 >> conv(pmf1,pmf1) ans = 1 2 3 4 5 6 5 4 3 2 1 or pmf1=[1 1 1 1 1 1]/6 pmf1 = 0.1667 0.1667 0.1667 0.1667 0.1667 0.1667 >> conv(pmf1,pmf1) ans = Columns 1 through 11 0.0278 0.0556 0.0833 0.1111 0.1389 0.1667 0.1389 0.1111 0.0833 0.0556 0.0278

Matlab can “multiply” polynomials when correctly constructed using the conv function!

Page 38: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 38 of 48 ECE 3800

3.4 Solving Problems of the Type V = g(X, Y ), W = h(X, Y )

Given two random variables and the joint pdf and two differentiable functions, g() and h(), two new random variables can be constructed.

Given: yxf YX ,,

We can generate yxgV , and yxhW ,

for g() and h() differentiable

This is particularly applicable in coordinate transformation, mapping from one 2D plane to another 2D plane.

We can say that

WVCyx

YXWV dydxyxfwvFwWvV,),(

,, ,,,Pr

The region C is given by the points x, y that satisfy

wyxhvyxgyxC WV ,,,:,,

Example 3.4-1 YXV and YXW

Given: wyxhvyxgyxC WV ,,,:,,

vyxyxg , and wyxyxh ,

From the figure

Figure 3.4-2 Point set Cvw (shaded region) for Example 3.4-1.

Page 39: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 39 of 48 ECE 3800

The integration over the shaded regions

2

,, ,,

wvxv

wx

YXWV dxdyyxfwvF

Based on this equation, we can perform the partial derivatives (continuous functions) in v and w.

2

,

2,

2

, ,,

,

wvxv

wx

YXWV

WV dxdyyxfwvwv

wvFwvf

The 1st partial (w

x

.w

y

)

2

,

2

2

,, ,,22

1,

wvxv

wx

YX

wv

wvYXWV dxdyyxf

wdyy

wvf

vwvf

2

,

2

,, ,,0,

wv

YX

wv

YXWV dxwxxfv

dxwxxfv

wvf

The 2nd partial (v

x

)

2

,22

1, ,,

wvwvfwvf YXWV

Note: this is all a rather hand-waving derivation.

Providing an alternate Hnad waving explanation (from Cooper and McGillem)

Page 40: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 40 of 48 ECE 3800

Probability Density Function of a Function of Two Random Variables

Functions of random variables create new random variable. As before, expect that the resulting probability distribution and density function are different.

Assume that there is a function that combines two random variables and that the functions inverse exists.

YXZ ,1 and YXW ,2

and the inverse WZX ,1 and WZY ,2

The original pdf is yxf , with the derived pdf in the transform space of wzg , .

Then it can be proven that: 21212121 ,Pr,Pr yYyxXxwWwzZz

or equivalently

2

1

2

1

2

1

2

1

,,

y

y

x

x

w

w

z

z

dydxyxfdwdzwzg

Empirically, since the density function must integrate to one for infinite bounds, the “transformed” portion of one density must have the same “volume” as the original density function.

Usinganadvancedcalculustheoremtoperformatransformationofcoordinates.[UsingthedeterminantoftheJacobian)

Jwzwzf

w

y

z

yw

x

z

x

wzwzfwzg

,,,,,,, 2121

And the integrals become.

2

1

2

1

2

1

2

1

,,,, 21

w

w

z

z

w

w

z

z

dwdzJwzwzfdwdzwzg

Page 41: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 41 of 48 ECE 3800

Forthelinearproblemsjustperformed

Given: yxf YX ,,

We can generate YXV and YXW

Therefore 2

WVX

and

2

WVY

Forming the Jacobian and taking the determinant

2

1

2

12

1

2

1

w

y

v

yw

x

v

x

J and 2

1

2

1

2

1

2

1

2

1det

v

y

w

x

w

y

v

xJ

Finally we arrive at

2

,22

1, ,,

wvwvfwvf YXWV

Page 42: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 42 of 48 ECE 3800

Example 3.4-2

Given:

2exp

2

1,

22

,

yxyxf YX

We can generate YXV 53 and YXW 2

Y

X

W

V

21

53

Finding the inverse

Y

X

W

V1

21

53

Y

X

W

V

5123

31

52

Therefore WVX 52 and WVY 3

31

52

w

y

v

yw

x

v

x

J and 15132det

v

y

w

x

w

y

v

xJ

Therefore

wvwvfwvf YXWV 3,52, ,,

Given the initial joint density function

2

352exp

2

1,

22

,

wvwvwvf WV

2

96125204exp

2

1,

2222

,

wwvvwwvvwvf WV

2

34265exp

2

1,

22

,

wwvvwvf WV

Page 43: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 43 of 48 ECE 3800

Simplifying a previous problem: Example 3.1-1

Example #4 in Cooper and McGillem:

YXV and let XW , an arbitrary selection

Then,

yxv and xw describes the forward transformation, and

w

vy and wx describes the inverse transformation.

The determinant of the Jocobian is

www

z

ww

y

v

yw

x

v

x

J11

1110

2

Therefore,

Jwzwzf

w

y

z

yw

x

z

x

wzwzfwvf YXYXWV

,,,,,,, 21,21,,

w

vwf

www

vwfwvf WV ,

11,,,

Then, integrating for all w to find v (remember that vFvF VwV ,, and dv

vdFvf VV ,

dw

w

vwf

wdwwvfvf WVV ,

1,,

Note: does the swapping of elements in the joint distribution really matter for YXV ?

Page 44: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 44 of 48 ECE 3800

Example 3.4-5 Continuation of min and max

Example 3.3-2 Z=max(X,Y)

zFzFzF YXZ

Differentiating to determine the pdf

zfzFzFzfzf YXYXZ

HW 3.26 Z=min(X,Y) zZzFZ Pr

We are interested in zFzZP Z 1

Using the “negative condition” probability zFzFzFzFzZPzF YXYXZ 1

The pdf can be computed as the derivative zfzFzFzfzfzfzf YXYXYXZ

For X and Y Gaussian with zero mean and unit variance, i.e. N(0,1)

See Textbook figure 3.4-5 or make MATLAB plots of the results:

MATLAB: MinMaxDemo.m

Page 45: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 45 of 48 ECE 3800

3.5 Additional Examples 200

Example 3.5-1: rectangular to polar coordinate transformation

Example 3.5-2: rectangular to magnitude and division

Example 3.5-3: rectangular coordinate angular rotation by theta

Example 3.5-4: using X,Y Z,W to perform X, Y to magnitude

Page 46: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 46 of 48 ECE 3800

Example 3.5-5: using X,Y Z,W to X+Y and X-Y

Let: YXV and YXW

Determine the inverse mapping: 0 yxv 0 yxw

Therefore

2

wvx

and

2

wvy

2

1

2

1

2

1

2

1

2

1

2

1

2

12

1

2

1

w

y

v

yw

x

v

x

J

2

,22

1

2

1

2,

2, ,,,

wvwvf

wvwvfwvf YXYXWV

OK, but what about just V or W

V= X+Y

dwwvfvf WVV ,,

dwwvwv

fvf YXV 2,

22

1,

Use a change in variable:

2

wvz

and

2

1

dw

dz

dzzvzfvf YXV ,,

For X, and Y independent

dzzvfzfvf YXV

Convolution

W=X-Y

dvwvfwf WVW ,,

dvwvwv

fwf YXW 2,

22

1,

Use a change in variable:

2

wvz

and

2

1

dv

dz

dzzwzfwf YXW ,,

For X, and Y independent

dzzfwzfwf YXW

Correlation

Page 47: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 47 of 48 ECE 3800

Modified Cooper and McGillem problem 3-5.2

An ECE student on main campus attempts to catch the 8am bus every morning although his arrival time at the bus stop is a random variable that is uniformly distributed between 7:55 am and 8:05 am. The bus’ departure time from the bus stop is also a random variable that is uniformly distributed between 8am and 8:10 am.

a) Find the probability density function of the time interval between the student’s arrival at the bus stop and the bus’ departure time.

b) Find the probability that the student will catch the bus.

c) Find the probability that the student will catch the bus with 3 minutes to spare.

Scaling so that 8am is “zero”

else

ssf S

,0

55,10

1 and

else

bbf B

,0

100,10

1

Let BSZ

dszsfsfzf BSZ

Determine the appropriate regions

55,10

1

10

1

515,10

1

10

1

5

10

5

zfords

zfordszf

z

z

Z

55,100

1

515,100

1

5

10

5

zfors

zforszf

z

z

Z

55,5100

1

515,510100

1

zforz

zforzzfZ

55,5100

1

515,15100

1

zforz

zforzzfZ

Page 48: Chapter 3: Functions of Random Variablesbazuinb/ECE3800SW/SW_Notes03.pdf · Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics

Notes and figures are based on or taken from materials in the course textbook: Probability, Statistics and Random Processes for Engineers, 4th ed., Henry Stark and John W. Woods, Pearson Education, Inc., 2012.

B.J. Bazuin, Fall 2016 48 of 48 ECE 3800

Determine the cumulative distribution function

55,5100

15.0

515,15100

1

5

15

zfordxx

zfordxxzF

z

z

Z

55,

2

555

25

100

15.0

515,2

151515

215

100

1

22

22

zforz

z

zforz

zzFZ

55,2

52

75

100

15.0

515,2

22515

2100

1

2

2

zforz

z

zforzz

zFZ

b) Find the probability that the student will catch the bus. To catch the bus Z negative

00Pr ZFZ

2

005

2

75

100

15.00Pr

2

Z

875.0200

755.00Pr Z

(Roughly 7 out of every 8 days the student makes the bus?!)

c) Find the probability that the student will catch the bus with 3 minutes to spare.

33Pr ZFZ

2

335

2

75

100

15.03Pr

2

Z

68.0200

365.0

200

930755.03Pr

Z

What would happen if the bus left between 8am and 8:05 am?

else

bbf B

,0

50,5

1