chapter 5 – continued chapter 5 sections · chapter 5 – continued 5.6 normal distributions why...

25
Chapter 5 – continued Chapter 5 sections Discrete univariate distributions: 5.2 Bernoulli and Binomial distributions Just skim 5.3 Hypergeometric distributions 5.4 Poisson distributions Just skim 5.5 Negative Binomial distributions Continuous univariate distributions: 5.6 Normal distributions 5.7 Gamma distributions Just skim 5.8 Beta distributions Multivariate distributions Just skim 5.9 Multinomial distributions 5.10 Bivariate normal distributions STA 611 (Lecture 09) Expectation Sep 25, 2012 1 / 25

Upload: others

Post on 27-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued

Chapter 5 sections

Discrete univariate distributions:5.2 Bernoulli and Binomial distributionsJust skim 5.3 Hypergeometric distributions5.4 Poisson distributionsJust skim 5.5 Negative Binomial distributions

Continuous univariate distributions:5.6 Normal distributions5.7 Gamma distributionsJust skim 5.8 Beta distributions

Multivariate distributionsJust skim 5.9 Multinomial distributions5.10 Bivariate normal distributions

STA 611 (Lecture 09) Expectation Sep 25, 2012 1 / 25

Page 2: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Why Normal?Works well in practice. Many physical experimentshave distributions that are approximately normalCentral Limit Theorem: Sum of many i.i.d. randomvariables are approximately normally distributedMathematically convenient – especially themultivariate normal distribution.

Can explicitly obtain the distribution of manyfunctions of a normally distributed random variablehave.Marginal and conditional distributions of amultivariate normal are also normal (multivariate orunivariate).

Developed by Gauss and then Laplace in the early1800sAlso known at the Gaussian distributions

Gauss

LaplaceSTA 611 (Lecture 09) Expectation Sep 25, 2012 2 / 25

Page 3: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Normal distributions

Def: Normal distributions – N(µ, σ2)

A continuous r.v. X has the normal distribution with mean µ andvariance σ2 if it has the pdf

f (x |µ, σ2) =1√

2π σexp

(−(x − µ)2

2σ2

), −∞ < x <∞

Parameter space: µ ∈ R and σ2 > 0

Show:ψ(t) = exp

(µt + 1

2σ2t2)

E(X ) = µ

Var(X ) = σ2

STA 611 (Lecture 09) Expectation Sep 25, 2012 3 / 25

Page 4: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

The Bell curve

−4 −2 0 2 4 6

0.0

0.1

0.2

0.3

0.4

0.5

0.6

Different mean, same variance

x

Nor

mal

den

sity

µ = 0, σ2 = 1µ = 2, σ2 = 1

−10 −5 0 5 10

0.0

0.1

0.2

0.3

0.4

0.5

0.6

Same means, different variance

x

Nor

mal

den

sity

µ = 0, σ2 = 1µ = 0, σ2 = 9

STA 611 (Lecture 09) Expectation Sep 25, 2012 4 / 25

Page 5: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Standard normal

Standard normal distribution: N(0,1)

The normal distribution with µ = 1 and σ2 = 1 is called the standardnormal distribution and the pdf and cdf are denoted as φ(x) and Φ(x)

The cdf for a normal distribution cannot be expressed in closedform and is evaluated using numerical approximations.

Φ(x) is tabulated in the back of the book. Many calculators andprograms such as R, Matlab, Excel etc. can calculate Φ(x).

Φ(−x) = 1− Φ(x)

Φ−1(p) = −Φ−1(1− p)

STA 611 (Lecture 09) Expectation Sep 25, 2012 5 / 25

Page 6: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Properties of the normal distributions

Theorem 5.6.4: Linear transformation of a normal is still normal

If X ∼ N(µ, σ2) and Y = aX + b where a and b are constants anda 6= 0 then

Y ∼ N(aµ+ b,a2σ2)

Let F be the cdf of X , where X ∼ N(µ, σ2). Then

F (x) = Φ

(x − µσ

)and

F−1(p) = µ+ σΦ−1(p)

STA 611 (Lecture 09) Expectation Sep 25, 2012 6 / 25

Page 7: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Example: Measured Voltage

Suppose the measured voltage, X , in a certain electric circuit has thenormal distribution with mean 120 and standard deviation 2

1 What is the probability that the measured voltage is between 118and 122?

2 Below what value will 95% of the measurements be?

STA 611 (Lecture 09) Expectation Sep 25, 2012 7 / 25

Page 8: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Properties of the normal distributions

Theorem 5.6.7: Linear combination of ind. normals is a normal

Let X1, . . . ,Xk be independent r.v. and Xi ∼ N(µi , σ2i ) for i = 1, . . . , k .

ThenX1 + · · ·+ Xk ∼ N

(µ1 + · · ·+ µk , σ

21 + · · ·+ σ2

k

)Also, if a1, . . . ,ak and b are constants where at least one ai is not zero:

a1X1 + · · ·+ akXk + b ∼ N

(b +

k∑i=1

µi ,

k∑i=1

a2i σ

2i

)

In particular:The sample mean: X n = 1

n∑n

i=1 Xi

If X1, . . . ,Xn are a random sample from a N(µ, σ2), what is thedistribution of the sample mean?

STA 611 (Lecture 09) Expectation Sep 25, 2012 8 / 25

Page 9: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Example: Measured voltage – continued

Suppose the measured voltage, X , in a certain electric circuit has thenormal distribution with mean 120 and standard deviation 2.

If three independent measurements of the voltage are made, whatis the probability that the sample mean X 3 will lie between 118and 120?Find x that satisfies P(|X 3 − 120| ≤ x) = 0.95

STA 611 (Lecture 09) Expectation Sep 25, 2012 9 / 25

Page 10: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Area under the curve

µ − 4σ µ − 3σ µ − 2σ µ − σ µ µ + σ µ + 2σ µ + 3σ µ + 4σ

68%

µ − 4σ µ − 3σ µ − 2σ µ − σ µ µ + σ µ + 2σ µ + 3σ µ + 4σ

95%

µ − 4σ µ − 3σ µ − 2σ µ − σ µ µ + σ µ + 2σ µ + 3σ µ + 4σ

99.7%

µ − 4σ µ − 3σ µ − 2σ µ − σ µ µ + σ µ + 2σ µ + 3σ µ + 4σ

34%34%

13.5%13.5%2.35% 2.35%0.15% 0.15%

STA 611 (Lecture 09) Expectation Sep 25, 2012 10 / 25

Page 11: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.6 Normal distributions

Lognormal distributions

Def: Lognormal distributions

If log(X ) ∼ N(µ, σ2) then we say that X has the Lognormal distributionwith parameters µ and σ2.

The support of the lognormaldistribution is (0,∞).Often used to model timebefore failure.

0 1 2 3 4 50.

00.

20.

40.

6x

Logn

orm

al d

ensi

ty

µ = 0, σ2 = 1µ = 1, σ2 = 1µ = 1, σ2 = 1.5

Example:Let X and Y be independent random variables such thatlog(X ) ∼ N(1.6,4.5) and log(Y ) ∼ N(3,6). What is thedistribution of the product XY?STA 611 (Lecture 09) Expectation Sep 25, 2012 11 / 25

Page 12: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Bivariate normal distributions

Def: Bivariate normalTwo continuous r.v. X1 and X2 have the bivariate normal distributionwith means µ1 and µ2, variances σ2

1 and σ22 and correlation ρ if they

have the joint pdf

f (x1, x2) =1

2π(1 − ρ)1/2σ1σ2

× exp„−1

2

»(x1 − µ1)

2

σ21

− 2ρ„

x1 − µ1

σ1

« „x2 − µ2

σ2

«+

(x2 − µ2)2

σ22

–«(1)

Parameter space: µi ∈ R, σ2i > 0 for i = 1,2 and −1 ≤ ρ ≤ 1

STA 611 (Lecture 09) Expectation Sep 25, 2012 12 / 25

Page 13: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Bivariate normal pdf

Bivariate normal pdf with different ρ:

Correlation = 0 Correlation = 0.5 Correlation = 0.9 Correlation = −0.9

Contours:

