# In statistics, is there a formal name to the two variables of a two-dimensional contingency table?

Is there a formal terminology for the variable in the columns and for the variable in the rows?

## 1 Answer

The names row variable and column variable work fine for me, if indeed names are needed at all. It is perhaps more common, and typically more helpful, to refer to the names of the variables (gender, tree species, enjoyment of movie, attitude to some proposal, or whatever). Which is presented in rows and which in columns is immaterial to the analysis of contingency tables. It's just a matter of which presentation is easier to produce and to read.

If one is a response (outcome, ...) and the other a predictor (covariate, ...) you can always say so. But often the response is the count or frequency itself, as given in the cells of the table, and the margins represent predictors.

Broadly, which variable goes in the rows and which in the columns is a matter of convenience as much as logic or even convention. It is common advice that it is easier to read down columns than to compare across rows.

In practice, however, the shape of the table can dominate decisions. For example, a 2 x 20 table (say) is usually going to be shown as 20 rows x 2 columns, regardless of the contents or meaning of the variables. That applies to displays online and to those in print. (No talk should include a 2 x 20 table....)

The question refers specifically to two-dimensional tables. There does not seem to be much agreement on, or much need for, standard terminology for third or higher dimensions of three- or higher-dimensional tables, which are often best presented otherwise in any case.

• I see your point, fair enough! Jan 16 '19 at 16:33
• +10. Nice answer, @Nick Cox. The only thing I'll add is that some fields of study have adopted, as a norm or unspoken rule, certain ways that $2\times 2$ tables should be presented within their fields in the literature. For example, in epidemiology, medicine, and public health, "Exposures" or "Risk Factors" are usually placed on the left side of the table (rows) and the Disease or Outcome is usually presented at the top of the table (columns). The same is true for some other fields, but the rows and column are completely interchangeable as you've said.. Jan 16 '19 at 16:53
• That's a good point. Feel free to edit it into my answer or to add your own. Jan 16 '19 at 17:04