Blood Alcohol Concentration

Azhar Kudaibergenova

2022-11-14

Blood Alcohol Concentration

(BAC) is a commonly used measure of alcohol intoxication, also known as drunkenness. It is typically expressed as a percentage of alcohol per volume of blood. For example, in the United States (US), a BAC of 0.08 (0.08%) would translate to 0.08 grams of alcohol per 100 mL of blood.

In the US, the legal limit for BAC when driving is 0.08%. Drivers who are over the age of 21 (the legal drinking age in the US), who have a BAC equal to or greater than 0.08%, can face penalties. Penalties for those under the age of 21 are stricter, but vary by state. For those under the age of 21, the legal limit ranges from 0.01% to 0.05%.

Formula 1

BAC = [Alcohol consumed in grams/ (Body weight in grams * R)]* 100

Factors in this equation

R = Gender - a constant .55 for Females .68 for Males Grams of Alcohol Consumed (Number of drinks x 14) Body weight in pounds x 454 = bodyweight in grams

Step 1. Converting body weight to GRAMS

BAC1 = BAC %>% 
  mutate(WeightG = Weight *454)

Step 2. Separating Women from Men

Women = subset(BAC1, Sex == "F")

Step 3. Calculating Women’s BAC

WomenBAC = Women %>% 
  mutate(BAC = NumberofDrinks * 14/ (WeightG * .55) *100)

Step 4. Calculating Men’s BAC

Men = BAC1 %>%
  filter(Sex == "M")
MenBAC = Men %>% 
  mutate(BAC = NumberofDrinks * 14/ (WeightG * .68) *100)

Step 5. Creating Labels based on the level of BAC if anyoneis drunk. Taking the dataset of men.

MenDrunk = MenBAC %>% mutate(BACLevel = case_when(
    between(BAC, 0.00, 0.15) ~ "Normal",
    between(BAC, 0.151, 0.25) ~ "Slightly Impaired",
    between(BAC, 0.26, 0.39) ~ "Mild Impaired",
    between(BAC, 0.40, 0.51) ~ "Life Threatening",
    TRUE ~ NA_character_
))
table(MenDrunk$BACLevel)
## 
##  Life Threatening     Mild Impaired            Normal Slightly Impaired 
##                 2                 3                 9                 6

Step 6. Calculating the levels after 8 hours.

Keep in mind that everyone metabolizes alcohol at the same rate–.015 an hour. This party lasted 8 hours.

After8 = MenDrunk %>% mutate(BAC8 = BAC - (8 * 0.015))
After8M = After8 %>% mutate(BACLevel = case_when(
    between(BAC8, 0.00, 0.15) ~ "Normal",
    between(BAC8, 0.151, 0.25) ~ "Slightly Impaired",
    between(BAC8, 0.26, 0.39) ~ "Mild Impaired",
    between(BAC8, 0.40, 0.51) ~ "Life Threatening",
    TRUE ~ NA_character_
))
table(After8M$BACLevel)
## 
##     Mild Impaired            Normal Slightly Impaired 
##                 2                11                 3

Formula 2

Calculate by Type of drink Number of oz * % of Alcohol * 0.789 = Grams of alcohol Consumed Grams of Alcohol / Weight in pounds

Let’s Calculate by type of Alcohol

Step 1. Calculating by shots

Shots = subset(BAC, Drink == "Shots") 
GramsofAC = Shots %>% mutate(GramsofAC = 1.5 * NumberofDrinks * .4 * 0.789)
ShotBAC = GramsofAC %>% mutate(BAC = GramsofAC / Weight)

Step 2. Calculating by beer

Beer = subset(BAC, Drink == "Beer") 
GramsofAC = Beer %>% mutate(GramsofAC = 12 * NumberofDrinks * .05 * 0.789)
BeerBAC = GramsofAC %>% mutate(BAC = GramsofAC / Weight)

Step 3. Calculating by wine

Wine = subset(BAC, Drink == "Wine") 
GramsofAC = Wine %>% mutate(GramsofAC = 5 * NumberofDrinks * .12 * 0.789)
WineBAC = GramsofAC %>% mutate(BAC = GramsofAC / Weight)

Step 4. Combining all Alcohol types Round to the nearest thousandth.

Total = rbind(ShotBAC,BeerBAC,WineBAC)
Total = Total %>% arrange(Student)
Total$BAC = round(Total$BAC, digits = 4)

Step 5. Creating Labels based on the level of BAC if anyoneis drunk. Taking the dataset of women.

WomenL = subset(Total, Sex == "F")
WomenL = WomenL %>% mutate(Level = case_when(
    between(BAC, 0.00, 0.0149) ~ "Normal",
    between(BAC, 0.015, 0.021) ~ "Slightly Impaired",
    between(BAC, 0.022, 0.029) ~ "Mild Impaired",
    between(BAC, 0.03, 0.051) ~ "Life Threatening",
    TRUE ~ NA_character_
))
table(WomenL$Level)
## 
##  Life Threatening     Mild Impaired            Normal Slightly Impaired 
##                 2                 1                 5                 6

Step 6. Creating Labels based on the level of BAC if anyoneis drunk. Taking the dataset of men.

MenL = subset(Total, Sex == "M")
MenL = MenL %>% mutate(Level = case_when(
    between(BAC, 0.00, 0.0157) ~ "Normal",
    between(BAC, 0.0158, 0.0189) ~ "Slightly Impaired",
    between(BAC, 0.019, 0.029) ~ "Mild Impaired",
    between(BAC, 0.03, 0.051) ~ "Life Threatening",
    TRUE ~ NA_character_
))
table(MenL$Level)
## 
##  Life Threatening     Mild Impaired            Normal Slightly Impaired 
##                 3                 5                 9                 3

Step 7. Combining Men an Woman datasets

TotalLevel = rbind(WomenL,MenL)

Making a Scatterplot of the Cleaned up data

ggplot(TotalLevel, aes(x = Weight, y = BAC, color = Sex, shape = Drink))+ 
  geom_point()

Making a Stacked Bar Graph of our data set showing Gender as fill

ggplot(TotalLevel, aes(fill = Sex, x = BAC, y = Level))+
  geom_bar(position = "stack", stat = "identity")

THE END