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

39.3. MAXIMUM LIKELIHOOD ESTIMATES 817Thus(Ex) =k (ix)e= ;.) = —— 1-X,; = —— - xX, | ——k=1 FF k=) 1 k=1 l1—p1 m mxX, | =——p(l—p) d l—pand soSurely this makes sense. Recall that p was the orobabilty of a success in a Bernouli trialand the random variable X is the sum of these successes in 7 trials. To emphasize that thisis an estimate, people will write~ ldP= DXThe above trick in which you maximize In (L) is typically used. It is generally a goodidea because the likelihood involves taking a product and when you take the In 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 ut and 0 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 []j_, f (X;) . Thus, in this case, you maximizen 1 ] 2o)=]|—e =a (XE -) at To so ( 592 | k u))You can delete the 1/\/27. Then maximize the In of this. Thus you want to maximize¥ -In(o) + (-—,& 62 k—UFirst take the partial with respect to 1. Cancelling out the 07,y (X,—p) =0= yi Xi — nyk=1 k=1and so= EMRwhich is the sample mean. Next take partial derivative with respect to osiny 44 —)’=0Frm oO o k u ~~Thus, from the first part where ft was found,n= LX -X