Professional Documents
Culture Documents
Lecture 5
Lecture 5
The maximum likelihood estimator is by far the most popular technique of parameter
estimation. If 𝑌1 , 𝑌2 , … 𝑌𝑛 be an iid sample from distribution 𝑓(𝑦; 𝜃1, 𝜃2 , … 𝜃𝑘 ), the
likelihood function is defined as the joint distribution of 𝑌1 , 𝑌2 , … 𝑌𝑛 , which by virtue
of independence is simply the product of the individual marginal distributions.
𝑛
If the likelihood function is differentiable in 𝜃𝑖 , the possible candidate for the MLE
are the values of 𝜃1, 𝜃2 , … 𝜃𝑘 that solve:
𝜕𝐿(𝜽|𝒚)
= 0, 𝑖 = 1, 2, … 𝑘
𝜕𝜃𝑖
𝜕2 𝐿(𝜽|𝒚)
The second order condition [ < 0] should also be checked.
𝜕𝜃𝑖2
MLE Defined:
Suppose that the likelihood function depends on k parameters 𝜃1, 𝜃2 , … 𝜃𝑘 . Choose
as estimates those values of the parameters that maximize the
likelihood 𝐿(𝜃1, 𝜃2 , … 𝜃𝑘 |𝑦1 , 𝑦2 , … 𝑦𝑛 ).
Intuitively, the MLE is a reasonable choice for an estimator as it is the point in the
parameter space for which the observed sample is most likely to occur.
If the maximum occurs at the boundary point of the parameter space, derivative may
not be zero and the boundary must be checked for maximum separately. Points at
which derivative is zero may be local or global maximum or even point of inflection,
but MLE corresponds to global maximum. This is especially the case when the
resulting equation after setting derivative to zero has only numerically solution and
needs a starting point for iteration. If starting point is selected near local maximum,
chance is that solution obtained will not be optimal and hence not the MLE.
Logic of MLE:
Suppose that we are confronted with a box that contains three balls, each ball is
either red or white but actual number of red or white balls in the box is not known.
Let we are allowed to randomly sample two of the balls without replacement. If our
random sample yields two red balls, what would be a good estimate of the total
number of red balls in the box?
Obviously, the number of red balls in the box must be two or three. Let’s set up two
scenarios:
1. There are only two red balls in the box
2. All the three balls are red in the box
Probability that first scenario being true: P(two red balls in the box out of three) =
2 1
( )( ) 1
2 0
3 =
( ) 3
2
Probability that second scenario being true: P(two red balls in the box out of three)
=1 [We surely know that given that all three are red, two selected must be red].
It should seem reasonable to choose three as the estimate of the number of red balls
in the box because this estimate maximizes the probability of obtaining the observed
sample (in this case two selected balls being red).
This example illustrates a method for finding an estimator that can be applied to any
situation. The method of maximum likelihood, selects as estimates the values of the
parameters that maximize the likelihood (the joint probability function or joint
density function) of the observed sample.
∑𝑛
𝑒 −𝑛𝜆 𝜆 𝑖=1 𝑦𝑖
= ∏𝑛𝑖=1 𝑦𝑖 !
𝜕ln𝐿(𝜆|𝒚) (∑𝑛𝑖=1 𝑦𝑖 )
= −𝑛 + =0
𝜕𝜆 𝜆
∑𝑛
𝑖=1 𝑦𝑖
=>𝜆̂ = = 𝑦̅
𝑛
𝜕2 ln𝐿(𝜆|𝒚) ∑𝑛
𝑖=1 𝑦𝑖
[Check that = − < 0, as all y are non-negative]
𝜕𝜆2 𝜆2
Hence MLE of 𝜆 is 𝑦̅.
Sol:
𝐿(𝜽|𝒚) = 𝐿(𝜇, 𝜎 2 |𝑦1 , 𝑦2 , … 𝑦𝑛 ) = ∏𝑛𝑖=1 𝑓(𝑦𝑖 ; 𝜇, 𝜎 2 )
𝑛
𝑛 𝑛 1
ln 𝐿(𝜇, 𝜎 2 |𝒚) = − 𝑙𝑛𝜎 2 − 𝑙𝑛2𝜋 − 2 ∑(𝑦𝑖 − 𝜇)2
2 2 2𝜎
𝑖=1
𝑛
2 |𝒚)
𝜕 ln 𝐿(𝜇, 𝜎 1
= ∑(𝑦𝑖 − 𝜇)
𝜕𝜇 𝜎2
𝑖=1
𝑛
2 |𝒚)
𝜕 ln 𝐿(𝜇, 𝜎 𝑛 1 1
= − ( ) ( 2 ) + 4 ∑(𝑦𝑖 − 𝜇)2
𝜕𝜎 2 2 𝜎 2𝜎
𝑖=1
Setting these derivatives equal to zero and solving simultaneously, we obtain from
the first equation:
𝑛 𝑛
1 ∑𝑛𝑖=1 𝑦𝑖
∑(𝑦𝑖 − 𝜇̂ ) = 0 => ∑ 𝑦𝑖 − 𝑛𝜇̂ = 0 => 𝜇̂ = = 𝑦̅
𝜎̂ 2 𝑛
𝑖=1 𝑖=1
Sol:
𝐿(𝑝|𝒚) = 𝐿(𝑝|𝑦1 , 𝑦2 , … 𝑦𝑛 ) = ∏𝑛𝑖=1 𝑓(𝑦𝑖 |𝑝)
=∏𝑛𝑖=1 𝑝 𝑦𝑖 (1 − 𝑝)1−𝑦𝑖
= 𝑝 𝑦1 (1 − 𝑝)1−𝑦1 𝑝 𝑦2 (1 − 𝑝)1−𝑦2 … 𝑝 𝑦𝑛 (1 − 𝑝)1−𝑦𝑛