39.3. MAXIMUM LIKELIHOOD ESTIMATES 817
Thus1p
(m
∑k=1
Xk
)=
11− p
m
∑k=1
1−Xk =m
1− p−
(m
∑k=1
Xk
)1
1− p
1p(1− p)
(m
∑k=1
Xk
)=
m1− p
and so1p
(m
∑k=1
Xk
)= m, p =
1m
m
∑k=1
Xk
Surely this makes sense. Recall that p was the probability of a success in a Bernouli trialand the random variable X is the sum of these successes in n trials. To emphasize that thisis an estimate, people will write
p̂ =1m
m
∑k=1
Xk.
The above trick in which you maximize ln(L) is typically used. It is generally a goodidea because the likelihood involves taking a product and when you take the ln of a product,you end up with a sum which is a lot easier to work with than the original product.
Example 39.3.2 Find a maximum likelihood estimate for µ and σ based on a randomsample X1, · · · ,Xn taken from a normal distribution.
In this and other cases of random variables having a density function, f (x) , you choosethe parameters to maximize the likelihood ∏
nk=1 f (Xk) . Thus, in this case, you maximize
L(µ,σ)≡n
∏k=1
1√2πσ
exp(− 1
2σ2 (Xk−µ)2)
You can delete the 1/√
2π . Then maximize the ln of this. Thus you want to maximize
n
∑k=1− ln(σ)+
(− 1
2σ2 (Xk−µ)2)
First take the partial with respect to µ . Cancelling out the σ2,
n
∑k=1
(Xk−µ) = 0 =n
∑k=1
Xk−nµ
and so
µ̂ =1n
n
∑k=1
Xk ≡ X̄
which is the sample mean. Next take partial derivative with respect to σ
n
∑k=1− 1
σ+
1σ3 (Xk−µ)2 = 0
Thus, from the first part where µ̂ was found,
σ2n =
n
∑k=1
(Xk− X̄)2