Multinomial likelihood (source code)

= Multinomial likelihood

For nonnegative <integer> category counts $y_1,\ldots,y_k$ with fixed total $n=\sum_jy_j$, the <multinomial likelihood> is
$$
L(p;y)=\frac{n!}{\prod_jy_j!}\prod_jp_j^{y_j},\qquad p_j\geq0,\quad\sum_jp_j=1.
$$
Use $0^0=1$ for zero-count factors. For $n>0$, its <maximum-likelihood estimator> on the closed <probability simplex> is $\widehat p_j=y_j/n$. Maximizing $\sum_jy_j\log p_j$ under the sum constraint gives this result; an observed zero category has fitted <probability> zero. If strict positivity is required for every $p_j$, a zero observed count can place the optimum on an excluded boundary, yielding a supremum rather than an attained maximum.

For counts $(3,1,0)$ the fitted <probabilities> are $(3/4,1/4,0)$. The corresponding likelihood is $4(3/4)^3(1/4)=27/64$. When $n=0$, every count is zero and the likelihood is identically one for every allowed <probability vector>. There is then no unique fitted <vector>, and the formula $y_j/n$ is undefined. The fixed-total sampling experiment differs from <independent> <Poisson distribution> cell sampling, although the <Poisson trick> connects their likelihoods under appropriate nuisance-rate treatment.