−3 −2 −1 0 1 2 3

−3

−1

01

23

Correlation = 0

−3 −2 −1 0 1 2 3

−3

−1

01

23

Correlation = 0.5

−3 −2 −1 0 1 2 3

−3

−1

01

23

Correlation = 0.9

−3 −2 −1 0 1 2 3

−3

−1

01

23

Correlation = −0.9

STA 611 (Lecture 09) Expectation Sep 25, 2012 13 / 25

Page 14: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Bivariate normal as linear combination

Theorem 5.10.1: Bivariate normal from two ind. standard normalsLet Z1 ∼ N(0,1) and Z2 ∼ N(0,1) be independent.Let µi ∈ R, σ2

i > 0 for i = 1,2 and −1 ≤ ρ ≤ 1 and let

X1 = σ1Z1 + µ1

X2 = σ2(ρZ1 +√

1− ρ2Z2) + µ2 (2)

Then the joint distribution of X1 and X2 is bivariate normal withparameters µ1, µ2, σ2

1, σ21 and ρ

Theorem 5.10.2 (part 1) – the other wayLet X1 and X2 have the pdf in (1). Then there exist independentstandard normal r.v. Z1 and Z2 so that (2) holds.

STA 611 (Lecture 09) Expectation Sep 25, 2012 14 / 25

Page 15: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Properties of a bivariate normal

Theorem 5.10.2 (part 2)Let X1 and X2 have the pdf in (1). Then the marginal distributions are

X1 ∼ N(µ1, σ21) and X2 ∼ N(µ2, σ

22)

And the correlation between X1 and X2 is ρ

Theorem 5.10.4: The conditional is normalLet X1 and X2 have the pdf in (1). Then the conditional distribution ofX2 given that X1 = x1 is (univariate) normal with

E(X2|X1 = x1) = µ2 + ρσ2(x1 − µ1)

σ1and

Var(X2|X1 = x1) = (1− ρ2)σ22

STA 611 (Lecture 09) Expectation Sep 25, 2012 15 / 25

Page 16: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Properties of a bivariate normal

Theorem 5.10.3: Uncorrelated⇒ IndependentLet X1 and X2 have the bivariate normal distribution. Then X1 and X2are independent if and only if they are uncorrelated.

Only holds for the multivariate normal distributionOne of the very convenient properties of the normal distribution

Theorem 5.10.5: Linear combinations are normalLet X1 and X2 have the pdf in (1) and let a1, a2 and b be constants.Then Y = a1X1 + a2X2 + b is normally distributed with

E(Y ) = a1µ1 + a2µ2 + b and

Var(Y ) = a21σ

21 + a2

2σ22 + 2a1a2ρσ1σ2

This extends what we already had for independent normals

STA 611 (Lecture 09) Expectation Sep 25, 2012 16 / 25

Page 17: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Example

Let X1 and X2 have the bivariate normaldistribution with means µ1 = 3, µ2 = 5,variances σ2

1 = 4, σ22 = 9 and correlation

ρ = 0.6.a) Find the distribution of X2 − 2X1

b) What is expected value of X2, given thatwe observed X1 = 2?

c) What is the probability that X1 > X2?

−2 0 2 4 6 80

510

STA 611 (Lecture 09) Expectation Sep 25, 2012 17 / 25

Page 18: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Multivariate normal – Matrix notation

The pdf of an n-dimensional normal distribution, X ∼ N(µ,Σ):

f (x) =1

(2π)n/2|Σ|1/2 exp{−1

2(x− µ)ᵀΣ−1(x− µ)

}where

µ =

µ1µ2...µn

, x =

x1x2...

xn

and Σ =

σ2

1 σ1,2 σ1,3 · · · σ1,nσ2,1 σ2

2 σ2,3 · · · σ2,nσ3,1 σ3,2 σ2

3 · · · σ3,n...

......

. . ....

σn,1 σn,2 σn,3 · · · σ2n

µ is the mean vector and Σ is called the variance-covariance matrix.

STA 611 (Lecture 09) Expectation Sep 25, 2012 18 / 25

Page 19: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.10 Bivariate normal distributions

Multivariate normal – Matrix notation

