Calculation of odds ratio/relative risk for the use of trimethoprim-sulfamethoxazole prophylaxis in cirrhosis:

Adverse event occurs
(infectious complication)
Adverse event doesn’t occur
(no infectious complication)
Totals
Exposed to the treatment
(experimental)
1
a
29
b
30
a + b
Not exposed to the treatment
(control)
9
c
21
d
30
c + d
Totals a + c
10
b + d
50
a + b + c + d
60

CER = c/(c+d)= 0.30
EER = a/(a+b)= 0.033

Control event odds = c/d
= 0.43

Experimental event odds = a/b
= 0.034

Relative risk = EER/CER
= 0.11

Relative odds = odds ratio
= (a/b)/(c/d)
= ad/bc = 0.08