probability_distributions.ppt

17
Probability Distributions 1. Probability distributions 2. Discrete probability distributions 3. Continuous probability distributions 4. Multidimensional probability distributions

description

Probabilitati

Transcript of probability_distributions.ppt

Page 1: probability_distributions.ppt

Probability Distributions

1. Probability distributions

2. Discrete probability distributions

3. Continuous probability distributions

4. Multidimensional probability distributions

Page 2: probability_distributions.ppt

Probability Distributions

Random (stochastic) variables» Experimental measurements are not reproducible in a

deterministic fashion» Each measurement can be viewed a random variable X» Defined on sample space S of an experiment

Probability distribution» Determines probability of particular events» Discrete distributions: random variables are discrete

quantities» Continuous distributions: random variables are

continuous quantities

Cumulative probability distribution function F(x)

)()()()()( aFbFbXaPxXPxF

Page 3: probability_distributions.ppt

Discrete Probability Distributions

Random variable X can only assume countably many discrete values: x1, x2, x3, …

Probability density function f(x)

Cumulative distribution function

Properties

otherwise0

if)()( jjj xxxXPpxf

xx xx

jj

j j

pxfxF )()(

jj

bxaj

p

paFbFbXaPj

1

)()()(

Page 4: probability_distributions.ppt

Discrete Distribution Example

Matlab function: unicdf(x,n),

>> x = (0:6);

>> y = unidcdf(x,6);

>> stairs(x,y)

Page 5: probability_distributions.ppt

Continuous Probability Distributions

Random variable X can assume infinitely many real values

Cumulative distribution function

Probability density function

Properties

xdvvfxF )()(

dx

xdFxf

)()(

1)(

)()()()(

dvvf

dvvfaFbFbXaPb

a

Page 6: probability_distributions.ppt

Continuous Distribution Example

Probability density function

Cumulative distribution function

Probability of events

1)1(75.0)(otherwise0

11)1(75.0)(

1

1

22

dvvdvvfxx

xf

11

1125.075.05.0

10

)(

25.075.05.0)1(75.0)()(

3

3

1

2

x

xxx

x

xF

xxdvvdvvfxFxx

73.025.075.05.095.0)()(

%75.68)1(75.0)5.0()5.0()5.05.0(3

5.0

5.0

2

xxxxFxXP

dvvFFxP

Page 7: probability_distributions.ppt

Mean and Variance

Discrete distribution

Continuous distribution

Symmetric distribution» If f(c-x) = f(c+x), then f(x) is symmetric with respect to = c

Transformation of mean and variance» Given random variable X with mean and variance 2

» The standardized random variable Z has zero mean and unity variance

jjj

jjj

xfx

xfx

)()(Variance

)(Mean

22

dxxfx

dxxxf

)()(Variance

)(Mean

22

X

Z

Page 8: probability_distributions.ppt

Expectations and Moments

Moments for continuous distributions

Continuous distribution example

dxxfxXEk

dxxfxXEk

XEdxxfxXEdxxxf

kk

kk

)()()]([moment centralth

)()(momentth

)]([)()()()( 222

1

1

1

15

513

312222

1

1

1

14

412

212

2

2.0)75.0()75.0()1(75.0)0()]([

0)75.0()75.0()1(75.0)(

otherwise0

11)1(75.0)(

xxdxxxXE

xxdxxxXE

xxxf

Page 9: probability_distributions.ppt

Binomial Distribution

Governs randomness in games of chance, quality inspections, opinion polls, etc.

X = {0,1,2,…,n} = number of times event A occurs in n independent trials

Probability of obtaining A exactly x times in n trials

Mean and variance:

>> binopdf(x,n,p) binomial probability

>> binopdf(0,200,0.02) ans = 0.0176

>> binocdf(x,n,p) binomial cumulative probability

>> 1 - binocdf(100,162,0.5) ans = 0.0010

pqAXPpAXP 1)()(

nn

xnx

xnx

n

x

nxfqpqp

x

nxf

2

1

)!(!

!

2

1)()( 2

1

npqnp 2

Page 10: probability_distributions.ppt

Poisson Distribution

Infinitely many possible events Probability distribution function

Limit of binomial distribution as

Mean and variance: 2 = Example

» Probability of a defective screw p = 0.01» Probability of more than 2 defects in a lot of 100 screws?» Binomial distribution: = np = (100)(0.01) = 1» Since p <<1, can use Poisson distribution to approximate solution

• Matlab functions: poisspdf(x,mu), poisscdf(x,mu)

,2,1,0!

)( xex

xfx

constant0 npnp

%03.8)2(1)2(

9197.0!

)()2()2(2

0!2

1!1

1!0

112

0

210

XPXP

eex

xfFXPj j

x

jj

j

Page 11: probability_distributions.ppt

Matlab: Poisson-Binomial Comparison Screw example (p=0.01, n=100)

for less than 0–5 defective screws

>> x = (0:5);

>> y = poisscdf(x,1);

>> z = binocdf(x,100,0.01)

Compare Poisson to Binomial with equal , different p and n

Number Binomial Poisson0 0.366032 0.3678791 0.735762 0.7357592 0.920627 0.9196993 0.981626 0.9810124 0.996568 0.996345 0.999465 0.999406

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.4

0.5

0.6

0.7

0.8

0.9

1

Binomial n = 50, p = .02Binomial n = 20, p = .05Binomial n = 10, p = .1Binomial n = 5, p = .2Poisson mu=1

Page 12: probability_distributions.ppt

Normal (Gaussian) Distribution Probability density function

Cumulative distribution function

Standardized normal distribution ( = 0, = 1)

1)(2

1exp

2

1)(

2

dxxfx

xf

dvv

xFx

2

2

1exp

2

1)(

x

xFduezz u

)(2

1)( 2

2

Page 13: probability_distributions.ppt

Computing Probabilities

Interval probabilities

Sigma limits

Example» X is a random variable with and 2 = 4

» Use Table A7 in text

abaFbFbXaP )()()(

%7.99)33(

%5.95)22(

%68)(

XP

XP

XP

%797939.0)82.0(2

8.044.2)44.2()44.2(

FXP

Page 14: probability_distributions.ppt

Matlab: Normal Distribution

Normal distribution: normpdf(x,mu,sigma)» normpdf(8,10,2) ans = 0.1210» normpdf(9,10,2) ans = 0.1760» normpdf(8,10,4) ans = 0.0880

Normal cumulative distribution: normcdf(x,mu,sigma)» normcdf(8,10,2) ans = 0.1587» normcdf(12,10,2) ans = 0.8413

Inverse normal cumulative distribution: norminv(p,mu,sigma)» norminv([0.025 0.975],10,2) ans = 6.0801 13.9199

Random number from normal distribution: normrnd(mu,sigma,v)» normrnd(10,2,[1 5]) ans = 9.1349 6.6688

10.2507 10.5754 7.7071

Page 15: probability_distributions.ppt

Matlab: Normal Distribution Example

The temperature of a bioreactor follows a normal distribution with an average temperature of 30oC and a standard deviation of 1oC. What percentage of the reactor operating time will the temperature be within +/-0.5oC of the average?

Calculate probability at 29.5oC and 30.5oC, then calculate the difference:» p=normcdf([29.5 30.5],30,1)p = [0.3085 0.6915]» p(2) – p(1)0.3829

The reactor temperature will be within +/- 0.5oC of the average ~68% of the operating time

25 26 27 28 29 30 31 32 33 34 350

0.1

0.2

0.3

0.4

Temperature

Page 16: probability_distributions.ppt

Multidimensional Probability Distributions

Consider two random variable X and Y

Two-dimensional cumulative distribution function

Discrete distributions

Continuous distribution

Marginal distributions

),(),( yYxXPyxF

i j

jixx yy

ji yxfyxfyxFi j

1),(),(),(

2

2

1

1

),(),(

1***)*,(***)*,(),(

2211

b

a

b

a

y x

dxdyyxfbYabXaP

dydxyxfdydxyxfyxF

dyyxfxf

yxfYxXPxfj

j

),()(Continuous

),()arbitrary ,()(Discrete

1

1

Page 17: probability_distributions.ppt

Independent Random Variables

Basic property

Addition and multiplication of means

Addition of variance

Covariance

)()(),()()(),( 2121 yfxfyxfyFxFyxF

)()()()(only st variableIndependen

)()()()(General

2121

2121

nn

nn

XEXEXEXXXE

XEXEXEXXXE

XY

YEXEYXE

ZYXYX

2

)()()(

},{:},{:},{:

2`2

2`1

221

2211

22

21

2

)()()(st variableIndependen

)()()(

YEXEXYE

YEXEXYEXY