Same things hold for multivariate normal distribution as the bivariate.Let X ∼ N(µ,Σ)

Linear combinations of X are normalAX + b is (multivariate) normal for fixed matrix A and vector bThe marginal distribution of Xi is normal with mean µi andvariance σ2

i

The off-diagonal elements of Σ are the covariances betweenindividual elements of X, i.e. Cov(Xi ,Xj) = σi,j .The joint marginal distributions are also normal where the meanand covariance matrix are found by picking the correspondingelements from µ and rows and columns from Σ.The conditional distributions are also normal (multivariate orunivariate)

STA 611 (Lecture 09) Expectation Sep 25, 2012 19 / 25

Page 20: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.7 Gamma distributions

Gamma distributions

The Gamma function: Γ(α) =∫∞

0 xα−1e−xdxΓ(1) = 1 and Γ(0.5) =

√π

Γ(α) = (α− 1)Γ(α) if α > 1

Def: Gamma distributions – Gamma(α, β)

A continuous r.v. X has the gamma distribution with parameters α andβ if it has the pdf

f (x |α, β) =

{βα

Γ(α)xα−1e−βx for x > 00 otherwise

Parameter space: α > 0 and β > 0

Gamma(1, β) is the same as the exponential distribution withparameter β, Expo(β)

STA 611 (Lecture 09) Expectation Sep 25, 2012 20 / 25

Page 21: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.7 Gamma distributions

Properties of the gamma distributions

ψ(t) =(

ββ+t

)αE(X ) = α

β and E(X ) = αβ2

If X1, . . . ,Xk are independent Γ(αi , β) r.v. then

X1 + · · ·+ Xk ∼ Gamma

(k∑

i=1

αi , β

)

0 1 2 3 4 5

0.0

0.5

1.0

1.5

x

Logn

orm

al d

ensi

ty

α = 2, β = 2α = 2, β = 4α = 4, β = 2α = 0.5, β = 0.5

STA 611 (Lecture 09) Expectation Sep 25, 2012 21 / 25

Page 22: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.7 Gamma distributions

Properties of the gamma distributions

Theorem 5.7.9: Exponential distribution is memoryless

Let X ∼ Expo(β) and let t > 0. Then for any h > 0

P(X ≥ t + h|X ≥ t) = P(X ≥ h)

Theorem 5.7.12: Times between arrivals in a Poisson process

Let Zk be the time until the k th arrival in a Poisson process with rate β.Let Y1 = Z1 and Yk = Zk − Zk−1 for k ≥ 2.Then Y1,Y2,Y3, . . . are i.i.d. with the exponential distribution withparameter β.

STA 611 (Lecture 09) Expectation Sep 25, 2012 22 / 25

Page 23: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.8 Beta distributions

Beta distributions

Def: Beta distributions – Beta(α, β)

A continuous r.v. X has the beta distribution with parameters α and β ifit has the pdf

f (x |α, β) =

{Γ(α+β)

Γ(α)Γ(β)xα−1(1− x)β−1 for 0 < x < 10 otherwise

Parameter space: α > 0 and β > 0

Beta(1,1) = Uniform(0,1)

Used to model a random variable that takes values between 0 and1.The Beta distributions are often used as prior distributions forprobability parameters, e.g. the p in the Binomial distribution.

STA 611 (Lecture 09) Expectation Sep 25, 2012 23 / 25

Page 24: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued 5.8 Beta distributions

Beta distributions

0.0 0.2 0.4 0.6 0.8 1.0

13

x

Den

sity

Beta(0.3,0.3)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

1.5

x

Den

sity

Beta(5,5)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

2.0

x

Den

sity

Beta(5,10)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

2.0

x

Den

sity

Beta(10,5)

STA 611 (Lecture 09) Expectation Sep 25, 2012 24 / 25

Page 25: Chapter 5 – continued Chapter 5 sections · Chapter 5 – continued 5.6 Normal distributions Why Normal? Works well in practice. Many physical experiments have distributions that

Chapter 5 – continued

END OF CHAPTER 5

STA 611 (Lecture 09) Expectation Sep 25, 2012 25 / 25