# How to Calculate Odds Ratio in Excel

## How to Calculate Odds Ratio and Relative Risk in Excel

We often use the**odds ratio**other**relative risk**when performing an analysis on a 2-by-2 table, which takes on the following format:

The **odds ratio**tells us the ratio of the odds of an event occurring in a treatment group to the odds of an event occurring in a control group. It is calculated as:

**Odds ratio**= (A * D) / (B * C)

The**relative risk**tells us the ratio of the probability of an event occurring in a treatment group to the probability of an event occurring in a control group. It is calculated as:

**Relative risk**= [A / (A + B)] / [C / (C + D)]

This tutorial explains how to calculate odds ratios and relative risk in Excel.

**How to Calculate the Odds Ratio and Relative Risk**

Suppose 50 basketball players use a new training program and 50 players use an old training program. At the end of the program we test each player to see if they pass a certain skills test. The following table shows the number of players who passed and failed, based on the program they used:

The **odds ratio**is calculated as (34 * 11) / (16 * 39) =**0.599**

We would interpret this to mean that the odds that a player passes the test by using the new program are just**0.599 times the odds**that a player passes the test by using the old program. In other words, the odds that a player passes the test are actually lowered by 40.1% by using the new program.

The**relative risk**is calculated as [34 / (34 + 16)] / [39 / (39 + 11)] =**0.872**

We would interpret this to mean that the ratio of the probability of a player passing the test using the new program compared to the old program is**0.872**. Because this value is less than 1, it indicates that the probability of passing is actually lower under the new program compared to the old program.

We could also see this by directly computing the probability that a player passes under each program:

Probability of passing under new program = 34/50 =**68%**

Probability of passing under old program = 39/50 = **78%**

**How to Calculate Confidence Intervals**

Once we calculate the odds ratio and relative risk, we may also be interested in computing confidence intervals for these two metrics.

A 95% confidence interval for the **odds ratio** can be calculated using the following formula:

**95% C.I. for odds ratio** = exp (ln (OR) - 1.96 * SE (ln (OR))) to exp (ln (OR) - 1.96 * SE (ln (OR)))

where SE (ln (OR)) = √1 / A + 1 / B + 1 / C + 1 / D

The 95% C.I. for the odds ratio turns out to be **(.245, 1.467)**. The image below shows the formula we used to calculate this confidence interval:

A 95% confidence interval for the **relative risk** can be calculated using the following formula:

**95% C.I. for relative risk** = exp (ln (RR) - 1.96 * SE (ln (RR))) to exp (ln (RR) - 1.96 * SE (ln (RR)))

where SE (ln (RR)) = √1 / A + 1 / C - 1 / (A + B) - 1 / (C + D)

The 95% C.I. for the relative risk turns out to be **(.685, 1.109)**. The image below shows the formula we used to calculate this confidence interval:

- Varun Pulyani WhatsApp director
- What does Asl mean in school
- 1 pound ground beef, how many burgers
- Duphaston medicine for what
- Indian coffee house Karamchand Chowk Jabalpur card
- Who is Nicolaos Menis
- Jm vol 3 descargar whatsapp
- How to use fiasco in one sentence
- Women are strangled while drinking
- What does it mean to avoid wrecks?

- What is 3676 guidelines
- What does he mean by me?
- When someone says kick rock pictures
- Jump in the water when you're pregnant
- What does Account Holding Bank
- What happened to kc Meisterstueck Chips
- What does $ 125 million look like
- What is Dell km518
- What world records were broken in 2007
- 4 dozen is how many cookies
- What is a pdsi on erb
- How to do a crochet stitch wdcg fm
- What is the Schluempfe movie about Stephen
- How to make hand-painted tablecloths
- Doctor Who Christmas Jumper Day 2015
- What does cupcaking mean for someone
- How old is Kim Cattrall's husband
- When did the first fleet leave Portsmouth
- Who makes fullway tires
- How much memory does 16 GB iPhone hold
- Cutsik vk specs howard
- How to inject GP Helios
- Esa havela where are you now
- What is the recipient's letterhead