Tutorials › Statistical Theory I - Probability and Distribution Theory › Covariances Between Multinomial Cell Counts

Bernoulli and Binomial Families · Tutorial 119 of 994

Covariances Between Multinomial Cell Counts

Use trial indicators to calculate cell-count covariances and understand the competition between categories when the total number of trials is fixed.

Beginner 9 min read

What You'll Learn

  • Express each multinomial cell count as a sum of trial-level indicators.
  • Derive the variance of one cell count and the covariance of two distinct cell counts.
  • Assemble the covariance matrix and check it using the fixed-total constraint.
  • Explain the negative covariance through mutually exclusive outcomes on each trial.
  • Distinguish pairwise negative covariance from the stronger property of negative association.

Why Multinomial Counts Move Together

In a multinomial experiment, each of \(n\) independent trials produces exactly one category. If more trials fall in one category, fewer are available for the others. This built-in competition is reflected in the covariances between the cell counts: counts for distinct categories have negative covariance, except in degenerate cases where a category has probability zero.

The calculation is easiest at the trial level. An indicator records whether a particular trial produced a particular category. Indicators from different trials are independent, but indicators for different categories on the same trial cannot both equal one. Those two facts determine the covariance between the total counts.

Definition: Consider \(n\) independent categorical trials, each with \(k\) possible categories and category probabilities \(p_1,\ldots,p_k\), where \(p_j\geq 0\) and \(\sum_{j=1}^k p_j=1\). Let \(N_j\) be the number of trials in category \(j\). For trial \(r\), define \(I_{rj}=1\) if trial \(r\) produces category \(j\), and \(I_{rj}=0\) otherwise. Then \(N_j=\sum_{r=1}^n I_{rj}\).

For each trial, exactly one of \(I_{r1},\ldots,I_{rk}\) equals one. For two distinct categories \(j\) and \(\ell\), therefore, \(I_{rj}I_{r\ell}=0\) on every trial. By contrast, indicators belonging to different trials are independent. We use these facts to derive the count variances and covariances.

Variances and Pairwise Covariances

A single indicator \(I_{rj}\) is Bernoulli with success probability \(p_j\), so \(\operatorname{Var}(I_{rj})=p_j(1-p_j)\). Summing the indicators over trials gives the variance of one cell count. For two different cell counts, expand their covariance as a double sum of covariances between indicators.

Theorem: For multinomial cell counts \(N_1,\ldots,N_k\), \(\operatorname{Var}(N_j)=np_j(1-p_j)\) for each category \(j\), and \(\operatorname{Cov}(N_j,N_\ell)=-np_jp_\ell\) for distinct categories \(j\neq\ell\).

Proof. Since \(N_j=\sum_{r=1}^n I_{rj}\), bilinearity of covariance gives \[ \operatorname{Var}(N_j) =\sum_{r=1}^n\sum_{s=1}^n\operatorname{Cov}(I_{rj},I_{sj}). \] When \(r\neq s\), the indicators come from independent trials and their covariance is zero. When \(r=s\), the covariance is the variance \(p_j(1-p_j)\). There are \(n\) diagonal terms, so \[ \operatorname{Var}(N_j)=np_j(1-p_j). \]

For \(j\neq\ell\), expand the covariance in the same way: \[ \operatorname{Cov}(N_j,N_\ell) =\sum_{r=1}^n\sum_{s=1}^n\operatorname{Cov}(I_{rj},I_{s\ell}). \] If \(r\neq s\), independence of the trials makes the covariance zero. If \(r=s\), the two indicators cannot both be one, so \(E[I_{rj}I_{r\ell}]=0\). Since \(E[I_{rj}]=p_j\) and \(E[I_{r\ell}]=p_\ell\), \[ \operatorname{Cov}(I_{rj},I_{r\ell}) =E[I_{rj}I_{r\ell}]-E[I_{rj}]E[I_{r\ell}] =0-p_jp_\ell. \] There are \(n\) such same-trial terms. Hence \(\operatorname{Cov}(N_j,N_\ell)=-np_jp_\ell\). \(\square\)

