Question

Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the openintro library. To access this da

0 0
Add a comment Improve this question Transcribed image text
Answer #1

library(openintro)
Bac=bac$BAC
beers=bac$Beers

#part a
fit=lm(Bac~beers)
summary(fit)

#part b
plot(beers,Bac,main="scatter plot of Beers on BAC")
abline(a=fit$coefficients[1],b=fit$coefficients[2])

#part c
#interpritaion: here intrcept is -0.0127 that means when effect of beers
#is zero then BAC will be at negative -0.0127
#here slope is 0.01796376 means, increasing of one unit in Beers
#BAC will increase 0.01796376 times.

#part d
# in Regression we ger R-squared: 0.7998,
# this means 79.98% of variablity of BAC is explained by Beers.

scatter plot of Beers on BAC 4 6 beers

Add a comment
Know the answer?
Add Answer to:
Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2) Many people believe that gender, weight, drinking habits, and many other factors are much more...

    2) Many people believe that gender, weight, drinking habits, and many other factors are much more important in predicting blood alcohol content (BAC) than simply considering the number of drinks a person consumed. Here we examine data from sixteen student volunteers at Ohio State University who each drank a randomly assigned number of cans of beer. These students were evenly divided between men and women, and they differed in weight and drinking habits. Thirty minutes later, a police officer measured...

  • Use the following to answer Questions 12-13: How well does the number of beers a student...

    Use the following to answer Questions 12-13: How well does the number of beers a student drinks predict his or her blood alcohol content? Sixteen student volunteers at The Ohio State University drank a randomly assigned number of cans of beer. Thirty minutes later, a police officer measured their blood alcohol content (BAC). A scatterplot of the data appears below: The scatterplot above shows

  • How much alcohol can one consume before one's Blood Alcohol Content (BAC) is above the legal limit? An experiment was conducted at Gallaudet University to predict Blood Alcohol Content fr...

    How much alcohol can one consume before one's Blood Alcohol Content (BAC) is above the legal limit? An experiment was conducted at Gallaudet University to predict Blood Alcohol Content from the number of beers. A total of 50 volunteer college students (some men and some women) were assigned a certain number of beers to drink and then, after a half an hour, their Blood Alcohol (BAC) level was measured. To make this assignment simpler, we will only use the first...

  • How much alcohol can one consume before one's Blood Alcohol Content (BAC) is above the legal...

    How much alcohol can one consume before one's Blood Alcohol Content (BAC) is above the legal limit? An experiment was conducted at Gallaudet University to predict Blood Alcohol Content from the number of beers. A total of 50 volunteer college students (some men and some women) were assigned a certain number of beers to drink and then, after a half an hour, their Blood Alcohol (BAC) level was measured. To make this assignment simpler, we will only use the first...

  • Many people beleve that gender weight, drinking habits, snd many other Tactors are much more important...

    Many people beleve that gender weight, drinking habits, snd many other Tactors are much more important in predidting blood slcchol content (BAC) 1hen simply considering the number of erinis a person consumec. Here we xamine data from sixteen shudent woumeers st Chio State Unhers ty who each of beer. Theee sludents were evenly divided between men ard woren, and Uhey cillered in weight and drinking tisbils. Thirky minutee laler. a polce oiver measured their bbod slootol conlent (BAC) in grams...

  • Exercise 1. For this exercise use the bdims data set from the openintro package. Type ?bdims to r...

    Exercise 1. For this exercise use the bdims data set from the openintro package. Type ?bdims to read about this data set in the help menu. Of interest are the variables hgt (height in centimeters), wgt (weight in kilograms), and sex (dummy variable with 1-male, 0-female). Since ggplotO requires that a categorical variable be coded as a factor type in R, run the following code: library (openintro) bdíms$sex2 <-factor (bdins$sex, levels-c (0,1), labels=c('F', 'M')) (a) Use ggplot2 to make a...

  • Using the t-Test Exercise Data Set Excel file, Look at the date set of Systolic Blood...

    Using the t-Test Exercise Data Set Excel file, Look at the date set of Systolic Blood Pressure Normal Weight/Systolic Blood Pressure Obese Write a null hypothesis for the comparison (use the null hypothesis template). Also, write a directional hypothesis that reflects the anticipated outcome. Conduct a t-test two-sample assuming unequal variances using Excel. Interpret the Excel result (was it significant, what was the critical t-value, what was the calculated t-value, what should be done with the null hypothesis—accept or reject)....

  • Open the "Lab Dataset" (HSCI390.sav) you have been using for lab assignments in SPSS. Your analysis...

    Open the "Lab Dataset" (HSCI390.sav) you have been using for lab assignments in SPSS. Your analysis will focus on the variables "Gender" (Gender) and "Blood Alcohol Content at last drinking episode" (BAC). Researchers are interested in examining if the mean Blood Alcohol Content at last drinking episode differs between men and women. To examine their research question of interest, they will use data from the sample of CSUN students contained in the HSCI390.sav dataset. Using SPSS for the analysis, you...

  • Use the following problem, data set, and SPSS outputs to answer questions 16-21 You conduct a...

    Use the following problem, data set, and SPSS outputs to answer questions 16-21 You conduct a study to examine whether the beverage a person drinks affects their willingness to socialize. You select 21 people at the mall and randomly give them Water, Coffee, or Gasoline. 10 minutes after they drink you ask them to rank their willingness to socialize on a scale of 1-10. You predict that compared to Water drinking Coffee will make people feel more sociable and that...

  • Use excels data analysis tool to preform a regression on the following set on numbers. Post...

    Use excels data analysis tool to preform a regression on the following set on numbers. Post your results. Then answer the following questions. A consumer Organization want to develop a regression model to predict gasoline mileage (as measured by miles per gallon) based on horsepower of the car's engine and the weight of the car, in pounds. A sample of 50 percent recent car models was selected, with the results recorded. 1. State the multiple regression equation. 2. Interpret the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT