# What is Odds Ratio? Odds ratio is a measure of association between two variables i.e. a measure to determine wether the presence of a variable is associated with the presence or absence of another variable. For example, we can use odds ratio to measure if an exposure like texting while driving is associated with an outcome like RTA (Road Traffic Accidents).

## How to measure odds ratio?

Where:

a = the number of exposed cases with a positive outcome (there was an exposure and the outcome was present)
b = the number of exposed cases with a negative outcome (there was an exposure but the outcome was absent)
c = the number of unexposed cases with a positive outcome (there was no exposure but the outcome was present)
d = the number of unexposed cases with a negative outcome (there was no exposure and the outcome was absent)
By filling this table, we can calculate odds ratio using the following formula

If OR = 1, this means that the exposure is not associated with the outcome
If OR = 1, this means that the exposure is associated with an increased occurrence of the outcome
If OR = 1, this means that the exposure is associated with a decreased occurrence of the outcome

## Example

Assume that we want to know if texting while driving is a risk factor in RTA. Taking a sample of 500 drivers, we found the following:

185 drivers texted while driving and had RTA (a)
23 drivers texted while driving but didn’t have RTA (b)
96 drivers didn’t text while driving but had RTA (c)
196 drivers didn’t text while driving and didn’t have RTA (d)
Plugging the numbers in the table, we get the following: By using the previous formula, we can calculate odds ratio:
OR = 185×196/23×96
OR = 16.42
Moreover, many computer programs and online calculators can give us OR without having to manually do the calculations. Here is one reliable online calculator that can be used:

https://www.medcalc.org/calc/odds_ratio.php
We can plug in the number is shown this image: The results we get include four numbers, here is the breakdown of them:

Odds ratio: 16.4221
95%CI: 9.9864 to 27.0052
Significance level: P < 0.0001
Odds ratio in this example is found to be hight (16.4221) (P<0.0001) (you can find an elaborate explanation on P value by clicking here). Having this high magnitude of odds ratio means that the association between these two variables is high i.e. texting while driving is highly associated with an increased occurrence of RTA.
95%CI (95% Confidence Interval), is a value that shows how precise OR is. The bigger the difference between the two values of 95%CI, the lower the precision of OR, and vice versa. In this example, the range (difference) between the upper limit (27.0052) and lower limit (9.9864) of 95%CI is (17.0788). If the difference was smaller, OR would be more precise.
Looking at OR and 95%CI in this example, we can conclude that texting while driving is associated with an increased occurrence of RTA.