Multinomial aggregation (source code)

= Multinomial aggregation
{title2=$M_j=\sum_{i\in G_j}N_i,\quad q_j=\sum_{i\in G_j}p_i$}

If $(N_1,\ldots,N_k)$ has a <multinomial distribution> with $n$ trials, group its categories into disjoint nonempty <sets> $G_1,\ldots,G_m$ covering all categories. The grouped counts in the displayed equation have the <multinomial distribution>
$$
(M_1,\ldots,M_m)\sim\operatorname{Mult}(n;q_1,\ldots,q_m).
$$
Each original trial belongs to exactly one group, its group <probability> is the sum of its category <probabilities>, and grouping preserves <independence> between trials. This gives the rule without summing the original <probability mass function> over every possible internal count pattern.

For the four-trial example with <probabilities> $(1/2,3/10,1/5)$, merge the last two categories. Their total $M=N_2+N_3$ has the <binomial distribution> $\operatorname{Bin}(4,1/2)$, so $\mathbb E M=2$ and $\operatorname{Var}(M)=1$. The same <variance> follows from the <variance of a sum>:
$$
\operatorname{Var}(N_2+N_3)=0.84+0.64+2(-0.24)=1.
$$
Ignoring the negative <covariance> would give $1.48$, although the two counts share a fixed total. <Multinomial aggregation> lets the resolution of category labels change while retaining a consistent model for the counts.