Two-by-two table and cross tabulation
Have you had to interpret a two-by-two table?
Two-by-two tables are often used in clinical trials to evaluate the association between
a possible risk factor, for example, exposure and the outcome of a disease.
By using this table, you can calculate the absolute risk and the odds.
It’s also possible to determine the relative risk and odds ratio, which we’ll show you
in the next steps.
First, let’s take a look at the origin of the name two-by-two table.
If you’ve watched our previous episodes on statistics, then you’re already familiar
with our fictional study investigating 100 smokers and 100 nonsmokers.
In the smokers' group, 20 developed lung cancer, and the remaining 80 smokers were unaffected.
In the nonsmoker’s group, 2 developed lung cancer and 98 remained unaffected.
The results of the study can be presented in a table with four fields, so you can see
where the 2x2 table has its name.
It’s also called a contingency table.
The total can be generated from the four fields.
The total number of smokers and nonsmokers included in the study are listed on the right,
whereas the total number of individuals with the disease are on the bottom left.
The total number of study participants with lung cancer is 22.
In the bottom right, you can also see how many individuals didn’t develop lung cancer,
which is 178.
So, how do we calculate the absolute risk and odds from this table?
To determine what the absolute risk and odds are that smokers develop lung cancer, the
only important numbers are those in the upper row.
So, you can see that there aren’t many possibilities to calculate these values.
Let's start with the absolute risk: The absolute risk of a smoker developing lung cancer can
be calculated by dividing the number of individuals with the disease by the total number of individuals.
So, 20 divided by 100.
The odds is calculated by dividing the number of individuals with the disease by the number
of individuals without the disease, which is 20 divided by 80.
We can, of course, apply this to the row of nonsmokers and also determine the absolute
risk and odds values.
In an additional step, the relative risk and odds ratio can be calculated.
For our example, the odds ratio is calculated as the odds of smokers divided by the odds
of nonsmokers.
That’s 20 to 80 divided by 2 to 98, which gives us 12.25.
There’s another way of determining the odds ratio, which we’ll now explore in further
detail.
Let’s focus on the middle section, in which we compare the odds of both groups.
It can also be represented as a fraction: 20 to 80 divided by 2 to 98.
Now, we can apply the following simple algorithm: Dividing the first fraction by the second
fraction is the same as multiplying the first fraction by the reciprocal of the second fraction.
So, we divide 20 by 80, which is then multiplied by 98 to 2.
The odds ratio is usually calculated using this method, as the values are easily accessible
using the 2-by-2 table.
Let’s highlight this in the table.
We multiply 20 by 98 and divide it by the product of 80 and 2.
As you can see, you can also calculate the odds ratio by multiplying the opposite values
with one another, followed by dividing them.
So, you’re calculating in a crosswise manner, which is why it’s also called cross tabulation,
in short crosstab.
Through cross tabulation, we end up getting the same result, namely an odds ratio of 12.25.
The letters “a” to “d” are commonly used to label the four cells in the table
when performing calculations and to derive formulas.
Let’s use them in our example of the odds ratio.
We could also write down the calculation of the odds of smokers as a to b, and of the
nonsmokers as c to d.
The formula for the odds ratio would then be a to b divided by c to d.
This corresponds to the crosstab: a to b multiplied by d to c.
It’s important to us that you don’t just memorize these formulas, but understand what
you’re calculating by being able to derive them on your own.
For example, imagine that you’ve learned the formula for calculating the absolute risk:
a divided by a plus b, or 20 divided by 100, which equals 20%.
As is sometimes the case, a problem arises with the two-by-two table if it’s inverted.
The axes are now reversed: The smokers and nonsmokers are at the top, and individuals
with and without the disease are on the left of the table.
If you now use the same formula to calculate the absolute risk, a divided by a plus b,
or 20 divided by 20 plus 2, we would obtain a value of approximately 90%, which is incorrect.
So, we recommend that you don’t just memorize these formulas, but develop an understanding
of the individual measures that can be used to calculate these values.