I am trying to find a general expression for the odds ratio in a two-way table. I know for a $2 \times 2$ table odds ratio can be expressed as: $${\rm OR} = \frac{\pi_{11}\pi_{22}}{\pi_{12}\pi_{21}}.$$

I am trying to find a general expression of the odds ratio for an $I \times J$ table. Is there any way to write the OR in terms of $\pi_{ij}$?


1 Answer 1


Is there any way to write the OR in terms of $\pi_{ij}$? (Emphasis added.)

There is no single odds ratio for an $I \times J$ contingency table. As Agresti says (page 54, Categorical Data Analysis, 2nd edition)

For $I \times J$ tables, it is rarely possible to summarize association by a single number without some loss of information.

For rows $a$ and $b$ and columns $c$ and $d$, you can write the odds ratio as a generalization of the $2 \times 2$ formula:

$$\frac{\pi_{ac} \pi_{bd}}{\pi_{bc} \pi_{ad}}. $$

You can describe all such odds ratios in terms of a set of $(I-1)(J-1)$ odds ratios. For me, the simplest is to set cell $IJ$ as a reference ($b=I,d=J$ in the above) for the $(I-1)(J-1)$ combinations of rows and columns not involving either row $I$ or column $J$.

There are summary single measures of association of nominal variables in $I \times J$ tables, explained for example in Sal Mangiafico's R Handbook . Cramér's V is frequently used; its Wikipedia page has links to other such measures.

  • $\begingroup$ Thanks, it was helpful. $\endgroup$
    – Dihan
    Mar 1, 2022 at 17:11
  • $\begingroup$ $OR= \frac{\pi_{00} \pi_{ij}}{\pi_{i0}\pi_{0j}}$, where $\pi_{00}$ is the reference cell, and $i=1,2, \ldots, I$, and $j=1,2, \ldots, J$. Does this make any sense? Can I write it like this? $\endgroup$
    – Dihan
    Mar 1, 2022 at 17:33
  • $\begingroup$ @Dihan close, but you have to be careful with your indexing. With your setting $\pi_{00}$ for the reference cell and with $i$ and $j$ each running from 1 to $I$ and $J$ respectively, you might seem to have an $(I+1) \times (J +1)$ contingency table. Indexing of contingency table rows and columns typically starts with 1, not 0. $\endgroup$
    – EdM
    Mar 1, 2022 at 17:54
  • $\begingroup$ Yes, I understand. I am working on a paper, in that paper, the author starts indexing from 0 instead of 1, which makes me think like this. Though I do not like to start with 0. Thanks for your feedback. $\endgroup$
    – Dihan
    Mar 1, 2022 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.