Docsity

Deep Dive into Maximum Likelihood Estimation & Hypothesis Testing in Statistics - Prof. T., Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ESE 502 Tony E. Smith
TESTS BASED ON
MAXIMUM LIKELIHOOD
1. The Basic Example.
To illustrate the properties of maximum likelihood estimates and tests, we
consider the simplest possible case of estimating the mean of the normal
distribution with known variance, 2
σ
. Given a random sample
1
(,.., )
n
x
xx= from a normal distribution, 2
(, )N
μ
σ
, we first derive the
maximum-likelihood estimate of
μ
with 2
σ
known:
(1.1)
2
1
2
2
11
2
(|, )ln i
x
n
ni
Lx e
μ
σ
σπ
μσ
−
⎛⎞
−⎜⎟
⎝⎠
=
⎛⎞
⎜⎟
=⎜⎟
⎝⎠
∏
2
1
2
1
1
ln 2
ni
i
x
μ
σ
σπ
=
⎡
⎤
−
⎛⎞
⎛⎞
=−
⎢
⎥
⎜⎟
⎜⎟
⎝⎠
⎝⎠
⎢
⎥
⎣
⎦
∑
(
)
2
2
1
21
ln 2 ( )
n
i
i
nx
σ
σ
πμ
=
=− − −
So by solving the first-order condition for
μ
we obtain:
(1.2) 222
11
11
0()
nn
nii
ii
n
dL xx
d
σσσ
μ
μ
μ
==
== −= −
∑∑
11
1
ˆ
0
nn
inin
ii
n
x
nxx
μμ
==
⇒−=⇒= =
∑∑
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Deep Dive into Maximum Likelihood Estimation & Hypothesis Testing in Statistics - Prof. T. and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

TESTS BASED ON

MAXIMUM LIKELIHOOD

1. The Basic Example.

To illustrate the properties of maximum likelihood estimates and tests, we

consider the simplest possible case of estimating the mean of the normal

distribution with known variance,

2

σ. Given a random sample

1

n

x = x x from a normal distribution,

2

N ( μ , σ ), we first derive the

maximum-likelihood estimate of μ with

2

σ known:

2

1

2

2

1

1

2

( | , ) ln

i

x

n

n

i

L x e

μ

σ

σ π

− ⎛ ⎞

−

⎜ ⎟

⎝ ⎠

=

∏

2

1

2

1

ln

n

i

i

x μ

=

∑

( )

2

2

1

2 1

ln 2 ( )

n

i

i

n x

σ

=

∑

So by solving the first-order condition for μ we obtain:

2 2 2

1 1

1 1

n n

n

i i

i i

n

dL

x x

d

σ σ σ

μ μ

μ

= =

∑ ∑

1 1

1

n n

i n i n

i i

n

x n μ μ x x

= =

∑ ∑

2. Covariance of Maximum Likelihood Estimators

For this simple case, it is well known that the variance of the sample

mean,

n n

μ = X is given by

2

var( ) /

n

μ = σ n. But by taking the second

derivative of

n

L with respect to μ , and evaluating at the true mean value,

say

0

μ we see that

1

2 2

0 0

2 2 2

var( )

n n

n

d L n d L

d d

−

Since in this case,

2 2

n

d L d μ is independent of the data,

1

n

x x , it

follows that

2 2 2

0

[ ( ) / ] /

n

E d L μ d μ ≡ − n σ , so that in fact

1

2

1 0

0 2

var( ) ( )

n

n

d L

E

d

−

−

I

where

0

n

I μ is designated as Fisher Information about

0

μ (and is seen

to increase as the variance of the maximum-likelihood estimator, ˆ

n

μ ,

decreases). Finally, since the Law of Large Numbers shows in this case

that

0

n n

μ = X ≈ μ for n sufficiently large, we may conclude from (2.2)

that

1

var( ˆ ) ( ˆ )

n n n

−

≈ I

More generally, for any parameter vector,

1

k

= , defining a “well

behaved” distribution with likelihood function, ( )

n

L θ , it can be shown

that if

0

θ denotes the true value of θ , then the covariance matrix of the

maximum-likelihood estimator,

n

θ , is well approximated for large n by

4. Likelihood-Ratio Tests of Parameters

If we observe from (1.1) that

( )

2

2 2

1

0

2 1

( | , ) ln 2 ( )

n

n i

i

L x n x

σ

=

∑

then this difference can be evaluated as:

2

2 2

0 0

1 1

1

2

n n

n n n i n i

i i

L L x x

σ

μ μ μ μ

= =

−

∑ ∑

2

2 2 2 2

0

1 1

1

2

n n

i i n n i i o

i i

x x x x x x

σ

μ μ

= =

= −

∑ ∑

2

2 2

0 0

1 1

1

2

n n

n i n i

i i

x x n x x n

σ

μ μ

= =

= −

∑ ∑

2

2 2

0 0

2

n n

n

x x

σ

=

2

2

0

2

n

n

x

σ

= −μ

0

μ ˆ

n

μ

n

L μ

Figure 1. Likelihood Ratios

Another way to test the hypothesis

that, say

0

μ , is the true value of μ

is simply to compare the likelihood

of

0

μ with that of the most likely

value,

n

μ. If the resulting ratio of

likelihood values is close to one,

then this implies that

0

μ is a good

candidate for the true value of μ.

In terms of log likelihoods, this is

in turn equivalent to a difference,

0

n n n

L μ − L μ , close to zero.

Hence it follows that

2

0

0

2[ ( ) ( )]

n

n n n

x

L L

n

But under the null hypothesis that

0 0

H : μ = μ it follows that

0

n

x

N

n

