estimation iii: method of moments and maximum likelihood · morepractice suppose that a random...

26
Estimation III: Method of Moments and Maximum Likelihood Stat 3202 @ OSU Dalpiaz 1

Upload: others

Post on 14-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Estimation III: Method of Moments and MaximumLikelihood

Stat 3202 @ OSUDalpiaz

1

Page 2: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

A Standard Setup

Let X1,X2, . . . ,Xniid∼ Poisson(λ). That is

f (x | λ) = λx e−λ

x ! , x = 0, 1, 2, . . . λ > 0

How should we estimate λ?

2

Page 3: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Population and Sample Moments

The k th population moment of a RV (about the origin) is

µ′

k = E[Y k]

The k th sample moment is

m′

k = Y k = 1n

n∑i=1

Y ki

3

Page 4: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

The Method of Moments (MoM)

The Method of Moments (MoM) consists of equating sample moments and populationmoments. If a population has t parameters, the MOM consists of solving the system of equations

m′

k = µ′

k , k = 1, 2, . . . , t

for the t parameters.

4

Page 5: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Poisson

Let X1,X2, . . . ,Xniid∼ Poisson(λ). That is

f (x | λ) = λx e−λ

x ! , x = 0, 1, 2, . . . λ > 0

Find a method of moments estimator of λ, call it λ̃.

5

Page 6: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Normal, Two Unknowns

Let X1,X2, . . . ,Xn be iid N(θ, σ2).

Use the method of moments to estimate the parameter vector(θ, σ2).

6

Page 7: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Normal, Mean Known

Let X1,X2, . . . ,Xn be iid N(1, σ2).

Find a method of moments estimator of σ2, call it σ̃2.

7

Page 8: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

8

Page 9: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Calculus???

9

Page 10: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

A Game Show / An Idea

10

Page 11: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Is a Coin Fair?

Let Y ∼ binom(n = 100, p).

Suppose we observe a single observation x = 60.

11

Page 12: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Log Rules

• xmxn = xm+n

• (xm)n = xmn

• log(ab) = log(a) + log(b)• log(a/b) = log(a)− log(b)• log(ab) = b log(a)•∏n

i=1 xi = x1 · x2 · · · · · xn

•∏n

i=1 xai =

(∏ni=1 xi

)a

• log(∏n

i=1 xi)

=∑n

i=1 log(xi)

12

Page 13: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Poisson

Let X1,X2, . . . ,Xniid∼ Poisson(λ). That is

f (x | λ) = λx e−λ

x ! , x = 0, 1, 2, . . . λ > 0

Find the maximum likelihood estimator of λ, call it λ̂.

13

Page 14: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Poisson

Let X1,X2, . . . ,Xniid∼ Poisson(λ). That is

f (x | λ) = λx e−λ

x ! , x = 0, 1, 2, . . . λ > 0

Calculate the maximum likelihood estimate of λ, when

x1 = 1, x2 = 2, x3 = 4, x4 = 2.

14

Page 15: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Maximum Likelihood Estimation (MLE)

Given a random sample X1,X2, . . . ,Xn from a population with parameter θ and density or massf (x | θ), we have:

The Likelihood, L(θ),

L(θ) = f (x1, x2, . . . , xn) =n∏

i=1f (xi | θ)

The Maximum Likelihood Estimator, θ̂

θ̂ = argmaxθ

L(θ) = argmaxθ

log L(θ)

15

Page 16: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Invariance Principle

If θ̂ is the MLE of θ and the function h(θ) is continuous, then h(θ̂) is the MLE of h(θ).

Let X1,X2, . . . ,Xniid∼ Poisson(λ). That is

f (x | λ) = λx e−λ

x ! , x = 0, 1, 2, . . . λ > 0

• Example: Find the maximum likelihood estimator of P[X = 4], call it P̂[X = 4]. Calculatean estimate using this estimator when

x1 = 1, x2 = 2, x3 = 4, x4 = 2.

16

Page 17: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Some Brief History

17

Page 18: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Who Is This?

18

Page 19: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Who Is This?

19

Page 20: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Another Example

Let X1,X2, . . . ,Xn iid from a population with pdf

f (x | θ) = 1θ

x (1−θ)/θ, 0 < x < 1, 0 < θ <∞

Find the maximum likelihood estimator of θ, call it θ̂.

20

Page 21: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

A Different Example

Let X1,X2, . . . ,Xn iid from a population with pdf

f (x | θ) = θ

x2 , 0 < θ ≤ x <∞

Find the maximum likelihood estimator of θ, call it θ̂.

21

Page 22: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Example: Gamma

Let X1,X2, . . . ,Xn ∼ iid gamma(α, β) with α known.

Find the maximum likelihood estimator of β, call it β̂.

22

Page 23: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

More Practice

Let Y1,Y2, . . . ,Yn be a random sample from a distribution with pdf

f (y | α) = 2α· y · exp

{−y2

α

}, y > 0, α > 0.

Find the maximum likelihood estimator of α.

23

Page 24: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

More Practice

Suppose that a random variable X follows a discrete distribution, which is determined by aparameter θ which can take only two values, θ = 1 or θ = 2. The parameter θ is unknown. Ifθ = 1, then X follows a Poisson distribution with parameter λ = 2. If θ = 2, then X follows aGeometric distribution with parameter p = 0.25. Now suppose we observe X = 3. Based on thisdata, what is the maximum likelihood estimate of θ?

24

Page 25: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

More More More

Let Y1,Y2, . . . ,Yniid∼ f (y | θ) =

2θ2

y3 θ ≤ y <∞

0 otherwise

Find the maximum likelihood estimator of θ.

25

Page 26: Estimation III: Method of Moments and Maximum Likelihood · MorePractice Suppose that a random variable X follows a discrete distribution, which is determined by a parameter θwhich

Next Time

• More examples?• Why does this work?• Why do we need both MLE and MoM?• How do we use these methods in practice?

26