• Home
  • Textbooks
  • Business Analytics
  • Time Series Analysis and Forecasting

Business Analytics

Jeffrey D. Camm, James J. Cochran, Michael J. Fry, Jeffrey W. Ohlmann

Chapter 9

Time Series Analysis and Forecasting - all with Video Answers

Educators


Chapter Questions

Problem 1

Measuring the Forecast Accuracy of the Naïve Method. Consider the following time series data:
$$
\begin{array}{l|rrrrrr}
\text { Week } & 1 & 2 & 3 & 4 & 5 & 6 \\
\hline \text { Value } & 18 & 13 & 16 & 11 & 17 & 14
\end{array}
$$
Using the naïve method (most recent value) as the forecast for the next week, compute each of the following.
a. Mean absolute error
b. Mean squared error
c. Mean absolute percentage error
d. Forecast for week 7

Check back soon!

Problem 2

Refer to the time series data in Problem 1. Using the average of all the historical data as a forecast for the next period, compute the following. LO 1, 4
a. Mean absolute error
b. Mean squared error
c. Mean absolute percentage error
d. Forecast for week 7

Check back soon!

Problem 3

Comparing the Forecast Accuracy of the Naïve Method and the Average of All Historical Data. Problems 1 and 2 used different forecasting methods. Which method appears to provide the more accurate forecasts for the historical data? Explain.

Check back soon!

Problem 4

Consider the following time series data. LO 1, 2, 4
$$
\begin{array}{l|rrrrrrr}
\text { Month } & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
\hline \text { Value } & 24 & 13 & 20 & 12 & 19 & 23 & 15
\end{array}
$$
a. Compute MSE using the most recent value as the forecast for the next period. What is the forecast for month 8 ?
b. Compute MSE using the average of all the data available as the forecast for the next period. What is the forecast for month 8 ?
c. Which method appears to provide the better forecast?

Check back soon!

Problem 5

Consider the following time series data. LO 1, 2, 3, 5
$$
\begin{array}{l|rrrrrr}
\text { Week } & 1 & 2 & 3 & 4 & 5 & 6 \\
\hline \text { Value } & 18 & 13 & 16 & 11 & 17 & 14
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Develop a three-week moving average for this time series. Compute MSE and a forecast for week 7 .
c. Use $\alpha=0.2$ to compute the exponential smoothing values for the time series. Compute MSE and a forecast for week 7.
d. Compare the three-week moving average forecast with the exponential smoothing forecast using $\alpha=0.2$. Which appears to provide the better forecast based on MSE? Explain.
e. Use trial and error to find a value of the exponential smoothing coefficient $\alpha$ that results in a smaller MSE than what you calculated for $\alpha=0.2$.

Check back soon!

Problem 6

Consider the following time series data. LO 1, 2, 3, 5
$$
\begin{array}{l|rrrrrrr}
\text { Week } & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
\hline \text { Value } & 24 & 13 & 20 & 12 & 19 & 23 & 15
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Develop a three-week moving average for this time series. Compute MSE and a forecast for week 8 .
c. Use $\alpha=0.2$ to compute the exponential smoothing values for the time series. Compute MSE and a forecast for week 8 .
d. Compare the three-week moving average forecast with the exponential smoothing forecast using $\alpha=0.2$. Which appears to provide the better forecast based on MSE?
e. Use trial and error to find a value of the exponential smoothing coefficient $\alpha$ that results in a smaller MSE than what you calculated for $\alpha=0.2$.

Check back soon!

Problem 7

Refer to the gasoline sales time series data in Table 9.1.
a. Compute four-week and five-week moving averages for the time series.
b. Compute the MSE for the four-week and five-week moving average forecasts.
c. What appears to be the best number of weeks of past data (three, four, or five) to use in the moving average computation? Recall that the MSE for the three-week moving average is 10.22 .

Check back soon!

Problem 8

