This is an assignment about Statistics course by using the R Studio.
R Homework for Chapter 16
The product manager at a subsidiary of Kraft Foods, Inc. is interested in learning how sensitive sales are to changes in the unit price of a frozen pizza in Dallas, Denver, Baltimore, and Chicago. The product manager has been provided data on both Price and Sales volume every fourth week over a period of nearly four years for the four cities.
You can find the data file on Blackboard. Download it and put it in the same folder as your R program file. Then, use the following command to read in the data pizza <- read.table('Frozen_Pizza.txt', sep = '\t', header = TRUE)
and answer the questions below.
1. Let’s take Sales as response variable and Price as predictor variable. Fit a linear regression model to each of the four cities. Write down the four fitted models. In which city the pizza sales seem to be more sensitive to price than in others? Explain.
2. For each of the models fitted above produce a residual plot in the time order, a residual plot against the fitted values, and a Q-Q plot. Is there any regression assumption violated in each model? Explain.
3. For the remaining questions let’s focus on the model for city Dallas. Show a 90% confidence interval for the slope of Price and interpret it. Based on the interval can we say there is a statistically significant linear relationship between Price and Sales volume? Explain.
4. Conduct a hypothesis test to see if there is a significant negative correlation between Price and Sales volume in city Dallas, i.e., test H0 : β1 = 0 vs Ha : β1 < 0. State your test conclusion.
5. For city Dallas estimate the mean Sales if the Price is $2.50 and $3.00 using 95% confidence intervals. Interpret both intervals. Can we also estimate the mean Sales if the Price is $3.50? Explain.
6. For city Dallas we know the pizza price was $2.77 in the last week of 1996. Suppose the price would increase to $2.99 in the following week. Can you predict the sales for that week and account for the uncertainty of your prediction? Do you think the resulting prediction is useful? Explain.
1