© robert j. marks ii engr 5345 review of probability & random variables

43
© Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

Upload: bryan-arnold

Post on 03-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

ENGR 5345Review of Probability & Random Variables

Page 2: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Random Variables Assign each event outcome in S to a real

number (random variable), X. Ex: heads X=12

tails X=47

If the event outcome is numerical, equating the outcome to X is often convenient.

Page 3: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Random Variables (cont) Each RV, X, has a probability equal to the

event to which it is assigned. The Cumulative Distribution Function

(CDF)

]Pr[)( xXxFX

Page 4: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

CDF Properties1. Since the CDF is a probability,

2. The CDF is monotonically increasing (a.k.a. nondecreasing)

Note: ,

1)(0 xFX

yxyFxF XX when )()(

)(xFX

1

x

0)( XF 1)( XF

Page 5: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

CDF Properties (cont)3. The CDF is continuous from the right

)()(lim0

xFxF XX

)(xFX

1

x

Page 6: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Probabilities from CDF’s

)()(]Pr[ aFbFbXap XX

)(xFX

x

ba

)(bFX

)(aFX

p

Page 7: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Probability Density Function

)()( xFdx

dxf XX

Page 8: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

]Pr[ AX

PDF Properties

]Pr[)( AXdxxf XA

1 .

2.

3.

0)( xf X

1)(

dxxf X

fX(x)

x

A

Page 9: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Histograms as PDF’s

A histogram normalized to unit area is an empirical pdf.

N = # data points

)()(

lim0

xfN

xhX

N

N

hN(x)

x

Page 10: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Conditional CDF’s

]Pr[

]}Pr[{

]|Pr[)|(

A

AxX

AxXAxFX

Page 11: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Conditional pdf’s

)|()|( AXxFdx

dAXxf XX

Page 12: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Discrete RV’s

)(][)( kxkXPxfk

X

Discrete RV’s have only integer outputs.

)(x impulse function (Dirac delta)

]Pr[ kX Probability mass function (pmf)

]Pr[)( AXdxxf XA

Beware of deltas on the edge of integration when evaluating

Page 13: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Common RV PDF’s Bernoulli, p = probability of

success

Jacob BernoulliBorn: 27 Dec 1654 in Basel,

SwitzerlandDied: 16 Aug 1705 in Basel, Switzerland

(success) 1;

(failure) 0;1]Pr[

kp

kpkX

fX(x)

x10

pq=1-p

Pictures in this presentation from http://www-groups.dcs.st-and.ac.uk/~history/index.html

Page 14: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Common RV PDF’s Binomial (n repeated Bernoulli

trials)nk;)p(p

k

n]kXPr[ knk

01

)!(!

!

knk

n

k

n

= binomial coefficient

(Pascal’s triangle)

Page 15: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Binomial RV (p=0.1) vs. n

k

n

Page 16: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Binomial RV (p=0.2) vs. n

k n

Page 17: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Binomial RV (p=0.5) vs. n

kn

Page 18: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Geometric RV

,...,,k;)p(p]kXPr[ k 2101

•Repeat a Bernoulli trial until a success occurs.

• The number of trials is a geometric random variable.

Page 19: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Negative Binomial (Pascal) RV

Repeat Bernoulli trials. Let X=number of trials to achieve rth success. ,...r,rk;)p(p

r

k]kXPr[ rkr 11

1

1

Blaise PascalBorn: 19 June 1623 in Clermont FranceDied: 19 Aug 1662 in Paris, France

Page 20: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Pascal

Blaise Pascal (1623-62)

Blaise Pascal (1623-62)

•PASCAL:PASCAL: a high level programming language designed by Niklaus Wirth in 1974 as a teaching language for computer scientists.

•Pascal’s Law:Pascal’s Law: the pressure in a fluid is transmitted equally to all distances and in all directions.

•PASCAL:PASCAL: A unit of pressure. 1 bar equals 100,000 Pascal

•Pascal’s trianglePascal’s triangle..

(1623-62)

Page 21: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Pascal

Pascal: Computer Engineer• In 1642, Pascal began to create a machine that In 1642, Pascal began to create a machine that would be similar to an everyday calculator to help would be similar to an everyday calculator to help his father with his accounting job.his father with his accounting job. •He finished the final model in 1645.He finished the final model in 1645. •He presented one to Queen Christina of Sweden He presented one to Queen Christina of Sweden and he was allowed a monopoly over it by royal and he was allowed a monopoly over it by royal decree.decree.

http://www-groups.dcs.st-and.ac.uk/~history/index.html

Page 22: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Pascal’s Wager…

Pascal, a Christian theist still studied in philosophy and religion, communicated theological concepts wrapped in the interest of his contemporaries’ interest in probability and gambling.

"Let us examine this point and say, "God is, or He is not." ... What will you wager? ... Let us weigh the gain and loss of wagering that God is ... there is here an infinity of an infinitely happy life to gain, a chance of gain against a finite number of chances of loss, and what you stake is finite ... every player stakes a certainty to gain an uncertainty, and yet he stakes a finite certainty to gain a finite uncertainty, without transgressing against reason ... the uncertainty of the gain is proportioned to the certainty of the stake according to the proportion of the chances of gain and loss. ... And so our proposition is of infinite force, when there is the finite to stake in a game where there are equal risks of gain and loss, and the infinite to gain.”Article 223 of Pensees

Page 23: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Poisson RV

,...,,k;e!k

]kXPr[k

210

•Number of random points on a line segment.

• Approximation of binomial random variable.

Siméon Denis PoissonBorn: 21 June 1781 in Pithiviers, FranceDied: 25 April 1840 in Sceaux , France

Page 24: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Discrete Uniform RV

bbaakab

xf X ,1,...,1,;1

1)(

•Describes die RV with a=1 and b=6.

• Round of money to the nearest dollar results in an error that is uniform & discrete.

Page 25: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Continuous Uniform RV

bxaab

xf X

;1

)(

•Describes random angle with a=0 and b=2

•Rounding & truncation errors

Page 26: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Gaussian (normal) RV

),(;2

1)(

2

2

2

)(

xexfmx

X

•Limiting distribution in Central Limit Theorem

1803

Johann Carl Friedrich GaussBorn: 30 April 1777 in Brunswick, Duchy of Brunswick (Germany)Died: 23 Feb 1855 in Göttingen, Hanover (Germany)

Page 27: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Gaussian (normal) RV

2

fX(x)

x

Page 28: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Gaussian (normal) CDF

dyexFmy

x

X

2

2

2

)(

2

1)(

my

z

)(erf2

12

1)( 2

2

mx

dzexFz

mx

X

Page 29: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Gaussian Error Function

)(12

1)(erf 2

0

2

zQ

dezz

Page 30: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Matlab erf

ERF Error function.

Y = ERF(X) is the error function for each element of X. X must be real. The error function is defined as:

erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt.

)(12

1)(erf 2

0

2

zQ

dezz

dtez tz 2

0MatLab2

)(erf

Conversion Formula?

Page 31: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Exponential RV

(x)=unit step

•Commonly used model in reliability for constant failure rates.

)()( xexf xX

Page 32: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II)(1

)()(

]Pr[1

]Pr[

]Pr[

],Pr[]|Pr[

yx

y

xy

yXX

e

e

ee

e

yFxF

yX

xXy

yX

yXxXyXxX

The Ageless Exponential RV

)()( xexf xX

1. Let X be how long you live after you’re born and

2. Thus:

)()1(

]Pr[)(

xe

xXxFx

X

3. You’ve lived y years.

4. Good as NEW!

Page 33: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Cauchy RV

22)(

1)(

bax

bxf X

Augustin Louis CauchyBorn: 21 Aug 1789 in Paris, FranceDied: 23 May 1857 in Sceaux, France

•“Loose Cannon” RV

•Ratio of two Gaussians is Cauchy

•Displays strange properties - undefined mean and second moment.

Page 34: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Cauchy RV

)1(

11)(

2

xxf X

Page 35: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Laplace RV

Pierre-Simon LaplaceBorn: 23 March 1749 in Beaumont-en-Auge, Normandy, FranceDied: 5 March 1827 in Paris, France

||

2)( xa

X ea

xf

Page 36: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Pierre Simon Laplace (1749-1827).

Namesakes:•Laplace transformLaplace transform

•Laplace NoiseLaplace Noise•Laplace helped to establish the Laplace helped to establish the metric system.metric system.•Laplacian OperatorLaplacian Operator

0)()( dtetxsX st

Napoleon appointed Laplace Napoleon appointed Laplace Minister of the Minister of the InteriorInterior but removed him from office after only six but removed him from office after only six weeks weeks ““because he brought the spirit of the because he brought the spirit of the infinitely small into the government.”infinitely small into the government.”

Page 37: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Gamma RV

)()(

)()(

1

xa

exxf

xa

X

0;)( 1

0

xdsesx sxGamma Function

)!1()( nnErlang RV: Gamma for a=n

)()!1(

)()(

1

xn

exxf

xn

X

Page 38: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Other RV’s Weibull

2 (chi-squared)

)()( )(1 xexaxfaxaa

X

)(

22

1)( 2/1

2 xexa

axf x

a

X

Wallodi Weibull 1887-1979

Page 39: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Other RV’s F

Student’s t

)(

122

2)(

2

2

22

x

baba

xbaba

xf ba

aa

X

2

12

2

2

1

2

21

)(

aa

X a

xa

a

xa

xf

William Sealey Gosseta.k.a. Student t

Born: 13 June 1876 in Canterbury, EnglandDied: 16 Oct 1937 in Beaconsfield, England

Page 40: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Other RV’s

Rice

Raleigh

Pareto

)()(2

2

22

xea

xxf a

x

X

)()(20

22

2

22

xmx

Iex

xfxm

X

)()(1

bxx

b

b

axf

a

X

Page 41: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Other RVs

)()(

)()(

1

xa

exxf

xa

X

0;)( 1

0

xdsesx sxGamma Function

)!1()( nnErlang RV: Gamma for a=n

)()!1(

)()(

1

xn

exxf

xn

X

Page 42: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Mixed Random Variables

Part Continuous – Part Discrete. Example: A traffic light is red three

minutes, then green two. You come on this traffic light. Let T = the time you need to wait at the light. T is a mixed random variable.

Page 43: © Robert J. Marks II ENGR 5345 Review of Probability & Random Variables

© Robert J. Marks II

Traffic Light

31

305

2

5

1

00

t;

t;t

t;

]tTPr[)t(FT

1

1 2 3 t