and hence by definition that

2

2 0

1

n

x

n

Thus we see that under

0

H :

2

0 1

2[ ( ˆ ) ( )] ~

n n n

L μ − L μ χ

More generally, for any partition of parameters,

1 2

θ = (θ , θ ), the null

hypothesis,

1 1

0 0

H : θ = θ , can be tested in the same way by letting

2

0

θ be

defined by the condition,

2

1 2 1 2

0 0 0

( , ) max ( , )

n n

L L

θ

and comparing

1 2

0 0

n

L θ θ with the unconstrained maximum,

n n

L θ. If

1

0

has k components, then under

0

H we now have

1 2 2

0 0

2[ ( ) ( , )] ~

n n n k

L θ − L θ θ χ

( )

2 2 2

0 1

n

σ n s μ χ

Finally, recalling that

2

var( ˆ ) /

n

μ = σ n , we obtain the following score test

statistic :

2 2

0 0 1

var( ) ( ) ~

n

μ s μ χ

where

0

var( μ ) is formally the variance of

n

μ under the null hypothesis

(which is completely independent of

0

μ in this simple case).

It is important to note that this score test is also called a Lagrange

multiplier test. To see the reason for this, observe that finding the

maximum-likelihood estimate of μ under the null hypothesis,

0

μ = μ , is

formally equivalent to the Lagrangian maximization problem:

0

max ( ) ( ) ( )

n

L

μ

with solution given by

n

L

μ μ

0

λ

By combining these two conditions, we see that the optimal value,

λ , of

the Lagrange multiplier is given by,

0

n

L

μ

and thus that the score function,

0 0

n n

s L

μ

μ = ∇ μ , can also be

interpreted as a Lagrange multiplier. However, the above slope

interpretation seems to be simpler and more intuitive.

More generally, for any partition of parameters,

1 2

θ = (θ , θ ), as in section

4 above, the null hypothesis,

1 1

0 0

H : θ = θ , can be tested in the same way

by again letting

2

0

θ be defined by (4.7) and setting

1 2

0 0 0

θ = (θ , θ ). If

1

θ is of

dimension k , then the score vector,

0

n

s θ , also has dimension k , and the

variance term

0

var( μ ) in (5.4) is now replaced by the covariance sub-

matrix ,

11 0

cov ( θ ), where

11 0 12 0

0

21 0 22 0

cov ( ) cov ( )

cov( )

cov ( ) cov ( )

If the Fisher information matrix is given by

11 0 12 0

0

21 0 22 0

n n

n

n n

I I

I

I I

then it can easily be shown (by partitioned inverse identities) that

[ ]

1

1

11 0 0 11 0 12 0 22 0 21 0

11

cov ( ) ( ) ( ) ( ) ( ) ( )

n n n n n

−

−

I I I I I

so that the following score test statistic is obtained as a direct

generalization of (5.4):

1 2

0 0 0

11

n n n k

s θ θ s θ χ

−

I

The single most important feature of this score test is that it only requires

maximum-likelihood estimation under the null hypothesis , i.e.,

Next we observe that if the trace of a matrix ( : , 1,.., )

ij

A = a i j = n is

defined by

1

n

ii

i

tr A a

=

then it follows that for any matrices,

1

n

A a a

= and

1

n

B = b b ,

1

n

i i

i

tr AB a b tr BA

=

. Moreover,

since tr W ( ) = 0 for all weight matrices , it follows from (6.2) and (6.3)

that

1 1

1

n

i

i

tr W tr V Δ V tr Δ V V tr Δ ω

− −

=

Hence for the single most important null hypothesis,

0

ρ = 0 , we have

1 1 1

0

0

ln(1 ) 0

n n n

i

i i

i i i

i

ρ

ρ

ρ

= = =

=

=

and it follows that (6.1) reduces to

2 1

2

0

n

L y X B B y X

ρ ρ ρ ρ

σ

ρ

=

2

1

0 2

n n

y X I W I W y X

ρ

ρ σ

=

2

1

2

0

n

y X I W W W W y X

ρ

σ

ρ

=

2

1

2 0

( y X ) ( W W ) 2 W W ( y X )

σ ρ

=

2

1

2

( y X ) ( W W )( y X )

σ

2

1 1 1

2 2

{ ( y X ) W ( y X ) ( y X ) W ( y X )}

σ

2

1

( y X ) W ( y X )

σ

Hence if we let

2

0 0

( β , σˆ ) denote the OLS estimates of

2

( β , σˆ ) [i.e, the

maximum-likelihood estimates under the hypothesis, ρ = 0 ], so that in

this case,

2

0 0 0

θ = (0, β , σ ), then the score function is given by:

2

0

2

0 0 0 0 0

1

ˆ

n n

s L y X W y X

ρ

σ

But if we now let

0 0

ε = y − X β denote the OLS residuals, so that

2

0 0 0 0 0

1 1

ˆ ˆ

( (

n n

σ y X β y X β ε ε

= − − =

then (6.7) takes the form;

0 0 0 0 0

( ) / ( )

n

s θ n ε ε y X β W y X β

0 0

0

0 0

n

W

s n

ε ε

θ

ε ε

where the expression in brackets is precisely Moran’s I.

To complete the argument, recall from expression (77) in the

BULKPACK that the off-diagonal

2

( ρ , σ ) term in the Fisher

information matrix,

0

n

I θ , is given by

1

1

( ) [ ( ) ] [ ( ]

k k

n n

k

tr G tr W I W tr W I W

ρ

∞

−

=

1

1

k k

k

tr W ρ ρ W

∞

−

=

Hence under the null hypothesis, ρ = 0 , it follows that