## Contingency Table | Cross Classification: Introduction

A bivariate relationship is defined by the joint distribution of the two associated random variables.

**Contingency Tables**

Let and are two categorical response variables. Let variable have levels and variable have levels. The possible combinations of classifications for both variables are . The response of a subject randomly chosen from some population has a probability distribution, which can be shown in a rectangular table having rows (for categories of ) and columns (for categories of ). The cells of this rectangular table represent the possible outcomes. Their probability (say ) denotes the probability that () falls in the cell in row and column . When these cells contain frequency counts of outcomes, the table is called contingency or cross-classification table and it is referred to as an by () table.

The probability distribution {} is the joint distribution of and . The marginal distributions are the rows and columns totals obtained by summing the joint probabilities. For the row variable () the marginal probability is denoted by and for column variable () it is denoted by , where the subscript “+” denotes the sum over the index it replaces; that is, and satisfying

Note that the marginal distributions are single-variable information, and do not pertain to association linkages between the variables.

In (many) contingency tables, one variable (say, ) is a response and the other ) is an explanatory variable. When is fixed rather than random, the notation of a joint distribution for and is no longer meaningful. However, for a fixed level of , the variable has a probability distribution. It is germane to study how this probability distribution of changes as the level of changes.