You are on page 1of 20

Unit 2

Data
Manipulation
& Analysis
Data Forecasting:
Moving Average &
Linear Trendlines
Guideline
• Moving Average
• Linear Trendlines

22
Trendlines

• Time series data simply displays the same quantity measured at


different points in time.

• Moving Averages is used to understand Time Series.

• A trendline is a visual way to show how two variables relate to


each other. Trendlines often are used to represent changes in
one set of data over time, but also can represent changes in one
set of data with changes in another. Excel can overlay a trendline
on certain types of charts.

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.

• Determine the type of trendline to add. You add a trendline to a


chart to show trends in current or future data. Select one of six
types of trendlines to add to a chart. The type of data you have
determines the type of trendline to use.
44
Trendlines

• In Excel, you add a trendline to an existing Excel chart. However,


not all types of Excel charts can have a trendline added to them.
Chart types that do not examine the relationship between two
variables, such as Pie and Donut charts, which examine the
contribution of different parts to a whole, cannot include
trendlines.

• Excel allows you to add trendlines to several types of charts,


such as Unstacked 2-D Area, Bar, Column, Line, Stock, XY
(Scatter), and Bubble charts.

55
Trendlines

• To analyze a current trend, make sure you have enough data


available for the period you want to analyze. For example, two
years of annual sales totals might not provide enough data to
analyze sales performance. Five years of annual sales totals are
more likely to present a trend.

• To analyze a future trend, you use a trendline to project data


beyond the values of the data set. This process is called
forecasting. Forecasting helps predict data values that are
outside of a data set.

66
Trendlines

• The linear and Moving Average trendline are most commonly


used. Both linear and moving average trendlines assume a
linear relationship in the data.

• 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.

• Will discuss Moving Average next.

77
Trendlines- Moving Average

• Example: the following displays the time


series for quarterly revenues in millions of
dollars for Amazon.com. The data covers
the time interval from the first quarter of
1996 through the third quarter of 2009.

• We want to graphically show the upward


trend in revenues.

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.

• Moving average graphs also smooth out random variation, which


helps you get a better idea of what is going on with your data.

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

• Open the document inClassEx-movingAvg Draft, sheet 2 and


construct a four-quarter moving average trend curve for GE
company’s revenues. Describe what you learn from the trend
curve.

• Hint: you should add a column called Quarter# to show an


increasing quarter number: 1,2,3,4,5,6,7…. to be the x-axis of
the chart.

13
13
Trendlines- Linear

• A linear trendline is a best-fit straight line that is used with


simple linear data sets. Your data is linear if the pattern in its
data points resembles a line. A linear trendline usually shows
that something is increasing or decreasing at a steady rate.

• 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.

• First, insert a line chart.

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

You might also like