With the gasoline time series data from Table 9.1, show the exponential smoothing forecasts using $\alpha=0.1$. LO 1, 2
a. Applying the MSE measure of forecast accuracy, would you prefer a smoothing constant of $\alpha=0.1$ or $\alpha=0.2$ for the gasoline sales time series?
b. Are the results the same if you apply MAE as the measure of accuracy?
c. What are the results if MAPE is used?

Check back soon!

Problem 9

Comparing Gasoline Sales Forecasts with Moving Averages and Exponential Smoothing. With a smoothing constant of $\alpha=0.2$, equation (9.7) shows that the forecast for week 13 of the gasoline sales data from Table 9.1 is given by $\hat{y}_{13}=0.2 y_{12}+0.8 \hat{y}_{12}$. However, the forecast for week 12 is given by $\hat{y}_{12}=0.2 y_{11}+0.8 \hat{y}_{11}$. Thus, we could combine these two results to show that the forecast for week 13 can be written as
$$
\hat{y}_{13}=0.2 y_{12}+0.8\left(0.2 y_{11}+0.8 \hat{y}_{11}\right)=0.2 y_{12}+0.16 y_{11}+0.64 \hat{y}_{11}
$$

Use this equation to answer the following questions. LO 5
a. Making use of the fact that $\hat{y}_{11}=0.2 y_{10}+0.8 \hat{y}_{10}$ (and similarly for $\hat{y}_{10}$ and $\hat{y}_9$ ), continue to expand the expression for $\hat{y}_{13}$ until it is written in terms of the past data values $y_{12}, y_{11}, y_{10}, y_9, y_8$, and the forecast for period $8, \hat{y}_8$.
b. Refer to the coefficients or weights for the past values $y_{12}, y_{11}, y_{10}, y_9$, and $y_8$. What observation can you make about how exponential smoothing weights past data values in arriving at new forecasts? Compare this weighting pattern with the weighting pattern of the moving averages method.

Check back soon!

Problem 10

Demand for Dairy Products. United Dairies, Inc. supplies milk to several independent grocers throughout Dade County, Florida. Managers at United Dairies want to develop a forecast of the number of half gallons of milk sold per week. Sales data for the past 24 weeks are as follows.
$$
\begin{array}{cccc}
\text { Week } & \text { Sales } & \text { Week } & \text { Sales } \\
1 & 2,750 & 13 & 3,150 \\
2 & 3,100 & 14 & 3,520 \\
3 & 3,250 & 15 & 3,640 \\
4 & 2,800 & 16 & 3,190 \\
5 & 2,900 & 17 & 3,310 \\
6 & 3,050 & 18 & 3,450 \\
7 & 3,300 & 19 & 3,700 \\
8 & 3,100 & 20 & 3,490 \\
9 & 2,950 & 21 & 3,350 \\
10 & 3,000 & 22 & 3,380 \\
11 & 3,200 & 23 & 3,600 \\
12 & 3,150 & 24 & 3,540
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use exponential smoothing with $\alpha=0.4$ to develop a forecast of demand for week 25. What is the resulting MSE?

Check back soon!
01:16

Problem 11

On-Time Shipments. For the Hawkins Company, the monthly percentages of all shipments received on time over the past 12 months are $80,82,84,83,83,84,85,84,82$, 83,84 , and 83 .
a. Construct a time series plot. What type of pattern exists in the data?
b. Compare a three-month moving average forecast with an exponential smoothing forecast for $\alpha=0.2$. Which provides the better forecasts using MSE as the measure of model accuracy?
c. What is the forecast for the next month?

Nick Johnson
Nick Johnson
Numerade Educator

Problem 12

Corporate triple-A bond interest rates for 12 consecutive months are as follows. LO $1,2,3,5$
$$
\begin{array}{llllllllllll}
9.5 & 9.3 & 9.4 & 9.6 & 9.8 & 9.7 & 9.8 & 10.5 & 9.9 & 9.7 & 9.6 & 9.6
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Develop three-month and four-month moving averages for this time series. Does the three-month or the four-month moving average provide the better forecasts based on MSE? Explain.
c. What is the moving average forecast for the next month?

