28
Hadley Wickham Stat310 CLT, Bivariate Tuesday, 24 March 2009

20 Bivariate

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: 20 Bivariate

Hadley Wickham

Stat310CLT, Bivariate

Tuesday, 24 March 2009

Page 2: 20 Bivariate

1. Help session / Photos

2. Recap

3. Finish off CLT proof

4. Some animations

5. Bivariate normal distribution

Tuesday, 24 March 2009

Page 3: 20 Bivariate

Changes: 5-6pm. Soyeon, not me

Same place, DH 1049. Wednesday

Photographer on Thursday

Help session

Tuesday, 24 March 2009

Page 4: 20 Bivariate

VIGRE Poster session

VIGRE is a program sponsored by the National Science Foundation to carry out innovative educational programs in which research and education are integrated and in which undergraduates, graduate students, postdoctoral fellows, and faculty are mutually supportive.

Wednesday, March 254:00 - 5:30 pm

Brochstein Pavilion

Tuesday, 24 March 2009

Page 5: 20 Bivariate

Recap

In your own words (or pictures or symbols) write down what the central limit theorem means

(I’ll collect these this time, so please use a sheet of paper)

Tuesday, 24 March 2009

Page 6: 20 Bivariate

Mathematically

Wn =X̄n ! µ

!/"

n

limn!"

Wn = Z ! Normal(0, 1)

If X1, X2, …, Xn, are iid, and

then

Tuesday, 24 March 2009

Page 7: 20 Bivariate

Fuller proof

If we want to be completely correct, we’ve missed a few important proofs:

If a series of mgf’s converges to a function, does the cdf/pdf also converge?

Is the error term really small enough?

See section 5.7 or the pdf linked from the website for more of these details.

Tuesday, 24 March 2009

Page 8: 20 Bivariate

Alternative expressions

!n(X̄n " µ) D# N(0, !2)

limn!"

P (Wn < z) = !(z)

WnD! N(0, 1)

Tuesday, 24 March 2009

Page 9: 20 Bivariate

I know of scarcely anything so apt to impress the imagination as the wonderful form of cosmic order expressed by the “Law of Frequency of Error”. ... It reigns with serenity and in complete self-effacement, amidst the wildest confusion. The huger the mob, and the greater the apparent anarchy, the more perfect is its sway. It is the supreme law of Unreason. Whenever a large sample of chaotic elements are taken in hand and marshaled in the order of their magnitude, an unsuspected and most beautiful form of regularity proves to have been latent all along.

— Sir Francis Galton (Natural Inheritance, 1889)

Tuesday, 24 March 2009

Page 10: 20 Bivariate

Why is it useful?

Many types of averages:

Average number of deaths per month

Cases of cancer per state

A couple more illustrations

Tuesday, 24 March 2009

Page 11: 20 Bivariate

mean

count 0

100

200

300

400

0

100

200

300

400

1

3

0.0 0.2 0.4 0.6 0.8 1.0

2

4

0.0 0.2 0.4 0.6 0.8 1.0

Tuesday, 24 March 2009

Page 12: 20 Bivariate

mean

coun

t 0

200

400

600

0

200

400

600

5

20

0.0 0.2 0.4 0.6 0.8 1.0

10

50

0.0 0.2 0.4 0.6 0.8 1.0

Tuesday, 24 March 2009

Page 13: 20 Bivariate

(mean − 0.5) * sqrt(n)/sqrt(1/8)

coun

t 0

100

200

300

400

0

100

200

300

400

1

3

−4 −2 0 2 4

2

4

−4 −2 0 2 4

Standardise

Tuesday, 24 March 2009

Page 14: 20 Bivariate

(mean − 0.5) * sqrt(n)/sqrt(1/8)

coun

t 0

50

100

150

200

0

50

100

150

200

5

20

−4 −2 0 2 4

10

50

−4 −2 0 2 4

Tuesday, 24 March 2009

Page 15: 20 Bivariate

mean

count 0

50

100

150

200

0

50

100

150

200

1

3

−4 −2 0 2 4

2

4

−4 −2 0 2 4

Calibration5000 standard normals

Tuesday, 24 March 2009

Page 16: 20 Bivariate

Counterexample

Playing roulette at a casino, betting 1 dollar on red. What is the distribution of my average winnings?

Probability of winning $1: 18/38

Probability of losing $1: 20/38

Tuesday, 24 March 2009

Page 17: 20 Bivariate

mean

coun

t 0

500

1000

1500

0

500

1000

1500

1

10

−1.0 −0.5 0.0 0.5 1.0

5

50

−1.0 −0.5 0.0 0.5 1.0

Tuesday, 24 March 2009

Page 18: 20 Bivariate

mean

count 0

200

400

600

800

0

200

400

600

800

100

200

−1.0 −0.5 0.0 0.5 1.0

150

250

−1.0 −0.5 0.0 0.5 1.0

Tuesday, 24 March 2009

Page 19: 20 Bivariate

(mean − rlt_mean) * sqrt(n)/sqrt(rlt_var)

coun

t 0

500

1000

1500

0

500

1000

1500

1

10

−4 −2 0 2 4

5

50

−4 −2 0 2 4

Standardise

Tuesday, 24 March 2009

Page 20: 20 Bivariate

(mean − rlt_mean) * sqrt(n)/sqrt(rlt_var)

coun

t 0

100

200

300

0

100

200

300

100

200

−4 −2 0 2 4

150

250

−4 −2 0 2 4

Tuesday, 24 March 2009

Page 21: 20 Bivariate

(mean − rlt_mean) * sqrt(n)/sqrt(rlt_var)

coun

t 0

50

100

150

200

250

0

50

100

150

200

250

300

600

−4 −2 0 2 4

400

800

−4 −2 0 2 4

Tuesday, 24 March 2009

Page 22: 20 Bivariate

mean

count 0

50

100

150

200

250

0

50

100

150

200

250

1

3

−4 −2 0 2 4

2

4

−4 −2 0 2 4

Calibration3000 standard normals

Tuesday, 24 March 2009

Page 23: 20 Bivariate

Bivariate normalOur first named bivariate distribution

Tuesday, 24 March 2009

Page 24: 20 Bivariate

Bivariate Normal

A bivariate distribution where all marginal and conditional distributions are normal.

Five parameters: two means, two variances, and correlation

Tuesday, 24 March 2009

Page 26: 20 Bivariate

f(x, y) =1

2!"x"y

!1! #2

exp"!q(x, y)

2

#

q(x, y) =1

1! !2

!z2x + z2

y ! 2!zxzy

"

zx =x! µx

!xzy =

x! µy

!y

Tuesday, 24 March 2009

Page 27: 20 Bivariate

Independence

If ρ = 0, what does that imply about X and Y?

Tuesday, 24 March 2009

Page 28: 20 Bivariate

Marginal and conditionals

Both marginal and conditional distributions are normal.

Y ! Normal(µy, !2y)X ! Normal(µx, !2

x)

X|Y ! Normal(µx + !"x

"y(y " µy), "2

x(1" !2))

Y|X ! Normal(µy + !"y

"x(x" µx), "2

y(1" !2))

Tuesday, 24 March 2009