Você está na página 1de 17

Probability Distributions

1.

Probability distributions

2.

Discrete probability distributions

3.

Continuous probability distributions

4.

Multidimensional probability distributions

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)


F ( x) P ( X x) P (a X b) F (b) F (a )

Discrete Probability Distributions

Random variable X can only assume countably many


discrete values: x1, x2, x3,
Probability density function f(x)

p j P( X x j ) if x x j
f ( x)
0
otherwise

Cumulative distribution function

F ( x)

f (x ) p

x j x

x j x

Properties
P (a X b) F (b) F (a )

p
j

a x j b
j

Discrete Distribution Example

Matlab function: unicdf(x,n),


>> x = (0:6);
>> y = unidcdf(x,6);
>> stairs(x,y)

Continuous Probability Distributions

Random variable X can assume infinitely many real values

Cumulative distribution function


x

F ( x) f (v)dv

Probability density function

dF ( x)
f ( x)
dx

Properties
b

P(a X b) F (b) F (a ) f (v)dv

f (v)dv 1

Continuous Distribution Example

Probability density function


0.75(1 x 2 ) 1 x 1
f ( x)
0
otherwise

f (v)dv 0.75(1 v 2 )dv 1


1

Cumulative distribution function


x

F ( x) f (v)dv 0.75(1 v 2 )dv 0.5 0.75 x 0.25 x 3

F ( x)

x 1
1 x 1
x 1

0
0.5 0.75 x 0.25 x 3
1

Probability of events
P (0.5 x 0.5) F (0.5) F (0.5)

0.5

0.5

0.75(1 v 2 )dv 68.75%

P ( X x) F ( x) 0.95 0.5 0.75 x 0.25 x 3 x 0.73

Mean and Variance

Discrete distribution
x j f (x j )

Mean

Variance 2 ( x j ) 2 f ( x j )
j

Continuous distribution
Mean

xf ( x)dx

Variance 2 ( x ) 2 f ( x)dx

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

Expectations and Moments

Moments for continuous distributions

xf ( x)dx E ( X ) ( x ) 2 f ( x)dx E ([ X ]2 )
2

E ( X ) x k f ( x)dx

kth moment

E ([ X ]k ) ( x ) k f ( x)dx

kth central moment

Continuous distribution example


0.75(1 x 2 ) 1 x 1
f ( x)
0
otherwise

E ( X ) 0.75 x(1 x )dx (0.75) x (0.75) x


1

1
1

1
2

1
4

4 1
1

E ([ X ] ) ( x 0) 0.75(1 x )dx (0.75) x (0.75) x


2

1
3

1
5

5 1
1

0.2

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

P ( X A) p P ( X A) q 1 p

Probability of obtaining A exactly x times in n trials


n
n x n x
n 1
n!
1
1
f ( x) p q
p q 2 f ( x)

x!(n x)! 2
x
x 2

np 2 npq

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

Poisson Distribution

Infinitely many possible events

Probability distribution function

x
f ( x)
e
x!

x 0,1,2,

Limit of binomial distribution as

p 0 n np constant

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
x

j
0
1
2
P ( X 2) F ( 2) f ( x j )
e e 1 10! 11! 12! 0.9197
j 0
j 0 x j !
P ( X 2) 1 P ( X 2) 8.03%
2

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

Matlab: Poisson-Binomial Comparison

Screw example (p=0.01, n=100)


for less than 05 defective screws
>> x = (0:5);
>> y = poisscdf(x,1);
>> z = binocdf(x,100,0.01)

Number
0
1
2
3
4
5

Binomial Poisson
0.366032 0.367879
0.735762 0.735759
0.920627 0.919699
0.981626 0.981012
0.996568 0.99634
0.999465 0.999406

Compare Poisson to Binomial with equal , different p and n


1
0.9
0.8
0.7

Binomial n = 50, p = .02


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

0.6
0.5
0.4

0.5

1.5

2.5

3.5

4.5

Normal (Gaussian) Distribution

Probability density function


1 x
1
f ( x)
exp

2
2

f ( x)dx 1

Cumulative distribution function


1
F ( x)
2

1 v

dv
2

exp

Standardized normal distribution ( = 0, = 1)

1
( z )
2

2
2

du

F ( x )

Computing Probabilities

Interval probabilities
b
a

P(a X b) F (b) F (a )

Sigma limits

P( X ) 68%
P ( 2 X 2 ) 95.5%
P( 3 X 3 ) 99.7%

Example
X is a random variable with and 2 = 4
Use Table A7 in text
2.44 0.8
P ( X 2.44) F ( 2.44)
(0.82) 0.7939 79%
2

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
10.5754 7.7071

6.6688 10.2507

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:
0.4

p=normcdf([29.5 30.5],30,1)
p = [0.3085 0.6915]
p(2) p(1)
0.3829

0.3
0.2
0.1
0
25

26

27

28

29

30

31

Temperature

The reactor temperature will be within +/- 0.5oC


of the average ~68% of the operating time

32

33

34

35

Multidimensional Probability Distributions

Consider two random variable X and Y

Two-dimensional cumulative distribution function


F ( x , y ) P ( X x, Y y )

Discrete distributions
F ( x, y ) f ( xi , y j )
xi x y j y

f ( x , y ) 1
i

Continuous distribution
F ( x, y )


Y b )

f ( x*, y*)dx * dy *

P(a1 X b1 , a2


b2 b1
a 2 a1

f ( x*, y*)dx * dy* 1


f ( x, y )dxdy

Marginal distributions
Discrete

f1 ( x) P ( X x, Y arbitrary) f ( x, y j )
j

Continuous

f1 ( x) f ( x, y )dy

Independent Random Variables

Basic property
F ( x, y ) F1 ( x) F2 ( y )

f ( x, y ) f1 ( x) f 2 ( y )

Addition and multiplication of means


General

E( X1 X 2 X n ) E( X1) E( X 2 ) E( X n )

Independent variables only

E ( X 1 X 2 X n ) E ( X 1 ) E ( X 2 ) E ( X n )

Addition of variance

X : {1 , 1} Y : { 2 , 2 } X Y Z : { , }

E ( X Y ) E ( X ) E (Y ) 1 2
2 12` 22` 2 XY

Covariance
XY E ( XY ) E ( X ) E (Y )
E ( XY ) E ( X ) E (Y )
Independent variables
2 12 22

Você também pode gostar