Check back soon!

Problem 13

The values of Alabama building contracts (in millions of dollars) for a 12-month period are as follows.
$$
\begin{array}{llllllllllll}
240 & 350 & 230 & 260 & 280 & 320 & 220 & 310 & 240 & 310 & 240 & 230
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Compare a three-month moving average forecast with an exponential smoothing forecast. Use $\alpha=0.2$. Which provides the better forecasts based on MSE?
c. What is the forecast for the next month using exponential smoothing with $\alpha=0.2$ ?

Check back soon!

Problem 14

The following time series shows the sales of a particular product over the past 12 months. LO $1,2,3,5$
$$
\begin{array}{cccc}
\text { Month } & \text { Sales } & \text { Month } & \text { Sales } \\
1 & 105 & 7 & 145 \\
2 & 135 & 8 & 140 \\
3 & 120 & 9 & 100 \\
4 & 105 & 10 & 80 \\
5 & 90 & 11 & 100 \\
6 & 120 & 12 & 110
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use $\alpha=0.3$ to compute the exponential smoothing values for the time series.
c. Use trial and error to find a value of the exponential smoothing coefficient $\alpha$ that results in a relatively small MSE.

Check back soon!

Problem 15

Twenty weeks of data on the Commodity Futures Index are as follows. LO $1,2,3,5$
$\begin{array}{llllllllll}7.35 & 7.40 & 7.55 & 7.56 & 7.60 & 7.52 & 7.52 & 7.70 & 7.62 & 7.55 \\ 7.51 & 7.68 & 7.85 & 7.72 & 7.85 & 7.73 & 7.76 & 7.86 & 7.81 & 7.64\end{array}$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use trial and error to find a value of the exponential smoothing coefficient $\alpha$ that results in a relatively small MSE.

Check back soon!

Problem 16

The following table reports the percentage of stocks in a portfolio for nine quarters. LO $1,2,3,5$
$$
\begin{array}{cc}
\text { Quarter } & \text { Stock (\%) } \\
\text { Year 1, Quarter 1 } & 29.8 \\
\text { Year 1, Quarter 2 } & 31.0 \\
\text { Year 1, Quarter 3 } & 29.9 \\
\text { Year 1, Quarter 4 } & 30.1 \\
\text { Year 2, Quarter 1 } & 32.2 \\
\text { Year 2, Quarter 2 } & 31.5 \\
\text { Year 2, Quarter 3 } & 32.0 \\
\text { Year 2, Quarter 4 } & 31.9 \\
\text { Year 3, Quarter 1 } & 30.0
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use trial and error to find a value of the exponential smoothing coefficient $\alpha$ that results in a relatively small MSE.
c. Using the exponential smoothing model you developed in part (b), what is the forecast of the percentage of stocks in a typical portfolio for the second quarter of year 3 ?

Check back soon!

Problem 17

Using Linear Regression for Forecasting with Twenty-Five Time Periods of Data. Consider the following time series. LO 1, 3, 6
$$
\begin{array}{rrrrrrrrrr}
\mathbf{t} & \boldsymbol{y}_{\mathbf{t}} & \mathbf{t} & \boldsymbol{y}_{\mathbf{t}} & \boldsymbol{t} & \boldsymbol{y}_{\mathbf{t}} & \boldsymbol{t} & \boldsymbol{y}_{\mathbf{t}} & \boldsymbol{t} & \boldsymbol{y}_{\mathbf{t}} \\
1 & 6 & 6 & 19 & 11 & 28 & 16 & 38 & 21 & 49 \\
2 & 11 & 7 & 19 & 12 & 29 & 17 & 39 & 22 & 50 \\
3 & 9 & 8 & 22 & 13 & 31 & 18 & 43 & 23 & 52 \\
4 & 14 & 9 & 24 & 14 & 34 & 19 & 44 & 24 & 55 \\
5 & 15 & 10 & 24 & 15 & 36 & 20 & 45 & 25 & 58
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.
c. What is the forecast for $t=26$ ?