The diagonal entries of the covariance matrix are variances; its off-diagonal entries are covariances between distinct cells. In particular, if both category probabilities are positive, then \(-np_jp_\ell<0\). This is the precise sense in which the counts are pairwise negatively correlated.

Worked Example: Computing One Pairwise Covariance

Suppose \(n=8\) independent trials each have three possible outcomes, and two of the categories have probabilities \(p_1=0.25\) and \(p_2=0.50\). Find the variances of \(N_1\) and \(N_2\), their covariance, and the correlation between them.

For the first count, \[ \operatorname{Var}(N_1)=8(0.25)(1-0.25)=8(0.25)(0.75)=1.5. \] For the second, \[ \operatorname{Var}(N_2)=8(0.50)(1-0.50)=8(0.50)(0.50)=2. \] The covariance is \[ \operatorname{Cov}(N_1,N_2)=-8(0.25)(0.50)=-1. \] Both variances are positive, so the correlation is defined: \[ \operatorname{Corr}(N_1,N_2) =\frac{-1}{\sqrt{(1.5)(2)}} =\frac{-1}{\sqrt{3}} \approx -0.577. \] The negative sign records the competition between these cells; the correlation is not \(-1\), because the third category can also receive trials.

The Covariance Matrix and the Fixed Total

Writing the covariances together makes the structure visible. The diagonal entries depend on the probability of each category and its complement; every off-diagonal entry is negative when both associated probabilities are positive.

Worked Example: A Three-Category Covariance Matrix

Let \(n=10\) and \((p_1,p_2,p_3)=(0.2,0.3,0.5)\). The diagonal entries are \[ \operatorname{Var}(N_1)=10(0.2)(0.8)=1.6,\quad \operatorname{Var}(N_2)=10(0.3)(0.7)=2.1,\quad \operatorname{Var}(N_3)=10(0.5)(0.5)=2.5. \] The distinct-cell covariances are \[ \operatorname{Cov}(N_1,N_2)=-10(0.2)(0.3)=-0.6, \] \[ \operatorname{Cov}(N_1,N_3)=-10(0.2)(0.5)=-1,\qquad \operatorname{Cov}(N_2,N_3)=-10(0.3)(0.5)=-1.5. \] Thus the covariance matrix is \[ \begin{pmatrix} 1.6 & -0.6 & -1\\ -0.6 & 2.1 & -1.5\\ -1 & -1.5 & 2.5 \end{pmatrix}. \] Each row sums to zero. For example, the first row gives \(1.6-0.6-1=0\). This is a necessary check: the cell counts always sum to 10, so their total has variance zero.

More generally, \(\sum_{j=1}^k N_j=n\) for every outcome of the experiment. Thus the total count is constant, not random. The covariance formulas reflect this constraint: the covariances with other cells exactly offset the variance of each cell. Indeed, for any \(j\), \[ \sum_{\ell=1}^k \operatorname{Cov}(N_j,N_\ell) =np_j(1-p_j)+\sum_{\ell\neq j}(-np_jp_\ell) =np_j(1-p_j)-np_j(1-p_j)=0, \] because \(\sum_{\ell\neq j}p_\ell=1-p_j\).

Worked Example: Two Categories Give Perfect Negative Correlation

Suppose there are only two categories, with probabilities \(p\) and \(1-p\), where \(0<p<1\). Then \(N_2=n-N_1\). The general formulas give \[ \operatorname{Var}(N_1)=np(1-p),\qquad \operatorname{Var}(N_2)=n(1-p)p=np(1-p), \] and \[ \operatorname{Cov}(N_1,N_2)=-np(1-p). \] Consequently, \[ \operatorname{Corr}(N_1,N_2) =\frac{-np(1-p)}{\sqrt{np(1-p)\,np(1-p)}}=-1. \] This agrees with the exact relation \(N_2=n-N_1\): knowing one count determines the other. With three or more categories, one cell count does not usually determine a particular other cell count, so the pairwise correlation need not be \(-1\).

Negative Covariance and Negative Association

A negative covariance says that two counts have a negative linear association, as measured by covariance. The stronger term negative association has a specific meaning: for any two disjoint groups of coordinates, increasing functions of the counts in those groups have nonpositive covariance. It is useful to distinguish the two statements; pairwise negative covariances alone do not prove negative association.

