Professional Documents
Culture Documents
Data
Manipulation
& Analysis
Data Forecasting:
Moving Average &
Linear Trendlines
Guideline
• Moving Average
• Linear Trendlines
22
Trendlines
33
Trendlines
You have to:
• Identify the trend or trends to analyze with a trendline. Consider
what trend you want to analyze. You typically analyze a trend in
data over a period of time. Consider which data to analyze and
which period to consider. You also should consider if the trendline
should forecast the trend into the future and if so, how far into
the future is reasonable for the forecast.
55
Trendlines
66
Trendlines
• You can use any type of trendline with any data, but you
should select the type that best fits your data and can reveal
a significant trend.
77
Trendlines- Moving Average
88
Moving Average
• To graph this time series, select the range which contains the
quarter number and Amazon quarterly revenues (in millions
of dollars). Then choose Chart on the Insert tab, and choose
the second option under the Scatter chart type. (Scatter with
Smooth Lines and Markers). The time series plot will look
like:
99
Moving Average
• There is an upward trend in revenues, but the fact that fourth quarter revenues are
different from revenues during the first three quarters of each year makes it hard to
spot the trend.
• Because there are four quarters per year, it would be nice to graph average revenues
during the last four quarters. This is called a four- period moving average. Using a four-
quarter moving average smooths out the seasonal influence because each average will
contain one data point for each 4 quarters.
• Such a graph is called a moving average graph because the plotted average “moves”
over time.
10
10
Moving Average
To create a moving average graph of quarterly revenues, you can
modify the chart
• Select the graph, and then click a data point until all the data points
are displayed in blue.
• Right-click any point, click Add Trendline, and then select the Moving
Average option.
• Set the period equal to 4. Excel now creates the four-quarter moving
average trend curve.
11
11
Moving Average
• For each quarter, Excel plots the average of the current quarter and
the last three quarters.
• For a four-quarter moving average, the moving average curve starts
with the fourth data point.
• The shown moving average curve makes it clear that Amazon.com’s
revenues had a steady upward trend. In fact the slope of the four-
quarter moving average appears to be increasing.
12
12
In-class Exercise
13
13
Trendlines- Linear
• When you add a trendline to a chart, you can set the number of
periods to forecast forward or backward in time. For example, if
you have six years of sales data, you can forecast two periods
forward to show the trend for eight years: six years of current
data and two years of projected data.
14
14
Linear Trendline
• Example: You have data for six years of total sales, use a linear
trendline to forecast sales for eight years.
15
15
Linear Trendline
• Select cells A3:G5 to select the range to be charted.
• Click Insert on the Ribbon to display the Insert tab.
• Click the Line button (Insert tab | Charts group) to display the
Line gallery.
• Click the Line with Markers chart type in the 2-D Line area of the
Line gallery to insert a 2-D line chart with data markers.
16
16
Linear Trendline
• Click the chart to select it.
• Click Layout on the Ribbon to display the Chart Tools Layout tab.
• Click the Trendline button (Chart Tools Layout tab | Analysis
group) to display the Trendline menu.
17
17
Linear Trendline
• Click the More Trendline Options command to display the
Format Trendline dialog box.
• If necessary, click the Trendline Options category in the left pane
(Format Trendline dialog box).
• If necessary, click the Linear option button in the
Trend/Regression Type area to select a linear trendline type.
• Drag to select the default value in the Forward text box in the
Forecast area.
• Type 2.0 to add a trendline to the chart with a two-period
forward forecast.
• Click the ‘Display R-squared value on chart’ check box to display
the R-squared value on the chart to help determine its reliability
18
18
Linear Trendline
19
19
Linear Trendline
20
20