Check back soon!

Problem 18

Using Linear Regression for Forecasting with Twenty-Eight Time Periods of Data. Consider the following time series. LO 1, 3, 6
$$
\begin{array}{rrrrrrrr}
\boldsymbol{t} & \boldsymbol{y}_{\mathbf{t}} & \boldsymbol{t} & \boldsymbol{y}_{\boldsymbol{t}} & \boldsymbol{t} & \boldsymbol{y}_{\boldsymbol{t}} & \boldsymbol{t} & \boldsymbol{y}_{\boldsymbol{t}} \\
1 & 120 & 8 & 82 & 15 & 48 & 22 & 11 \\
2 & 110 & 9 & 76 & 16 & 43 & 23 & 5 \\
3 & 100 & 10 & 66 & 17 & 39 & 24 & -1 \\
4 & 96 & 11 & 67 & 18 & 29 & 25 & -2 \\
5 & 94 & 12 & 61 & 19 & 25 & 26 & -6 \\
6 & 92 & 13 & 53 & 20 & 24 & 27 & -11 \\
7 & 88 & 14 & 50 & 21 & 15 & 28 & -20
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.
c. What is the forecast for $t=29$ ?

Check back soon!
01:33

Problem 19

Because of high tuition costs at state and private universities, enrollments at community colleges have increased in recent years. The following data show the enrollment for Jefferson Community College for the nine most recent years. LO $1,3,5$
$$
\begin{array}{lcc}
\text { Year } & \text { Period }(\boldsymbol{t}) & \text { Enrollment (1,000s) } \\
2015 & 1 & 6.5 \\
2016 & 2 & 8.1 \\
2017 & 3 & 8.4 \\
2018 & 4 & 10.2 \\
2019 & 5 & 12.5 \\
2020 & 6 & 13.3 \\
2021 & 7 & 13.7 \\
2022 & 8 & 17.2 \\
2023 & 9 & 18.1
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.
c. What is the forecast for year 10 ?

Nick Johnson
Nick Johnson
Numerade Educator
05:07

Problem 20

The Seneca Children's Fund (SCF) is a local charity that runs a summer camp for disadvantaged children. The fund's board of directors has been working very hard over recent years to decrease the amount of overhead expenses, a major factor in how charities are rated by independent agencies. The following data show the percentage of the money SCF has raised that was spent on administrative and fund-raising expenses over the past seven years. LO 1, 3,6
a. Construct a time series plot. What type of pattern exists in the data?
b. Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.
c. What is the forecast for year 10 ?

Bon Zapata
Bon Zapata
Numerade Educator

Problem 21

