Chapter 6 Class Examples
Example: General Distribution 1 Suppose Ω = {1,2,3} and the pdf π(π₯; π) is
π = 1: π(1; 1) = 0.6, π(2; 1) = 0.1, π(3; 1) = 0.1, π(4; 1) = 0.2
π = 2: π(1; 2) = 0.2, π(2; 2) = 0.3, π(3; 2) = 0.2, π(4; 2) = 0.2
π = 3: π(1; 3) = 0.3, π(2; 3) = 0.4, π(3; 3) = 0.2, π(4; 3) = 0.1
What is the maximum likelihood estimate of π (based only on one observation of π if
1. X=1; π(1; 1) = 0.6, π(1; 2) = 0.2,
π = 1, hence πΜ = 1.
π(1; 3) = 0.3. The maximum is attained at
2. X=2; π(2; 1) = 0.1, π(2; 2) = 0.3,
π = 3, hence πΜ = 3.
π(2; 3) = 0.4. The maximum is attained at
3. X=3; π(3; 1) = 0.1, π(3; 2) = 0.2, π(3; 3) = 0.2. The maximum is attained at
both π = 2 and π = 3, hence, πΜ ∈ {2,3}.
4. X=4. π(4; 1) = 0.2, π(4; 2) = 0.2, π(4; 3) = 0.1 The maximum is attained at
both π = 1 and π = 2, hence, πΜ ∈ {1,2}.
Example: Coin Tossing
You flipped a coin 10 times. As a result, you observed [HTHTH TTTTT].
1. What is your MLE for π, the probability that the coin is showing head?
Let π» = number of heads in the 10 flips. The likelihood function is πΏ(π) = ππ» (1 −
π)10−π» = π3 (1 − π)7 ,
0 < π < 1. The log-likelihood is β(π) = logπΏ(π) =
3logπ + 7log(1 − π). Differentiating and setting the derivative equal to zero yields
3
7
β′ (π) = π − 1−π = 0
the MLE:
3
→ π = 10 = 0.3.
2. What is your MoM for π, the probability that the coin is showing head?
Let ππ = π{π-th flip is head}. Since πΈ[ππ ] = π, the method of moments gives
1
3
πΜMoM = π‾ = 10 ∑10
π=1 ππ = 10 .
3. Is MLE/ MoM unbiased?
Since π» ∼ Binomial(10, π), the MLE and MoM estimators are
π»
π»
πΜMLE = 10 , πΜMoM = π‾ = 10 .
π»
1
1
πΈ(πΜMoM ) = πΈ(πΜ MLE ) = πΈ (10) = 10 πΈ(π») = 10 (10π) = π. Hence, both the MLE and
MoM estimators are unbiased.
Example: Poisson Let π1 , … , ππ be a random sample of size π from a Poisson
distribution with mean π, π > 0.
1. Obtain method of moments estimator of π, πΜ.
1
Since πΈ[π] = π, the method of moments yields πΜMoM = π‾ = π ∑ππ=1 ππ .
2. Obtain the maximum likelihood estimator of π, πΜ.
The likelihood function is πΏ(π) = ∏ππ=1
setting it equal to zero gives −π +
π −π ππ₯π
∑π
π=1 π₯π
π
π₯π !
. Differentiating the log-likelihood and
= 0,
→
1
πΜMLE = π ∑ππ=1 ππ = π‾.
3. Is MLE/ MoM unbiased?
The MLE and MoM estimators are πΜMLE = πΜMoM = π‾. Since πΈ[ππ ] = π, πΈ(π‾) = π,
so both estimators are unbiased.
Example: Geometric distribution Let π1 , … , ππ be a random sample of size π from a
Geometric distribution with probability of success π, 0 < π < 1.
1. Obtain method of moments estimator of π, πΜ.
1
Since πΈ[π] = π, the method of moments yields
1
π‾ = π ,
→
1
πΜMoM = π‾ .
2. Obtain the maximum likelihood estimator of π, πΜ .
π
The likelihood function is πΏ(π) = ∏ππ=1 π (1 − π) ππ −1 = ππ (1 − π)∑π=1 ππ −π .
Differentiating the log-likelihood and setting it equal to zero gives
π
β′ (π) = π −
∑π
π=1 ππ −π
1−π
= 0,
→
πΜ MLE = ∑π
π
1
π=1 ππ
= π‾ .
3. Is MLE/ MoM unbiased?
The MLE and MoM estimators are
πΜMLE = πΜMoM =
1
.
π‾
Jensen’s inequality:
o for strictly convex function β(π‘),
o (strictly convex function: β(ππ₯ + (1 − π)π¦) < πβ(π₯) + (1 − π)β(π¦) for all
π ∈ (0,1), π₯ ≠ π¦)
β(πΈ[π]) < πΈ[β(π)]. Note that 1/π‘, π‘ > 0 is a strictly convex function. Therefore,
π=
So they are both biased.
1
1
1
=
< πΈ [ ],
1/π πΈ[π‾]
π‾
Example: Normal Distribution, 2 parameters Let π1 , … , ππ be a random sample of
size π from π(π1 , π2 ), where Ω = {(π1 , π2 ): −∞ < π1 < ∞, −∞ < π2 < ∞}.
Μ1 , and of π2 , π
Μ2 .
1. Find MLE of π1 , π
π
1
The log-likelihood function is β(π1 , π2 ) = − 2 log(2ππ2 ) − 2π ∑ππ=1( ππ − π1 )2 .
2
Differentiating and setting derivatives equal to zero yields
1
πΜ1MLE = π‾, πΜ2MLE = π ∑ππ=1( ππ − π‾)2 .
Μ2 .
2. Find MoM of π1 , Μ
π1 , and of π2 , π
Since πΈ[π] = π1 ,
Var(π) = π2 , the method of moments yields
1 π
Μ
Μ
‾
π1 = π, π2 = π ∑π=1( ππ − π‾)2 .
3. Is MLE of π1 , π2 unbiased?
For π1 ,
πΈ(πΜ1MLE ) = πΈ(π‾) = π1 ,
so πΜ1MLE is unbiased.
For π2 ,
π
1
πΈ(πΜ2 ) = πΈ ( ∑( ππ − π‾)2 )
π
π=1
π
=
1
πΈ (∑( ππ − π1 )2 − π(π‾ − π1 )2 )
π
π=1
π
=
1
(∑ πΈ [(ππ − π1 )2 ] − ππΈ[(π‾ − π1 )2 ])
π
π=1
1
π2
= (ππ2 − π ⋅ )
π
π
π−1
=
π2 ≠ π2 .
π
so πΜ2MLE is biased.
Poisson Distribution, MLE Invariance Principle Let π1 , … , ππ be a random sample of
size π from a Poisson Distribution with mean π, π > 0. Find the MLE of π(π = 2).
1
πΜMLE = π‾ = π ∑ππ=1 ππ .
Use the invariance principle.
Since π(π = 2) = π(π) =
Μ
π(π
= 2) = π(πΜMLE ) =
π2 π −π
, the invariance principle gives
2!
Μ 2 π −πΜMLE
π
MLE
2
=
‾
π‾ 2 π −π
2
.
Example : General distribution 2 Let π1 , … , ππ be a random sample of size π from a
distributin with pdf
π(π₯; π) =
1 + ππ₯
,
2
−1 < π₯ < 1,
−1 < π < 1.
1. Obtain MoM estimator of π, πΜ .
1
1+ππ₯
π
We first compute the population mean: πΈ[π] = ∫−1 π₯ 2 ππ₯ = 3. Equating the
π
sample mean to the population mean yields π‾ = 3 ,
πΜMoM = 3π‾.
→
2. Is πΜ an unbiased estimator of π?
πΈ(πΜMoM ) = 3πΈ(π‾)
= 3πΈ(π)
= π,
Μ
so πMoM is unbiased.
3. Find πππ(πΜ).
1
First compute the second moment: πΈ[π 2 ] = ∫−1 π₯ 2
Hence,
Var(π) = πΈ[π 2 ] − (πΈ[π])2
π2
1
=3− 9 =
Therefore,
3−π2
9
1+ππ₯
2
.
Var(πΜMoM ) = 9Var(π‾)
=9
=
Var(π)
π
3−π2
π
.
4. Find MSE.
3−π2
Since πΜMoM is unbiased, MSE(πΜMoM ) = Var(πΜMoM ) =
.
π
1
ππ₯ = 3.