Key idea. The binomial coefficient does not depend on p, so it is enough to maximise log(p8(1−p)4).
We have
P[X=8]=(812)p8(1−p)4,
and (812) is a positive constant. The logarithm is strictly increasing, so we may maximise
ℓ(p)=8logp+4log(1−p),0<p<1.
Differentiating,
ℓ′(p)=p8−1−p4=p(1−p)8(1−p)−4p=p(1−p)8−12p.
The denominator is positive on (0,1). Hence ℓ′(p)>0 for p<32 and ℓ′(p)<0 for p>32.
So ℓ increases up to p=32 and decreases afterwards. The point p=32 is therefore the unique global maximiser on (0,1). At this point
P[X=8]=495⋅31228=5904914080≈0.238.
p=32
Generalisation. For X∼Bin(n,p) and an observation 0<k<n, the same computation gives
ℓ′(p)=p(1−p)k−np.
The maximum likelihood estimate of p is therefore the sample proportion p^=k/n.