The president of a small manufacturing firm is concerned about the continual increase in manufacturing costs over the past several years. The following figures provide a time series of the quarterly cost per unit for the firm's leading product over the past eight years. LO 1, 3,6
(TABLE CAN'T COPY)
a. Construct a time series plot. What type of pattern exists in the data?
b. Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.
c. What is the average cost increase that the firm has been realizing per quarter?
d. Compute an estimate of the cost/unit for the next quarter.

Check back soon!

Problem 22

Consider the following time series. LO 1, 3, 7
$$
\begin{array}{ccccccc}
\text { Quarter } & \text { Year 1 } & \text { Year 2 } & \text { Year 3 } & \text { Year 4 } & \text { Year 5 } & \text { Year 6 } \\
1 & 71 & 68 & 62 & 67 & 71 & 64 \\
2 & 49 & 41 & 51 & 41 & 46 & 47 \\
3 & 58 & 60 & 53 & 78 & 78 & 78 \\
4 & 78 & 81 & 72 & 78 & 82 & 80
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data? Is there an indication of a seasonal pattern?
b. Use a multiple linear regression model with dummy variables as follows to develop an equation to account for seasonal effects in the data: $\mathrm{Qtr} 1=1$ if quarter 1,0 otherwise; $\mathrm{Qtr} 2=1$ if quarter 2, 0 otherwise; $\mathrm{Qtr} 3=1$ if quarter 3,0 otherwise.
c. Compute the quarterly forecasts for the next year.

Check back soon!

Problem 23

Consider the following time series data. LO 1, 2,3,7
$$
\begin{array}{cccc}
\text { Quarter } & \text { Year 1 } & \text { Year 2 } & \text { Year 3 } \\
1 & 4 & 6 & 7 \\
2 & 2 & 3 & 6 \\
3 & 3 & 5 & 6 \\
4 & 5 & 7 & 8
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use a multiple regression model with dummy variables as follows to develop an equation to account for seasonal effects in the data: $\mathrm{Qtr} 1=1$ if quarter 1,0 otherwise; Qtr2 = 1 if quarter 2, 0 otherwise; Qtr3 = 1 if quarter 3, 0 otherwise.
c. Compute the quarterly forecasts for the next year based on the model you developed in part (b).
d. Use a multiple regression model to develop an equation to account for trend and seasonal effects in the data. Use the dummy variables you developed in part (b) to capture seasonal effects and create a variable $t$ such that $t=1$ for quarter 1 in year $1, t=2$ for quarter 2 in year $1, \ldots t=12$ for quarter 4 in year 3 .
e. Compute the quarterly forecasts for the next year based on the model you developed in part (d).
f. Is the model you developed in part (b) or the model you developed in part (d) more effective? Justify your answer.

Check back soon!

Problem 24

The quarterly sales data (number of copies sold) for a college textbook over the past three years are as follows. LO 1, 2, 3, 7
$$
\begin{array}{lcccccccccccc}
\text { Year } & 1 & 1 & 1 & 1 & 2 & 2 & 2 & 2 & 3 & 3 & 3 & 3 \\
\text { Quarter } & 1 & 2 & 3 & 4 & 1 & 2 & 3 & 4 & 1 & 2 & 3 & 4 \\
\text { Sales } & 1,690 & 940 & 2,625 & 2,500 & 1,800 & 900 & 2,900 & 2,360 & 1,850 & 1,100 & 2,930 & 2,615
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use a regression model with dummy variables as follows to develop an equation to account for seasonal effects in the data: $\mathrm{Qtr} 1=1$ if quarter 1,0 otherwise; $\mathrm{Qtr} 2=1$ if quarter 2, 0 otherwise; $\mathrm{Qtr} 3=1$ if quarter 3,0 otherwise.
c. Based on the model you developed in part (b), compute the quarterly forecasts for the next year.
d. Let $t=1$ refer to the observation in quarter 1 of year $1 ; t=2$ refer to the observation in quarter 2 of year $1 ; \ldots$; and $t=12$ refer to the observation in quarter 4 of year 3. Using the dummy variables defined in part (b) and $t$, develop an equation to account for seasonal effects and any linear trend in the time series.
e. Based upon the seasonal effects in the data and linear trend, compute the quarterly forecasts for the next year.
f. Is the model you developed in part (b) or the model you developed in part (d) more effective? Justify your answer.

Check back soon!

Problem 25

Air pollution control specialists in Southern California monitor the amount of ozone, carbon dioxide, and nitrogen dioxide in the air on an hourly basis. The hourly time series data exhibit seasonality, with the levels of pollutants showing patterns that vary over the hours in the day. On July 15, 16, and 17, the following levels of nitrogen dioxide (measured in parts per billion) were observed for the 12 hours from 6:00 a.m. to $6: 00$ p.m. LO $1,2,3,7$
$$
\begin{array}{lllllllllllll}
\text { July 15 } & 25 & 28 & 35 & 50 & 60 & 60 & 40 & 35 & 30 & 25 & 25 & 20 \\
\text { July } 16 & 28 & 30 & 35 & 48 & 60 & 65 & 50 & 40 & 35 & 25 & 20 & 20 \\
\text { July 17 } & 35 & 42 & 45 & 70 & 72 & 75 & 60 & 45 & 40 & 25 & 25 & 25
\end{array}
$$
Note that when the values of the 11 dummy variables are equal to 0 , the observation corresponds to the 5:00 p.m. to 6:00 p.m. hour.
c. Using the equation developed in part (b), compute estimates of the levels of nitrogen dioxide for July 18 .
d. Let $t=1$ refer to the observation in hour 1 on July $15 ; t=2$ refer to the observation in hour 2 of July $15 ; \ldots$; and $t=36$ refer to the observation in hour 12 of July 17. Using the dummy variables defined in part (b) and $t_s$, develop an equation to account for seasonal effects and any linear trend in the time series.
e. Based on the seasonal effects in the data and linear trend estimated in part (d), compute estimates of the levels of nitrogen dioxide for July 18.
f. Is the model you developed in part (b) or the model you developed in part (d) more effective? Justify your answer.

Check back soon!

Problem 26

Sales of Docks and Seawalls. South Shore Construction builds permanent docks and seawalls along the southern shore of Long Island, New York. Although the firm has been in business for only five years, revenue has increased from $$\$ 308,000$$ in the first year of operation to $$\$ 1,084,000$$ in the most recent year. The following data show the quarterly sales revenue in thousands of dollars.
$$
\begin{array}{cccccc}
\text { Quarter } & \text { Year 1 } & \text { Year 2 } & \text { Year 3 } & \text { Year 4 } & \text { Year 5 } \\
1 & 20 & 37 & 75 & 92 & 176 \\
2 & 100 & 136 & 155 & 202 & 282 \\
3 & 175 & 245 & 326 & 384 & 445 \\
4 & 13 & 26 & 48 & 82 & 181
\end{array}
$$
a. Construct a time series plot. What type of pattern exists in the data?
b. Use a multiple regression model with dummy variables as follows to develop an equation to account for seasonal effects in the data: $\mathrm{Qtr} 1=1$ if quarter 1,0 otherwise; $\mathrm{Qtr} 2=1$ if quarter 2, 0 otherwise; $\mathrm{Qtr} 3=1$ if quarter 3,0 otherwise.
c. Based on the model you developed in part (b), compute estimates of quarterly sales for year 6 .
d. Let Period $=1$ refer to the observation in quarter 1 of year 1 ; Period $=2$ refer to the observation in quarter 2 of year $1 ; \ldots$; and Period $=20$ refer to the observation in quarter 4 of year 5 . Using the dummy variables defined in part (b) and the variable Period, develop an equation to account for seasonal effects and any linear trend in the time series.
e. Based on the seasonal effects in the data and linear trend estimated in part (c), compute estimates of quarterly sales for year 6.
f. Is the model you developed in part (b) or the model you developed in part (d) more effective? Justify your answer.

Check back soon!

Problem 27

Hogs \& Dawgs is an ice cream parlor on the border of north-central Louisiana and southern Arkansas that serves 43 flavors of ice creams, sherbets, frozen yogurts, and sorbets. During the summer Hogs \& Dawgs is open from 1:00 p.m. to 10:00 p.m. on Monday through Saturday, and the owner believes that sales change systematically from hour to hour throughout the day. The owner also believes that their sales increase as the outdoor temperature increases. Hourly sales and the outside temperature at the start of each hour for the last week are provided in the file icecreamsales.
a. Construct a time series plot of hourly sales and a scatter plot of outdoor temperature and hourly sales. What types of relationships exist in the data?
b. Use a simple regression model with outside temperature as the causal variable to develop an equation to account for the relationship between outside temperature and hourly sales in the data. Based on this model, compute an estimate of hourly sales for today from 2:00 p.m. to 3:00 p.m. if the temperature at $2: 00$ p.m. is $93^{\circ} \mathrm{F}$.
c. Use a multiple linear regression model with the causal variable outside temperature and dummy variables as follows to develop an equation to account for both seasonal effects and the relationship between outside temperature and hourly sales in the data:

Hour1 $=1$ if the sales were recorded between 1:00 p.m. and 2:00 p.m., 0 otherwise
Hour $2=1$ if the sales were recorded between 2:00 p.m. and 3:00 p.m., 0 otherwise
Hour8 $=1$ if the sales were recorded between 8:00 p.m. and 9:00 p.m., 0 otherwise
Note that when the values of the eight dummy variables are equal to 0 , the observation corresponds to the 9:00-to-10:00-p.m. hour.

Based on this model, compute an estimate of hourly sales for today from 2:00 p.m. to 3:00 p.m. if the temperature at $2: 00$ p.m. is $93^{\circ} \mathrm{F}$.
d. Is the model you developed in part (b) or the model you developed in part (c) more effective? Justify your answer.

Check back soon!

Problem 28

Donna Nickles manages a gasoline station on the corner of Bristol Avenue and Harpst Street in Arcata, California. Donna's station is a franchise, and the parent company calls the station every day at midnight to give Donna the prices for various grades of gasoline for the upcoming day. Over the past eight weeks Donna has recorded the price and sales (in gallons) of regular-grade gasoline at the station as well as the price of regular-grade gasoline charged by the competitor across the street. Donna is curious about the sensitivity of their sales to the price of regular gasoline they charge and the price of regular gasoline charged by the competitor across the street. Donna also wonders whether their sales differ systematically by day of the week and whether their station has experienced a trend in sales over the past eight weeks. The data collected by Donna for each day of the past eight weeks are provided in the file gasstation.
a. Construct a time series plot of daily sales, a scatter plot of the price Donna charges for a gallon of regular gasoline and daily sales at Donna's station, and a scatter plot of the price Donna's competitor charges for a gallon of regular gasoline and daily sales at Donna's station. What types of relationships exist in the data?
b. Use a multiple regression model with the price Donna charges for a gallon of regular gasoline and the price Donna's competitor charges for a gallon of regular gasoline as causal variables to develop an equation to account for the relationships between these prices and Donna's daily sales in the data. Based on this model, compute an estimate of sales for a day on which Donna is charging $\$ 3.50$ for a gallon of regular gasoline and Donna's competitor is charging $\$ 3.45$ for a gallon of regular gasoline.
c. Use a multiple linear regression model with the trend and dummy variables as follows to develop an equation to account for both trend and seasonal effects in the data:
$$
\begin{aligned}
& \text { Monday }=1 \text { if the sales were recorded on a Monday, } 0 \text { otherwise } \\
& \text { Tuesday }=1 \text { if the sales were recorded on a Tuesday, } 0 \text { otherwise } \\
& \vdots \\
& \text { Saturday }=1 \text { if the sales were recorded on a Saturday, } 0 \text { otherwise }
\end{aligned}
$$

Note that when the values of the six dummy variables are equal to 0 , the observation corresponds to Sunday.

Based on this model, compute an estimate of sales for Tuesday of the first week after Donna collected the data.
d. Use a multiple regression model with the price Donna charges for a gallon of regular gasoline and the price Donna's competitor charges for a gallon of regular gasoline as causal variables and the trend and dummy variables from part (c) to create an equation to account for the relationships between these prices and daily sales as well as the trend and seasonal effects in the data. Based on this model, compute an estimate of sales for Tuesday of the first week after Donna collected the data a day if Donna is charging $$\$ 3.50$$ for a gallon of regular gasoline and Donna's competitor is charging $$\$ 3.45$$ for a gallon of regular gasoline.
e. Which of the three models you developed in parts (b), (c), and (d) is most effective? Justify your answer.

Check back soon!