Top Banner
Hadley Wickham Stat310 Transformations Wednesday, 10 February 2010
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 09 Normal Trans

Hadley Wickham

Stat310Transformations

Wednesday, 10 February 2010

Page 2: 09 Normal Trans

Explorations in Statistics Research

http://www.stat.berkeley.edu/~summer/

7 day workshop in Boulder, Colorado

Travel + room & board covered

Large datasets, real research problems, and data visualisation.

Wednesday, 10 February 2010

Page 3: 09 Normal Trans

1. Test info

2. Normal distribution (theory)

3. Transformations

Wednesday, 10 February 2010

Page 4: 09 Normal Trans

Feb 18. 80 minute in class test. 4 questions.

One double sided sheet of notes.

Covers everything up to Feb 16: probability and random variables/distributions. See website for exactly what you should know.

Approximately half applied (working with real problems) and half theoretical (working with mathematical symbols).

Test

Wednesday, 10 February 2010

Page 5: 09 Normal Trans

ExpectationsPoints will be awarded for fully converting a word problem into a mathematical problem.

You should be able to differentiate & integrate polynomials and exponentials and apply the chain rule.

I will supply random mathematical facts and tables of probabilities (if needed).

Wednesday, 10 February 2010

Page 6: 09 Normal Trans

Note sheet

Much of the usefulness of a note sheet is the process of making it.

You want to condense everything we have covered. Pull out ongoing themes. Make tables. Use colour!

Not useful: a photocopy of someone else’s notes, a verbatim copy of the textbook

Wednesday, 10 February 2010

Page 7: 09 Normal Trans

The normal distribution

Wednesday, 10 February 2010

Page 8: 09 Normal Trans

f(x)

0.0

0.1

0.2

0.3

0.4

−10 −5 0 5 10

f(x)

0.0

0.1

0.2

0.3

0.4

−10 −5 0 5 10

f(x)

0.0

0.1

0.2

0.3

0.4

−10 −5 0 5 10

f(x)

0.0

0.1

0.2

0.3

0.4

−10 −5 0 5 10

N(-2, 1) N(5, 1)

N(0, 1)

N(0, 16)N(0, 4)

f(x)

0.0

0.1

0.2

0.3

0.4

−10 −5 0 5 10

Wednesday, 10 February 2010

Page 9: 09 Normal Trans

f(x) =1√2π

e−(x−µ)2

2σ2

Is this a valid pdf?

Wednesday, 10 February 2010

Page 10: 09 Normal Trans

Wolfram alpha

integrate 1/(sigma sqrt(2 pi)) e ^ (-(x- mu)^2 / (2(sigma^2))) from -infinity to infinity

Wednesday, 10 February 2010

Page 11: 09 Normal Trans

Not good enough :(Let’s do it by hand...

Wednesday, 10 February 2010

Page 12: 09 Normal Trans

M(t) = eµt+ 12 σ2t2

A few tricks + lots of algebra

Wednesday, 10 February 2010

Page 13: 09 Normal Trans

Your turn

If X ~ Normal(μ, σ2), use the mgf to confirm that the mean and variance are what you expect.

Wednesday, 10 February 2010

Page 14: 09 Normal Trans

Cheating...

d/dt e^(mu*t + 1/2 sigma^2 t^2) at t = 0

d^2/dt^2 e^(mu*t + 1/2 sigma^2 t^2) at t = 0

d^2/dz^2 exp(mu*z + 1/2 sigma^2 z^2) at z = 0

Wednesday, 10 February 2010

Page 15: 09 Normal Trans

Transformations

If X ~ Normal(μ, σ2), and Y = a(X + b)

Y ~ Normal(b + μ, a2σ2)

If a = -μ and b = 1/σ, we often write

Z = (X - μ) / σZ ~ Normal(0, 1) = standard normal

Wednesday, 10 February 2010

Page 16: 09 Normal Trans

Example

Let X ~ Normal(5, 10)

What is P(3 < X < 8) ?

Learn how to answer that question on Thursday.

Wednesday, 10 February 2010

Page 17: 09 Normal Trans

P (Z < z) = Φ(z)

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

Φ(−z) = 1− Φ(z)

Wednesday, 10 February 2010

Page 18: 09 Normal Trans

Transformations

Wednesday, 10 February 2010

Page 19: 09 Normal Trans

Discrete

Let X be a discrete random variable with pmf f as defined above.

Write out the pmfs for:

A = X + 2 B = 3*X C = X2

x -5 0 5 10 20

f(x) 0.2 0.1 0.3 0.1 0.3

Wednesday, 10 February 2010

Page 20: 09 Normal Trans

Continuous

Let X ~ Unif(0, 1)

What are the distributions of the following variables?

A = 10 X

B = 5X + 3

C = X2

Wednesday, 10 February 2010

Page 21: 09 Normal Trans

0.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8

X ~ Uniform(0, 1)

Wednesday, 10 February 2010

Page 22: 09 Normal Trans

0.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8

X ~ Uniform(0, 1)

Wednesday, 10 February 2010

Page 23: 09 Normal Trans

0.00

0.02

0.04

0.06

0.08

0.10

2 4 6 8

10X

Wednesday, 10 February 2010

Page 24: 09 Normal Trans

0.00

0.05

0.10

0.15

0.20

4 5 6 7

5X + 3

Wednesday, 10 February 2010

Page 25: 09 Normal Trans

0.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8

X ~ Uniform(0, 1)

Wednesday, 10 February 2010

Page 26: 09 Normal Trans

0

5

10

15

20

0.2 0.4 0.6 0.8

X2

Wednesday, 10 February 2010

Page 27: 09 Normal Trans

0.0

0.5

1.0

1.5

0.2 0.4 0.6 0.8

sqrt(X)

Wednesday, 10 February 2010

Page 28: 09 Normal Trans

Next time

Computing probabilities

Simulation

No reading, BUT GOOD OPPORTUNITY TO REVIEW CURRENT MATERIAL

Wednesday, 10 February 2010