Categorical data are often presented in a contingency table which tabulates the number of observations that fall into each cell of the table. Table 1 is a simple 2 x 2 contingency table that crosstabulates whether graduate school applicants were accepted or rejected and whether they were male or female. Each cell represents a joint event which is a unique combination of the categorical variables. The crosstabulation of the graduate school's decision and applicant's gender results in four possible outcomes, or joint events. For example, in Table 1, the joint event representing rejected males contains 166 observations.
Marginal events refer to the total number of observations for a category of a particular variable.
Here, the marginal event for the category female is 245. We could create a multiway contingency table by further crosstabulating the above example with four academic departments, producing a three-way contingency table with a 2 x 2 x 4 structure. One way to display such a three-way table would be as five separate gender x decision tables, one for each of four departments. Categorical data are often part of larger datasets that contain continuous variables. For example, categorical variables such as a person's sex or race might be found in a dataset that also has continuous variables for IQ and height.