Website FiveThirtyEight published an article, https://fivethirtyeight.com/features/how-americans-like-their-steak/ about how Americans like to eat their steak. The article looked if risk-averse people like their steak well done, yet the author of the article was unable to find a correlation.
library(RCurl)
steakSurveyRawData <- getURL("https://raw.githubusercontent.com/fivethirtyeight/data/master/steak-survey/steak-risk-survey.csv")
steakSurveyFile <- data.frame(read.csv(text = steakSurveyRawData, header=TRUE))
Renaming column names to make it more legible.
colnames(steakSurveyFile) <- c("ID", "Lottery", "Smoke", "Alcohol", "Gamble", "Skydive", "Speed", "Cheat", "Eat Steak", "How Prepared", "Gender", "Age", "Income", "Education", "Region")
Removing columns and row to focus the data.
steakSurveyReduced <- data.frame(steakSurveyFile$ID, steakSurveyFile$"Eat Steak", steakSurveyFile$"How Prepared", steakSurveyFile$Cheat, steakSurveyFile$Skydive)
steakSurveyReduced2 <- steakSurveyReduced[2:551, ] # Removed row 1 which had bad data
colnames(steakSurveyReduced2) <-c("ID", "Eat Steak", "How Prepared", "Cheat on Spouse", "Skydive")
Seeing how many eat steak.
summary(steakSurveyReduced2$"Eat Steak")
## No Response Yes
## 11 109 0 430
Finding out how people like it prepared.
summary(steakSurveyReduced2$"How Preparred")
## Length Class Mode
## 0 NULL NULL
The survey data showed that 109 People didn’t eat steak while 430 people did eat stak. 166 people liked their steak prepared medium rate while only 23 like it rare. I would like to revisit the study and compare it to people who like fish and see if people like their fish and steak prepared the same way.
summary(steakSurveyReduced2)
## ID Eat Steak How Prepared Cheat on Spouse
## Min. :3.235e+09 : 11 :118 : 11
## 1st Qu.:3.235e+09 No :109 Medium :132 No :447
## Median :3.235e+09 Response: 0 Medium rare:166 Response: 0
## Mean :3.235e+09 Yes :430 Medium Well: 75 Yes : 92
## 3rd Qu.:3.235e+09 Rare : 23
## Max. :3.238e+09 Response : 0
## Well : 36
## Skydive
## : 12
## No :502
## Response: 0
## Yes : 36
##
##
##