28
1 Ch5. Probability Densities Dr. Deshi Ye [email protected]

1 Ch5. Probability Densities Dr. Deshi Ye [email protected]

Embed Size (px)

Citation preview

Page 1: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

1

Ch5. Probability Densities

Dr. Deshi Ye

[email protected]

Page 2: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

2

Outline Continuous Random variables Kinds of Probability distribution

Normal distr. Uniform distr. Log-Normal dist. Gamma distr. Beta distr. Weibull distr.

Joint distribution Checking data if it is normal?

Transform observation to near normal Simulation

Page 3: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

3

5.1 Continuous Random Variables

Continuous sample space: the speed of car, the amount of alcohol in a person’s blood

Consider the probability that if an accident occurs on a freeway whose length is 200 miles.

Question: how to assign probabilities?

Page 4: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

4

Assign Prob.

Suppose we are interested in the prob. that a given random variable will take on a value on the interval [a, b]

We divide [a, b] into n equal subintervals of width ∆x, b – a = n ∆x, containing the points x1, x2, ..., xn, respectively.

Then

n

ii xxfbxaP

1

)()(

Frequency

Page 5: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

5

If f is an integrable function for all values of the random variable, letting ∆x-> 0, then

b

adxxfbxaP )()(

Page 6: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

6

Continuous Probability Density Function

1. Shows All Values, x, & Frequencies, f(x) f(X) Is Not Probability

2. Properties

(Area Under Curve)(Area Under Curve)

ValueValue

(Value, Frequency)(Value, Frequency)

FrequencyFrequency

f(x)f(x)

aa bbxx

ff xx dxdx

ff xx

(( ))

(( ))

All All XX

aa x x bb

11

0,0,

Page 7: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

7

Continuous Random Variable Probability

Probability Is Area Probability Is Area Under Curve!Under Curve!

f(x)f(x)

Xa b

b

adxxfbxaP )()(

Page 8: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

8

Distribution function F

Distribution function F (cumulative distribution )

xdttfxF )()(

)( xXP Or

( )( )

dF xf x

x

Integral calculus:

Page 9: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

9

EX

If a random variable has the probability density

find the probabilities that it will take on a value

A) between 1 and 3 B) greater than 0.5

else

xforexf

x

0

02)(

2

Page 10: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

10

Solution

133.0|2)31( 2631

23

1

2 eeedxexP xx

2 2 10.50.5

( 0.5) 2 | 0 0.368x xP x e dx e e

B)

A)

Page 11: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

11

Mean and Variance

( )xf x dx

Mean:

Variance:

2 2( ) ( )x f x dx

Page 12: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

12

K-th moment

About the original

About the mean

dxxfxkk

)('

( ) ( )kk x f x dx

Page 13: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

13

Useful cheat

dxexa

n

a

exdxex axn

axnaxn 1

Page 14: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

14

Continuous Probability Distribution Models

Continuous Probability Distribution

Uniform Normal Exponential Others

Page 15: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

15

Normal Distribution

Page 16: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

16

5.2 The Normal Distribution

Normal probability density (normal distribution)

xexf

x2

2

2

)(2

2

1),;(

The mean and variance of normal distribution is exactly

2 and

Page 17: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

17

The Normal Distribution

X

f(X)

X

f(X)

Mean Mean Median Median ModeMode

1. ‘Bell-Shaped’ & Symmetrical

2. Mean, median, mode are equal

3. Random variable has infinite range

Page 18: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

18

The Normal Distribution

f(x) = Frequency of random variable x = Population standard deviation = 3.14159; e = 2.71828x = value of random variable (- < x < ) = Population mean

xexf

x2

2

2

)(2

2

1),;(

Page 19: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

19

Effect of varying parameters ( & )

X

f(X)

CA

B

Page 20: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

20

Standard normal distribution function

Standard normal distribution, with mean 0 and variance 1. Hence

z t dtezFzZP 2/2

2

1)()(

)()()( aFbFbxaP

( ) 1 ( )F z F z

Normal table

Page 21: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

21

Standardize theNormal Distribution

X

X

One table! One table!

Normal DistributionNormal Distribution

= 0

= 1

Z = 0

= 1

Z

ZX

ZX

Standardized

Normal DistributionStandardized

Normal Distribution

Page 22: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

22

Not standard normal distribution

Let , then the random

Variable Z, F(z) has a standard normal distribution. We call it z-scores.

When X has normal distribution with mean and standard deviation

uX

Z

)()()(

aF

bFbxaP

Page 23: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

23

Find z values for the known probability

Given probability relating to standard normal distribution, find the corresponding value z.

F(z) is known, what is the value of z?

Let be such that probability is

where

z

)( zZP

Page 24: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

24

Finding Z Values for Known Probabilities

Z .00 0.2

0.0 .0000 .0040 .0080

0.1 .0398 .0438 .0478

0.2 .0793 .0832 .0871

.1179 .1255

Z .00 0.2

0.0 .0000 .0040 .0080

0.1 .0398 .0438 .0478

0.2 .0793 .0832 .0871

.1179 .1255

Z = 0

= 1

.31 Z = 0

= 1

.31

.1217.1217.1217.1217.01.01

0.30.3 .1217

Standardized Normal Standardized Normal Probability Table (Portion)Probability Table (Portion)

Standardized Normal Standardized Normal Probability Table (Portion)Probability Table (Portion)

What is Z given What is Z given P(Z) = .1217?P(Z) = .1217?What is Z given What is Z given P(Z) = .1217?P(Z) = .1217?

Shaded area Shaded area exaggeratedexaggeratedShaded area Shaded area exaggeratedexaggerated

Page 25: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

25

1)(zF

Find the following values (check it in Table)

645.1,95.005.01)(

33.2,99.001.01)(

05.005.0

01.001.0

zzF

zzF

Page 26: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

26

5.3 The Normal Approximation to the binomial distribution

Theorem 5.1. If X is a random variable having the binomial distribution with parameter n and p, the limiting form of the distribution function of the standardized random variable

as n approaches infinity, is given by the standard normal distribution

(1 )

X npZ

np p

zdtezFz t 2/2

2

1)(

Page 27: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

27

EX If 20% of the memory chips made in a

certain plant are defective, what are the probabilities that in a lot of 100 random chosen for inspection?

A) at most 15.5 will be defective B) exactly 15 will be defective

Hint: calculate it in binomial dist. And normal distribution.

Page 28: 1 Ch5. Probability Densities Dr. Deshi Ye yedeshi@zju.edu.cn

28

A good rule

A good rule for normal approximation to the binomial distribution is that both

np and n(1-p) is at least 15