Question

In: Statistics and Probability

The dataset starbucks in the open intro package contains nutritional information on 77 Starbucks food items....

The dataset starbucks in the open intro package contains nutritional information on 77 Starbucks food items. Spend some time reading the help file of this dataset. For this problem, you will explore the relationship between the calories and carbohydrate grams in these items. Please complete in R Studio showing all steps.

  • Create a scatterplot of this data with calories on the x-axis and carbohydrate grams on the y-axis, and describe the relationship you see.
  • In the scatterplot you made, what is the explanatory variable? What is the response variable? Why might you want to construct the problem in this way?
  • Fit a simple linear regression to this data, with carbohydrate grams as the dependent variable and the calories as the explanatory variable. Use the lm() function.

Solutions

Expert Solution


Related Solutions

The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those receiving...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treat- ments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those...
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study....
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if Cognitive Behavioral treatment is effective in helping patients gain weight. Perform all necessary steps for...
The dataset ‘diamondpricesbyrater’ (available in Canvas) contains information on the prices of samples of diamonds rated...
The dataset ‘diamondpricesbyrater’ (available in Canvas) contains information on the prices of samples of diamonds rated by agencies IGI and by HRD. Use R to conduct a hypothesis test to determine if there is a difference in the mean price of diamonds rated by the two agencies. State your hypotheses and conclusions. diamondpricesbyrater.txt IGI HRD 823 3778 765 3432 803 3851 803 3346 705 3130 725 3995 967 3701 1050 3529 967 3667 863 3202 800 3256 842 3415 800...
The file cereal.scsv contains the nutritional information for over 70 cereals. However it's in a format...
The file cereal.scsv contains the nutritional information for over 70 cereals. However it's in a format that is rarely used (semi-colon separated values). The reason it's in this format is that a few cereals have commas in their name (e.g. Fruit & Fibre Dates, Walnuts, and Oats). There is a separate lesson on converting this data to a proper csv format. Also note that the first line identifies the column names; the second line identifies the data types for each...
McDonald's Nutrition Data We have information on nutritional content of sandwiches and similar items at McDonald’s:...
McDonald's Nutrition Data We have information on nutritional content of sandwiches and similar items at McDonald’s: Calories, grams of carbohydrates, milligrams of salt, and meat or non-meat item. a. Create a dummy variable, Meat, for meat items. b. Run a regression of Calories on Carbs, Salt and Meat. Write down the estimated regression. c. Carry out a t-test for the coefficient on Meat. Interpret the results in the context of the problem. d. Interpret the coefficient on Meat in the...
Assignment Chapter 2 The dataset below contains information on the 50 states in the US, including...
Assignment Chapter 2 The dataset below contains information on the 50 states in the US, including 2 categorical and 13 quantitative variables. In the questions that follow, I ask you to use technology to do some analysis of this dataset. What are the cases? What is the sample size? Choose one of the two categorical variables and create a frequency table and a relative frequency table of the values.. Choose one of the quantitative variables and use technology to create...
Write down all the food items you consume in one complete day. Assemble information from food...
Write down all the food items you consume in one complete day. Assemble information from food labels, menus, and dietary tables to calculate the number of grams of proteins, carbohydrates, and fats consumed. Calculate the number of Calories in each food type using 4 Cal/g for proteins and carbohydrates and 9 Cal/g for fats. Then obtain information about recommended dietary requirements for persons of your sex, age, weight, height, and level of activity from health or biology teachers or the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT