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

43
Ch5. Probability Densities II Dr. Deshi Ye [email protected]

Transcript of Ch5. Probability Densities II Dr. Deshi Ye [email protected].

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

Ch5. Probability Densities II

Dr. Deshi Ye

[email protected]

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

2/33

5.4 Other Prob. Distribution

Uniform distribution: equally likely outcome

else

xforxf

0

1

)(

Mean of uniform2

1

dxx

12

)(

3

1

22

22

222

2

dxx

Variance of uniform

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

3/33

Ex.

Students believe that they will get the final scores between 80 and 100. Suppose that the final scores given by the instructors has a uniform distribution.

What is the probability that one student get the final score no less than 85?

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

4/33

Solution

P(85 x 100)= (Base)(Height) = (100 - 85)(0.05) = 0.75

8080 100100

ff((xx))

xx8585

20

1

80100

11

20

1

80100

11

0.050.05

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

5/33

5.6 The Log-Normal Distr.

Log-Normal distribution:

0

0,02

1)(

2

2

2

)(ln

1

xfordxexxf

x

1,0 It has a long right-hand tail

By letting y=lnx)

ln()

ln(

2

1ln

ln

2

)(2

2

a

Fb

Fdyeb

a

y

,Hence

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

6/33

Mean of Log-Normal

Mean and variance are

2 2 2/ 2 2 2, ( 1)e e e

Proof.

dxe x2

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

7/33

Gamma distribution

else

xforexxf

x

0

,0,,0)(

1)(

1

integerpositiveaisαwhen)!1(

)1()1()(0

1

dxex x

2 2, Mean and Variance

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

8/33

The Exponential Distribution

By letting in the Gamma distribution

10, , 0,

( )

0

x

e for xf x

else

1

2 2, Mean and Variance

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

9/33

5.8 The Beta Distribution

When a random variables takes on values on the interval [0,1]

else

xforxxxf

0

0,,10)1()()(

)(

)(11

22

,( ) ( 1)

Mean and Variance

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

10/33

Beta distribution

Are used extensively in Bayesian statistics

Model events which constrained to take place within a interval defined by minimum and maximum value

Extensively used in PERT, CPM, project management

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

11/33

5.9 Weibull Distribution

0

0,,0)(

1 xforex

xfx

1 22 21 2 1

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

Mean and Variance

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

12/33

Weibull distribution

Is most commonly used in life data analysis

Manufactoring and delivery times in industrial engineering

Fading channel modeling in wireless communication

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

13/33

5.10 Joint distribution

Experiments are conduced where two or more random variables are observed simultaneously in order to determine not only their individual behavior but also the degree of relationship between them.

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

14/33

Two discrete random variables

),(),( 221121 xXxXPxxf

The probability that X1 takes value x1 and X2 will take

the value x2

EX. x10 1 2

x2

0 1

0.1 0.4 0.10.2 0.2 0

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

15/33

Marginal probability distributions

2

),()()( 211111xall

xxfxXPxf

x10 1 2

x2 0

1

0.1 0.4 0.10.2 0.2 0

0.3 0.6 0.1)( 11 xf

EX.

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

16/33

Conditional Probability distribution

0)(),(

)|( 22122

21211 xfprovidedxallfor

xf

xxfxxf

The conditional probability of X1 given that X2=x2

If two random variables are independent

2111211 )()|( xandxallforxfxxf

)(, 221121 xfxfxxf

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

17/33

EX. With reference to the previous example, find

the conditional probability distribution of X1, given that X2=1. Are X1 and X2 independent?

Solution.

04.0

0

)1(

)1,2()1|2(

5.04.0

2.0

)1(

)1,1()1|1(

5.04.0

2.0

)1(

)1,0()1|0(

21

21

21

f

ff

f

ff

f

ff

)0(3.05.0)1|0( 11 ff Hence, it is dependent

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

18/33

Continuous variables

If are k continuous random variables, we refer to as the joint probability density of these random variables

1

1

2

22121 ),,,(

b

a

b

a

b

a kk

k

k

dxdxdxxxxf

kXXX ,,, 21

),,,( 21 kxxxf

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

19/33

EX.

P179.

elsewhere

xxforexxf

xx

0

0,06),( 21

32

21

21

Find the probability that the first random variable between 1 and 2 and the second random variable between 2 and 3

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

20/33

Marginal density

Marginal density of X1

22111 ),()( dxxxfxf

0 12

3211 06)( 21 xfordxexf xx

Example of previous

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

21/33

Distribution function

1 2

212121 ),(),(x x

dxdxxxfxxF

),()(

),()(

222

111

xFxF

xFxF

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

22/33

Independent

),()()(),( 21221121 xxallforxfxfxxf

If two random variables are independent iff the following equation satisfies.

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

23/33

Properties of Expectation

Consider a function g(x) of a single random variable X. For example: g(x) =9x/5 +32.

If X has probability density f(x), then the mean or expectation of g(x) is given by

dxxfxgxgE )()()]([

[ ( )] ( ) ( )i

i iall x

E g x g x f xOr

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

24/33

Properties of Expectation

bxaEbaxE ][][

If a and b are constants

][][ 2 xDabaxD

Proof. Both in continuous and discrete case

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

25/33

Covariance

Covariance of X1 and X2: to measure

)])([( 2211 XXE

Theorem. When X1 and X2 are independent, their covariance is 0

1 1 2 2[( )( )] 0E X X

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

26/33

5.11 Checking Normal

Question: A data set appears to be generated by a normal distributed random variable

Collect data from students’ last 4 numbers of mobiles

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

27/33

Simple approach

Histogram can be checked for lack of symmetry

A single long tail certainly contradict the assumption of a normal distribution

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

28/33

Normal scores plot Also called Q-Q plot, normal quantile plot, normal order plot, or rankit plot.Normal scores: an idealized sample from the

standard normal distribution. It consists of the values of z that divide the axes into equal probability intervals. For example, n=4.

84.0

25.0

25.0

84.0

2.04

4.03

4.02

2.01

zm

zm

zm

zm

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

29/33

Steps to construct normal score plot

1) order the data from smallest to largest

2) Obtain the normal scores 3) Plot the i-th largest observation,

versus i-th normal score mi, for all i. Plot

nddd 21

),( ii md

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

30/33

Normal scores in Minitab

In minitab, the normal scores are calculated in different ways:

The i-the normal score is

))4/1/()8/3((1 ni

Where is the inverse cumulative distribution function of the standard normal

)(1 x

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

31/33

Property of Q-Q plot

If the data set is assumed to be normal distribution, then normal score plot will resemble to a /line through the original.

045

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

32/33

5.12 Transform observation to near normality

When the histogram or normal scores plot indicate that the assumption of a normal distribution is invalid, transformations of the data can often improve the agreement with normality.

Make larger values smaller

Make large value larger

x

1 ln x 1/ 4x x 2 3,x x

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

33/33

Simulation

Suppose we need to simulate values from the normal distribution with a specified 2 and

x

z•From The value x can be calculated from the value of a standard normal variable z

1) z can be obtained from the value for a uniform variable u by numerically solving u=F(z)

2) Box-Muller-Marsaglia method: it starts with a pair of independent variable u1 and u2, and produces two standard normal variables

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

34/33

Box-Muller-Marsaglia

)2sin()ln(2

)2cos()ln(2

122

121

uuz

uuz

22

11

zx

zx

Then

It starts with a pair of independent variable u1 and u2, and produces two standard normal variables

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

35/33

Simulation from exponential distribution

Suppose we wish to simulate an observation from the exponential distribution

xexF x 0,1)( 3.0

The computer would first produce the value u from the uniform distribution. Then

3.0

)1ln( ux

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

36/33

Population and sample

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

37/33

Population and Sample

Investigating: a physical phenomenon, production process, or manufactured unit, share some common characteristics.

Relevant data must be collected. Unit: the source of each measurement.

A single entity, usually an object or person Population: entire collection of units.

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

38/33

Population and sample

Population

sample

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

39/33

Key terms

Population All items of interest

Sample Portion of population

Parameter Summary Measure about Population

Statistic Summary Measure about sample

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

40/33

Examples

Population Unit variables

All students currently enrolled in school

student GPANumber of credits

All books in library

book Replacement cost

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

41/33

Sample

Statistical population: the set of all measurement corresponding to each unit in the entire population of units about which information is sought.

Sample: A sample from a statistical population is the subset of measurements that are actually collected in the course of investigation.

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

42/33

Sample

Need to be representative of the population

To be large enough to contain sufficient information to answer the question about the population

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

43/33

Discussion P10, Review Exercises 1.2 A radio-show host announced that she wanted

to know which singer was the favorite among college students in your school. Listeners were asked to call and name their favorite singer. Identify the population, in terms of preferences, and the sample.

Is the sample likely to be more representative? Comment. Also describe how to obtain a

sample that is likely to be more representative.