Definition: A finite random vector \(X=(X_1,\ldots,X_m)\) is negatively associated if, for every pair of disjoint index sets \(A,B\) and every coordinatewise nondecreasing functions \(g\) and \(h\) for which the expectations exist, \[ \operatorname{Cov}\bigl(g(X_A),h(X_B)\bigr)\leq 0. \] Here \(X_A\) denotes the coordinates whose indices belong to \(A\).

For multinomial counts, negative association follows from the one-category-per-trial structure, not just from the covariance formula. On one trial, take disjoint groups of categories \(A\) and \(B\). The vector of indicators in group \(A\) is either all zero or has a single one. If \(g\) is increasing, its value on this vector is \(g(0)+\sum_{j\in A}a_j I_j\), where \(a_j=g(e_j)-g(0)\geq0\). Similarly, \(h\) has the form \(h(0)+\sum_{\ell\in B}b_\ell I_\ell\), with \(b_\ell\geq0\). Since the groups are disjoint, \(I_j I_\ell=0\) for \(j\in A,\ell\in B\). Expanding the covariance therefore gives \[ \operatorname{Cov}(g(I_A),h(I_B)) =-\left(\sum_{j\in A}a_jp_j\right) \left(\sum_{\ell\in B}b_\ell p_\ell\right)\leq0. \] Thus the category-indicator vector from one trial is negatively associated.

Two standard closure facts finish the argument. Independent negatively associated vectors can be concatenated while preserving negative association: condition on the first vector, apply negative association to the disjoint coordinate groups in the second, and then apply it to the conditional expectations, which remain increasing functions of disjoint coordinate groups in the first. The law of total covariance shows that both resulting covariance terms are nonpositive. Also, applying coordinatewise increasing functions to disjoint blocks of a negatively associated vector preserves negative association, directly by composing the functions in its definition.

The trials are independent, so their indicator vectors concatenate to a negatively associated vector. Each count \(N_j\) is the sum of the indicators for category \(j\) across trials. Counts from disjoint category groups are increasing functions of disjoint blocks of these indicators. Therefore the multinomial count vector is negatively associated. This stronger conclusion explains why increasing a function of one set of cell counts tends, in the covariance sense, to oppose an increasing function of disjoint cell counts.

Common Mistakes

  • Assuming all indicator pairs are independent. Indicators from different trials are independent, but indicators for two distinct categories on the same trial are mutually exclusive. Their covariance is \(-p_jp_\ell\), not zero.
  • Using the wrong sign. For distinct cells, \(E[I_{rj}I_{r\ell}]=0\), so the covariance is \(0-p_jp_\ell\), which is negative, not positive.
  • Calling covariance and negative association the same thing. Pairwise covariance checks only pairs of counts. Negative association concerns increasing functions of any two disjoint groups. For multinomial counts the stronger property holds, but it requires more than the pairwise covariance calculation.
  • Ignoring a boundary case. If \(p_j=0\), then \(N_j=0\) with probability one, so its variance and its covariance with every other count are zero. A correlation involving this constant count is undefined because its variance is zero.
Key takeaway: Multinomial cell counts share a fixed total. Trial indicators show exactly how this constraint produces \(\operatorname{Var}(N_j)=np_j(1-p_j)\) and \(\operatorname{Cov}(N_j,N_\ell)=-np_jp_\ell\) for distinct cells. Negative association is a stronger property of the full count vector, not merely another name for negative pairwise covariance.

Check Your Understanding

Try these questions using the indicator representation and the fixed-total constraint.

  1. For distinct categories \(j\) and \(\ell\), why is \(E[I_{rj}I_{r\ell}]=0\) on the same trial?
  2. If \(n=12\), \(p_1=0.4\), and \(p_2=0.1\), calculate \(\operatorname{Var}(N_1)\) and \(\operatorname{Cov}(N_1,N_2)\).
  3. Explain why covariances between indicators from different trials contribute zero to \(\operatorname{Cov}(N_j,N_\ell)\).
  4. Why must every row sum of the multinomial covariance matrix equal zero?
  5. In your own words, distinguish negative pairwise covariance from negative association.