28
Hadley Wickham Stat310 Normal distribution Thursday, 19 March 2009

18 Normal Cont

Embed Size (px)

Citation preview

Page 1: 18 Normal Cont

Hadley Wickham

Stat310Normal distribution

Thursday, 19 March 2009

Page 2: 18 Normal Cont

1. Another summer opportunity

2. Recap

3. Standard normal

4. Sums of normals

5. Chi-square distribution

Thursday, 19 March 2009

Page 3: 18 Normal Cont

Over summer

$5,000

Work with me (or anyone else in stats department)

Email me if you’re interested

VIGRE research project

Thursday, 19 March 2009

Page 4: 18 Normal Cont

Recap

What is the pdf of the normal distribution?

What is the mgf?

What is the mean and variance?

How do you create a standard normal?

What is the pdf and mgf of the gamma distribution?

Thursday, 19 March 2009

Page 5: 18 Normal Cont

Standard normalIf X ~ Normal(μ, σ2), and

Z = (X - μ) / σThen:

Z ~ Normal(0, 1) = standard normal

How can we show this? (What if X isn’t normal?)

Thursday, 19 March 2009

Page 6: 18 Normal Cont

Using the standard normal

These days, you don’t need to use the standard normal, you can just use a computer.

But it’s useful for exams, and more importantly, it’s how statisticians tend to think about the normal distribution

Use plot to give rough estimate.

Thursday, 19 March 2009

Page 7: 18 Normal Cont

Using the tablesColumn + row = z

Find: Φ(2.94), Φ(-1), Φ(0.01), Φ(4)

Can also use in reverse: For what value of z is P(Z < z) = 0.90 ? i.e. What is Φ-1(0.90)?

Find: Φ-1(0.1), Φ-1(0.5), Φ-1(0.65), Φ-1(1)

Thursday, 19 March 2009

Page 8: 18 Normal Cont

P (Z < z) = !(z)

P (!1 < Z < 1) = 0.68P (!2 < Z < 2) = 0.95P (!3 < Z < 3) = 0.998

!(!z) = 1! !(z)

Thursday, 19 March 2009

Page 9: 18 Normal Cont

Example

The time it takes me to bike to school is normally distributed with mean 10 and standard deviation 4.

What is the probability it takes me more than 20 minutes to bike to school?

What time should I leave so that I have 95% chance of getting to class by 1pm?

Thursday, 19 March 2009

Page 10: 18 Normal Cont

Example

What’s the probability I take a negative amount of time to get to school?

Is the distribution of my bike times really normal?

Thursday, 19 March 2009

Page 11: 18 Normal Cont

Confidence interval

I’d like to create a 95% confidence interval for my biking time. i.e. I want to find a and b such that P(a < X < b) = 0.95.

How many ways are there to construct this interval?

Generally want to find the interval with the shortest length. How can I do that?

Thursday, 19 March 2009

Page 12: 18 Normal Cont

Sums of normals

Let Xi ~ Normal(μi, σi2), independent

Y = c1X1 + c2X2 + … + cnXn

What is the distribution of Y? (What is the mean and variance of Y?)

How can we work it out?

Thursday, 19 March 2009

Page 13: 18 Normal Cont

Example

If Z1, Z2, Z3 are independent standard normals, what is the distribution of:

Z1 - Z3

Z1 + Z2 + Z3

(Z1 + Z2 + Z3)/3

Thursday, 19 March 2009

Page 14: 18 Normal Cont

CLT prequel

If X1, X2, …, Xn are iid N(μ, σ2)

What is the distribution of their average?

Thursday, 19 March 2009

Page 15: 18 Normal Cont

Another special distribution

If X ~ Normal(μ, σ2), and

V = (X - μ)2 / σ2 = Z2

Then

V ~ χ2(1)

Thursday, 19 March 2009

Page 16: 18 Normal Cont

Chi-squared

Skipped over it in Chapter 3

Special case of the gamma distribution, when θ = 2 and α = r / 2 (r an integer)

Mean = r, Variance = 2r

r is called degrees of freedom

Thursday, 19 March 2009

Page 17: 18 Normal Cont

http://en.wikipedia.org/wiki/Chi-square_distribution

Thursday, 19 March 2009

Page 18: 18 Normal Cont

SumsLet Z1, Z2, …, Zn be iid N(0, 1)

W = Z12 + Z22 + … + Zn2

Then

W ~ χ2(n)

This is going to be useful when we try to estimate the variance

Thursday, 19 March 2009

Page 19: 18 Normal Cont

Why?

Thursday, 19 March 2009

Page 20: 18 Normal Cont

day

time

0

5

10

15

20

1 2 3 4 5

Thursday, 19 March 2009

Page 21: 18 Normal Cont

day

time

0

5

10

15

20

● ●

● ●

1 2 3 4 5

Thursday, 19 March 2009

Page 22: 18 Normal Cont

day

time

0

5

10

15

20

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●●

●●●

●●

●●

●●

● ●●●

●●

●●

●●

●●

● ●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

100 200 300 400 500

Thursday, 19 March 2009

Page 23: 18 Normal Cont

day

time

0

5

10

15

20

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

100 200 300 400 500

Thursday, 19 March 2009

Page 24: 18 Normal Cont

time

count

0

10

20

30

40

50

60

70

0 5 10 15 20

Thursday, 19 March 2009

Page 25: 18 Normal Cont

week

time

0

5

10

15

20

●●

●●

●●

●●

1.0 1.5 2.0 2.5 3.0 3.5 4.0

Thursday, 19 March 2009

Page 26: 18 Normal Cont

week

time

0

5

10

15

20

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●●

●●

●●●

●●

●●

●●

●●●

●●●

●●

●● ●

●●

●●

●●●●

●●

●●

●●

●● ●

●●

●●●

●●

20 40 60 80 100

Thursday, 19 March 2009

Page 27: 18 Normal Cont

week

time

0

5

10

15

20

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●

20 40 60 80 100

Thursday, 19 March 2009

Page 28: 18 Normal Cont

time

count

0

5

10

15

20

25

30

0 5 10 15 20

Thursday, 19 March 2009