# Time series analysis

Data covering the most recent 30 days are given in the following table for the price per gallon of regular gasoline at a location station

Day Price Day Price

1 2.53 16 2.46

2 2.35 17 2.6

3 1.91 18 2.1

4 2.2 19 2.01

5 1.77 20 2.14

6 3.26 21 2.03

7 1.63 22 2.68

8 2.73 23 2.59

9 2.41 24 2.99

10 2.72 25 2.94

11 2.87 26 1.77

12 1.49 27 2.62

13 2.92 28 3.19

14 3.53 29 3.01

15 2.74 30 2.1

a. Compute a forecast for the next day's price by using a 3-day moving average. What is the forecast? What is the MSE for the last five observations?

b. Can you reduce the MSE for the last five observations by changing the moving average window (try 4- to 10-day windows)?

c. Compute a forecast for the next day's price by using exponential smoothing with ά=0.25. What is the forecast? What is the MSE for the last five observations?

d. Can you improve the MSE for the last five observations by changing the smoothing constant ά?

© BrainMass Inc. brainmass.com October 24, 2018, 9:51 pm ad1c9bdddfhttps://brainmass.com/statistics/time-series-analysis/time-series-analysis-139647

#### Solution Summary

This solution gives the step by step method for time series data on price per gallon of gasoline.

Regression and Time Series Analysis

The data in the table below represent the annual revenues(in billion of dollars)

of McDonald's Corporation over the 31-year period from 1975 t0 2005.

Year Coded Yr Revenues

1975 0 1

1976 1 1.2

1977 2 1.4

1978 3 1.7

1979 4 1.9

1980 5 2.2

1981 6 2.5

1982 7 2.8

1983 8 3.1

1984 9 3.4

1985 10 3.8

1986 11 4.2

1987 12 4.9

1988 13 5.6

1989 14 6.1

1990 15 6.8

1991 16 6.7

1992 17 7.1

1993 18 7.4

1994 19 8.3

1995 20 9.8

1996 21 10.7

1997 22 11.4

1998 23 12.4

1999 24 13.3

2000 25 14.2

2001 26 14.9

2002 27 15.4

2003 28 17.1

2004 29 19

2005 30 20.5

a) Calculate a three-year moving average to the data (add a column to the table)

b) Using a smoothing coefficient of W = 0.75, exponentially smooth the series

(add a column to the table, use data analysis to smooth)

c) Plot the results from a) and b) with the time series.

d) Compute a quadratic trend forecasting equation and plot the predicted result with the data against the coded years.

e) Compute an exponential trend forcasting equation and plot the predicted results with the data against the coded years.

f) Compute a second -order autoregressive model, test for the significance of the second-order

autoregressive parameter.

g) Compute a first-order autoregressive model, test for the significance of the first-oder

autoregressive parameter, and plot the predicted results with the data against the coded years.

Pr2 Simple Linear Regression.

The owner of a chain of ice cream store would like to study

the effect of atmosperic temperature on sales during the summer season.

A sample of 21 consecutive days is selected, with the results stored in the table below

Temperature, in degrees Sales, in thousand of $

63 1.52

70 1.68

73 1.8

75 2.05

80 2.36

82 2.25

85 2.68

88 2.9

90 3.14

91 3.06

92 3.24

75 1.92

98 3.4

100 3.28

92 3.17

87 2.83

84 2.58

88 2.86

80 2.26

82 2.14

76 1.98

a) Construct a scatter diagram

b) Using Data Analysis/Regression, find the regression coefficients b0 and b1.

c) Graph the regression line on the scatter diagram

d) Interpret the meaning of b0 and b1 in this problem.

e) Predict the sales per store for a day in which the temperature is 83F.

f) determine the coefficient of determination and interpret its meaning.

g) Graph the residuals in this model and determine

the adequacy of the model (linearity).

h) At the 0.05 level of significance, is there evidence

of a linear relationship between sales and temperature?

(based on t-test or p-value)

Pr3. Anova one factor

In order to test the strength of four brands of trash bags,

one-pound weights were placed into bags, one at a time

until the bag broke.

A total of 40 bags, 10 of each brand, were used. The data in the table below

gives the weight required to break the trash bag.

KROGER GLAD HEFTY TUFFSTUFF

34 32 33 26

30 42 34 18

40 34 32 20

38 36 40 15

36 32 40 20

30 40 34 20

30 36 36 17

42 43 34 18

36 30 32 19

38 38 34 20

a) Using Data analysis/Anova, test at the level of significance 0.05 for the evidence

of the differences in the mean strength of the four brands of trash bags .

b) If appropriate, determine which brands differ in mean strength

Use Turkey-Kramer procedure.

In Word:

1. The names of the coefficients in the regression equation are __________________________.

2. In the time series the independent variable is __________________________________________

3. The exponential equation in autoregression model is transformed into____________________ by using ____________function.

4. The average of odd number of values calculated for each consecutive cell is called ______________________________.

5. In the autoregressive models the independent variables are________________________________________

6. The multiple regression equation has one _________________ and several _____________________.

7. The regression line fits the points on the scatter diagram that means __________________________________________________________________________________________________

8. A column of the t-table is picked according to the __________________.

9. The symbol used for order of the autoregressive model is ________.

10. The goal of the ANOVA method is to test if ____________ among the________________ are significant.

11. The explained variation is LARGE / SMALL when coefficient of determination is close to one.

12. Periodic pattern on the time series with time period of 2 to10 years is called____________________.

13. In the autoregressive model of the third-order the number of intercepts in the equation is__________________________

14. In the simple regression method the coefficient of determination r^2 is calculated as _________________________________________________.

15. The multiple regression models can be improved by adding _____________________ term.

16. The Tukey-Kramer procedure calculates the _________________________ _____ and compares them with ______________________________________in Q tets.

17. In the ANOVA method the number of factors may be __________________________________.

18. The zero in the confidence interval for slope indicates that the relationship is STRONG / WEAK.

19. No pattern on the plot of the residuals means that the regression model is appropriate to use. TRUE /FALSE.

20. The contribution of a term to a regression model is significant if __________________ of the term is ____________________.