Definition: General contingency table
Definition: Let $A$ and $B$ be categorical random variables with their possible values denoted by random events $A_1, \ldots, A_k$ and $B_1, \ldots, B_l$, respectively. Then, (i) the set of relative frequencies of $A$’s and $B$’s outcomes’ occurences or (ii) the set of absolute frequencies of all combinations of $A_1, \ldots, A_k$ and $B_1, \ldots, B_l$ in a sample is referred to as a contingency table.
Observed data from a $k \times l$ contingency table are characterized as follows:
-
$y_{ij}$ for $i \in \left\lbrace 1,\ldots,k \right\rbrace$ and $j \in \left\lbrace 1,\ldots,l \right\rbrace$ is the number of cases in which $A_i$ and $B_j$;
-
$y_{i \bullet} = \sum_{j=1}^l y_{ij}$ is the (marginal total) number of cases in which $A_i$;
-
$y_{\bullet j} = \sum_{i=1}^k y_{ij}$ is the (marginal total) number of cases in which $B_j$;
-
$n = \sum_{i=1}^k \sum_{j=1}^l y_{ij}$ is the total number of cases.
The distribution underlying a $k \times l$ contingency table is characterized as follows:
-
$p_{ij}$ for $i \in \left\lbrace 1,\ldots,k \right\rbrace$ and $j \in \left\lbrace 1,\ldots,l \right\rbrace$ is the joint probability that $A_i$ and $B_j$;
-
$p_{i \bullet}$ is the marginal probability that $A_i$;
-
$p_{\bullet j}$ is the marginal probability that $B_j$;
-
$1 = \sum_{i=1}^k \sum_{j=1}^l p_{ij}$ is the probability of the sample space.
- Wikipedia (2026): "Contingency table"; in: Wikipedia, the free encyclopedia, retrieved on 2026-09-18; URL: https://en.wikipedia.org/wiki/Contingency_table#Example.
Metadata: ID: D242 | shortcut: ct | author: JoramSoch | date: 2026-09-18, 09:51.