## Problem 1

Calculate the appropriate metric of interest in R (relative risk or odds ratio), then write out a sentence that describes your findings (i.e., “the risk of…” or “the odds of…”).

Imagine a study assessing the effect of alcohol use (_“heavy drinking_”) on liver disease. The researchers started with 100 liver disease patients, then identified 150 people without the disease. In the study, 75 liver disease patients reported a history of heavy drinking, while only 50 people without the disease reported a history of heavy drinking.

odd_exposed <- 75 / (100 - 75)
odd_unexposed <- 50 / (150 - 50)
odds_ratio <- odd_exposed / odd_unexposed

Based on the odds ratio, we can conclude that people who had liver diease is 6 times more likely to be a heavy drinker, in comparison to someone who is not a heavy drinker.

## Problem 2

Calculate the appropriate metric of interest in R (relative risk or odds ratio), then write out a sentence that describes your findings (i.e., “the risk of…” or “the odds of…”).

Imagine a study assessing the effect of a vegetarian diet on heart disease. The researchers identified 100 healthy vegetarians and 100 healthy meat eaters, and then followed them to see their health outcomes. In the study, 10 vegetarians experienced a heart attack, while 20 meat eaters experienced a heart attack.

risk_vegetarian <- 10/100
risk_meateater <- 20/100
relative_risk <- risk_meateater / risk_vegetarian

The risk of having a heart attack when you are a meat eater is 2 times higher than the risk for vegetarians.

## Problem 3

Calculate the appropriate metric of interest in R (relative risk or odds ratio), then write out a sentence that describes your findings (i.e., “the risk of…” or “the odds of…”).

Imagine a study assessing the effect of a bike commuting on experiencing a road traffic accident. The researchers identified 100 bike commuters and 120 bus commuters, and then followed them to see their health outcomes. In the study, 30 bike commuters experienced a road traffic accident, while 10 bus riders experienced a road traffic accident.

risk_bikers <- 30/100
risk_bussers <- 10/120
relative_risk <- risk_bikers / risk_bussers

The risk of getting into a traffic accident when you are biking is 3.6 times higher than the risk for the bussers.

## Problem 4

Calculate the appropriate metric of interest in R (relative risk or odds ratio), then write out a sentence that describes your findings (i.e., “the risk of…” or “the odds of…”).

Imagine a study assessing the effect of drinking seltzer water on developing cavities. The researchers started with 300 people with cavities, then identified 250 people without cavities. In the study, 80 people with cavities reported being seltzer water, while 70 people without cavities reported being seltzer drinkers.

odd_cavities <- 80 / (300 - 80)
odd_uncav <- 70 / (250 - 70)
odd_ratios <- odd_cavities / odd_uncav

Based on the odds ratio, we can conclude that the odds of getting cavities, given that you are a seltzer water drinker is 0.9350649 times higher than those who are not seltzer water drinker.