ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random...

28
ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar ECE Dept., Rice University Sept 23, 2009

description

ELEC 303, Koushanfar, Fall’09 PDF (review) A RV is continuous if there is a non-negative PDF s.t. for every subset B of real numbers: The probability that RV X falls in an interval is: Figure courtesy of Bertsekas&Tsitsiklis, Introduction to Probability, 2008

Transcript of ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random...

Page 1: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

ELEC 303 – Random Signals

Lecture 9 – Continuous Random Variables:Joint PDFs, Conditioning, Continuous Bayes

Farinaz KoushanfarECE Dept., Rice University

Sept 23, 2009

Page 2: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Lecture outline

• Reading: Reading 3.4-3.5• Continuous RV, PDF, CDF (review)• Joint PDF and multiple RVs• Conditioning• Independence

Page 3: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

PDF (review)

• A RV is continuous if there is a non-negative PDF s.t. for every subset B of real numbers:

• The probability that RV X falls in an interval is:B X dxxfBXP )()(

Figure courtesy of Bertsekas&Tsitsiklis, Introduction to Probability, 2008

Page 4: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

PDF (Cont’d)

• Continuous prob – area under the PDF graph• For any single point:

• The PDF function (fX) non-negative for every x• Area under the PDF curve should sum up to 1

0)()( a X dxxfaXP

)()()()( bXaPbXaPbXaPbXaP

1)()( XPdxxf X

Page 5: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Mean and variance (review)

• Expectation E[X] and n-th moment E[Xn] are defined similar to discrete

• A real-valued function Y=g(X) of a continuous RV is a RV: Y can be both continous or discrete

Page 6: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Properties of CDF (review)• Defined by: FX(x) = P(Xx), for all x

• FX(x) is monotonically nondecreasing– If x<y, then FX(x) FX(y)

– FX(x) tends to 0 as x-, and tends to 1 as x– For discrete X, FX(x) is piecewise constant

– For continuous X, FX(x) is a continuous function– PMF and PDF obtained by summing/differentiate

)1()()1()()( kFkFkXPkXPkP XXX

k

iXX ipkF )()(

x

XX dttfxF )()( )()( xdxdFtf X

X

Page 7: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Standard normal RV (review)

• A continuous RV is standard normal or Gaussian N(0,1), if

Page 8: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

)()()()(

xxYPxXPxXP

Notes about normal RV (review)

• Normality preserved under linear transform• It is symmetric around the mean• No closed form is available for CDF• Standard tables available for N(0,1), E.g., p155• The usual practice is to transform to N(0,1):– Standardize X: subtract and divide by to get a

standard normal variable y– Read the CDF from the standard normal table

Page 9: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Joint PDFs of multiple RV

• Joint PDF fX,Y, where this is a nonnegative function

• Interpretation

1),(,

dxdyyxf YX

Page 10: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Marginal PDFs

• Consider the event xA

• Compare with the formula

• Thus, the marginal PDF fX is given by

dxdyyxfYAxPAxPA YX

),(),(,()( ,

A X dxxfAxP )()(

dyyxfxf YXX

),()( ,

Page 11: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Two-dimensional Uniform PDF

• Compute c?

Otherwise ,010 and 10 if,),(,

yxcyxf YX

1.),(1

0

1

0,

dxdycdxdyyxf YX

Page 12: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Buffon’s needle (2)

Page 13: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Buffon’s needle (2)

Page 14: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Buffon’s needle (3)

Page 15: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Buffon’s needle (4)

Page 16: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Joint CDF, expectation

• FX,Y(x,y) =• PDF can be found from CDF by differentiating:

• Expectation

• Expectation is additive and linear

dxdyyxfYyXxPx y

YX ),(),( ,

),(),(2

, yxyxFyxf XY

YX

Page 17: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

More than two RVs

• The joint PDF for more RVs is similar

• Marginal

• Expectation of sum

dxdyzyxfBZYXPBzyx ZYX

,, ,, ),,()),,((

dzdyzyxfxf ZYXX

),,()( ,,

][...][][]...[

2211

2211

nn

nn

XEaXEaXEaXaXaXaE

Page 18: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Conditioning

• A RV on an event

• If we condition on an event of form XA, with P(XA)>0, then we have

• By comparing, we get

dxxfABXPB AX )()|( |

)(

)()|(

AXP

dxxfAXBXP BA X

Otherwise ,0

A xif ,)(

)()))((|( AXP

xfxAXXf

X

X

Page 19: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Example: the exponential RV

• The time t until a light bulb dies is an exponential RV with parameter

• If one turns the light, leaves the room and return t seconds later(A={T>t})

• X is the additional time until bulb is burned• What is the conditional CDF of X, given A?

xt

xt

eee

tTPxtTP

tTPtTxtTP

tTxtTPAxXP

)(

)()(

)()(

)|()|(

Memoryless property of exponential CDF!

Page 20: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Example: total probability theorem• Train arrives every 15 mins startng 6am• You walk to the station between 7:10-7:30am• Your arrival is uniform random variable• Find the PDF of the time you have to wait for the first

train to arrive

x

fX(x)

y

fy|A(y)

7:10 7:30 5

1/5

y

fy|B(y)

15

1/15

y

fy(y)

5

1/10

15

1/20

Page 21: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Conditioning a RV on another

• The conditional PDF

• Can use marginal to compute fY(y)

• Note that we have

)(),(

)|( ,| yf

yxfyxf

Y

YXYX

dxyxfyf YXy ),()( ,

1)|(|

dxyxf YX

Page 22: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Summary of concepts

Courtesy of Prof. Dahleh, MIT

Page 23: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Conditional expectation• Definitions

• The expected value rule

• Total expectation theorem

dxxxfAXE AX )(]|[ |

dxyxxfyYXE YX )|(]|[ |

dxxfxgAXgE AX )()(]|)([ |

dxyxfxgyYXgE yX )|()(]|)([ |

n

i ii AXEAPXE1

]|[)(][

dyyfyYXEXE Y )(]|[][

Page 24: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Mean and variance of a piecewise constant PDF

• Consider the events– A1={x is in the first interval [0,1]

– A2={x is in the second interval (1,2]

• Find P(A1), P(A2)?• Use total expectation theorem to find E[X] and

Var(X)?

,otherwise ,0

2x1 if ,2/11x0 if ,3/1

)(

xf X

Page 25: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Example: stick breaking (1)

Page 26: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Example: stick breaking (2)

Page 27: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Example: stick breaking (3)

Page 28: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 9 – Continuous Random Variables: Joint PDFs, Conditioning, Continuous Bayes Farinaz Koushanfar.

ELEC 303, Koushanfar, Fall’09

Independence

• Two RVs X and Y are independent if

• This is the same as (for all y with fY(y)>0)

• Can be easily generalized to multiple RVs

)()(),(, yfxfyxf YXYX

)()|(| xfyxf XYX

)()()(),,(,, zfyfxfzyxf ZYXZYX