Top Banner
IJSTE - International Journal of Science Technology & Engineering | Volume 2 | Issue 11 | May 2016 ISSN (online): 2349-784X All rights reserved by www.ijste.org 599 Analysis of Bubble Deck Slab Design by Finite Element Method Mrinank Pandey Manjesh Srivastava Department of Civil Engineering Department of Civil Engineering Madan Mohan Malaviya University of Technology, Gorakhpur Madan Mohan Malaviya University of Technology, Gorakhpur Abstract Engineering use a wide range of tools and techniques to ensure that the design they create are safe. However accidents sometimes happen and when they do, companies need to know if a product failed because the design was inadequate or if there is another cause, such as a user error. But they have to ensure that the product works well under a wide range of condition, and try to avoid to the maximum a failure produced by any cause. One important tool to achieve this is the finite element method. Keywords: Bubble Deck Slab, Bridge Deck Slab, Finite Element Method ________________________________________________________________________________________________________ I. INTRODUCTION The finite element method is one of the most powerful numerical techniques ever devised for solving differential (and integral) equation of initial and boundary-value problem in geometrically complicated region” (Reddy,1988).There is some data that cannot be ignored when analyzing an element by the finite element method. This input data is to define the domain, the boundary and initial condition and also the physical properties. After knowing this data, if the analysis is done carefully, it will give the satisfactory result. It can be said that the process to do this analysis is very methodical and that it is why is so popular, because that makes it easier to apply. “The finite element analysis of a problem is so systematic that it can be divided into a set of logi cal steps that can be implemented on a digital computer and can be utilized to solve a wide range of problems by merely changing the data input to the computer program (Reddy 1988) The finite element analysis can be done for one, two and three-dimensional problems. But generally, the easier problems are those including one and two dimensions, and those can be solved without the aid of computer, because even if they give a lot of equation, if they are handled with care, an exact result can be achieved. But if the analysis requires three-dimensional tools, then it would be a lot more complicated, because it will involve a lot of equation that are very difficult to solve without having an errors. That is why engineers have developed software that can perform these analyses by computer, making everything easier. This software can make analysis of one, two and three dimensional problems with a very good accuracy. A basic thing to understand how finite element works is to know that it divides the whole element into a finite number of small elements. "The domain of the problem is viewed as a collection of nonintersecting simple sub domains, called finite element. The subdivision of a domain into elements is termed finite element discretization. The collection of the elements is called the finite element mesh of the domain." (Reddy, 1988). The advantage of dividing a big element into small ones is that it allows that every small element has a simpler shape, which leads to a good approximation for the analysis. Another advantage is that at every node (the intersection of the boundaries) arises an interplant polynomial, which allows an accurate result at a specific point. Before the finite element method, engineers and physicians used a method that involved the use of differential equations, which is known as the finite difference method. II. PRELIMINARIES In this section, we describe the design principle based on doctrine of capacity design, push over analysis and the shear strength of coupling beam in brief: The Purpose of FEA Analytical Solution 1) Stress analysis for trusses, beams, and other simple structures are carried out based on dramatic simplification and idealization. 2) Mass concentrated at the center of gravity 3) Beam simplified as a line segment (same cross-section) 4) Design is based on the calculation results of the idealized structure & a large safety factor (1.5-3) given by experience FEA 1) Design geometry is a lot more complex; and the accuracy requirement is a lot higher.
8

Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

Jun 20, 2018

Download

Documents

lekiet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

VCEcoverageArea of studyUnits 3 & 4 • Data analysis

In thisIn this chachapterpter4A Time series and trend lines4B Fitting trend lines: the

2-mean and 3-median methods

4C Least-squares trend lines4D Smoothing time series4E Smoothing with an even

number of points4F Median smoothing4G Seasonal adjustment

4

Time series

Ch 04 FM YR 12 Page 145 Friday, November 10, 2000 9:19 AM

Page 2: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

146

F u r t h e r M a t h e m a t i c s

Time series and trend lines

In previous chapters we looked at bivariate, or (

x

,

y

), data where both

x

and

y

couldvary independently. In this chapter we shall consider cases where the

x

-variable is timeand, generally, where time goes up in even increments such as hours, days, weeks oreven years. In these cases we have what is called a

time series

. The main purpose of atime series is to see how some quantity varies with time. For example, a company maywish to record its daily sales figures over a 10-day period.

We could also make a graph of thistime series as shown in the figure.

As can be seen from this graph, thereseems to be a trend upwards — clearly,this company is increasing its revenues!

Types of trend

Although many types of trend exist, inFurther Mathematics we shall belooking at trends that are classified as

secular

,

seasonal

,

cyclic

and

random

.

Secular trends

If over a reasonably long period of time a trend appears to be either increasing ordecreasing steadily, with no major changes of direction, then it is called a

secular

trend.It is important to look at the data over a long period. If the trend in the figure abovecontinued for, say, 30 days, then we could safely conclude that the company was indeedbecoming more profitable. What appears to be a steady increase over a short term —say, stock market share prices — can turn out to be something quite different over thelong run.

Seasonal trends

Certain data seem to fluctuate during the year, as the seasons change. Consequently,this is termed a

seasonal

trend. The most obvious example of a seasonal trend would bethe average monthly maximum temperatures over a year.

A sample of this type of trend isshown in the figure.

Note that the months have beencoded, so that 1

=

Jan., 2

=

Feb., andso on. From which hemisphere of theworld would these data come?

Cyclic trends

Like seasonal trends,

cyclic

trends show fluctuations upwards and downwards, but notaccording to season. Businesses often have cycles where at times profits increase, thendecline, then increase again. A good example of this would be the sales of a new majorsoftware product, such as a word processor. At first, sales are slow; then they pick up asthe product becomes popular. When enough people have bought the product, sales mayfall off until a new version of the product comes on the market, causing sales toincrease again. This cycle can be repeated many times, which is why there are manyversions of some software products.

Time

Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Day 8 Day 9 Day 10

Sales ($)

5200 5600 6100 6200 7000 7100 7500 7700 7700 8000

DaysSa

les

($)

4 000

5 000

6 000

7 0008 000

9 000

10 000

0 1 2 3 4 5 6 7 8 9 10 t

Months

Tem

p. (

°C)

14

18

22

2630

0 1 2 3 4 5 6 7 8 9 10 11 12 t

Ch 04 FM YR 12 Page 146 Friday, November 10, 2000 9:19 AM

Page 3: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s

147

Random trends

Trends may seem to occur at random. This can be caused by external events such asfloods, wars, new technologies or inventions, or anything else that results from randomcauses. There is no obvious way to predict the direction of the trend or even when itchanges direction.

In the figure, there are a couple of minor fluctu-ations at

t

=

4 and

t

=

8, and a major one at

t

=

13.The major fluctuation could have been caused by achange in government which positively affected sales.

The trend line

If we want to predict the future values of a trend, it is important to be able to fit astraight line to the data that we already have. There are a number of techniques whichcan be used to determine the trend line. As discussed in chapter 3, you could fit the line‘by eye’ or use the ‘equal number of points’ technique. In this chapter, two more math-ematical methods are shown.

Prof

its

14

18

22

2630

0 2 4 6 8 10 12 14 16 t

Fit a straight line to the following time series data, which represent the body temperature of a patient with appendicitis, taken every hour.

THINK WRITE

Attempt to fit a line using your eye.By trial and error, a line such as the one at right could be the trend line.

Evaluate the trend. It is unlikely that the temperature will continue to rise indefinitely, but the line may be significant over the short term.

Hours

Tem

p. (

°C)

30.030.531.031.532.032.533.0

0 1 2 3 4 5 6 7 8 9 10 t

1

Hours

Tem

p. (

°C)

30.030.531.031.532.032.533.0

0 1 2 3 4 5 6 7 8 9 10 t

2

1WORKEDExample

remember1. Time series are a set of measurements taken over (usually) equally spaced time

intervals, such as hourly, daily, weekly, monthly or annually.2. There are 4 basic types of trend:

(a) secular: increasing or decreasing steadily(b) seasonal: varying from season to season(c) cyclic: similar to seasonal but not tied to a calendar cycle(d) random: varying from external causes happening at random.

remember

Ch 04 FM YR 12 Page 147 Friday, November 10, 2000 9:19 AM

Page 4: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

148

F u r t h e r M a t h e m a t i c s

Time series and trend lines

For the first 5 questions, identify whether the trends are likely to be secular, seasonal,cyclic or random:

1

the amount of rainfall, per month, in Western Victoria

2

the number of soldiers in the United Statesarmy, measured annually

3

the number of people living in Australia,measured annually

4

the share price of BHP, measured monthly

5

the number of seats held by the LiberalParty in Federal Parliament

6

Fit a trend line to the data in the graph at right.

7

A wildlife park ranger is travelling on safari towards the centre of a wildlife park.Each day (

t

), he records the number of sightings (

y

) of zebra that he notes. He drawsup the following table.

Fit a trend line to the data. What type of trend is best reflected by these data?

t

1 2 3 4 5 6 7 8 9 10 11 12

y

6 9 13 8 9 14 15 17 14 11 15 19

4A

Days

Tem

p. (

°C)

10

15

20

2530

35

40

0 1 2 3 4 5 6 7 8 9 10 t

EXCEL

Spreadsheet

Trendlines

WORKEDExample

1

Mathca

d

Trendlines

Ch 04 FM YR 12 Page 148 Friday, November 10, 2000 9:19 AM

Page 5: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s

1498 The monthly share prices of a recently privatised telephone company were recorded

as follows.

Graph the data (let 1 = Jan., 2 = Feb. . . . and so on) and fit a trend line to the data. Usethis line to predict the share price in January of the following year. Comment on thefeasibility of the predicted share price.

9 Plot the following monthly sales data for umbrellas. Fit a trend line. Discuss the type of trend best reflected by the data and the limitations of your trend line.

10 Consider the data in the figure, whichrepresent the price of oranges over a19-week period.a Fit a straight trend line to the data.b Predict the price in week 25.

11 The following table represents the quarterly sales figures (in thousands) of a popularsoftware product. Plot the data and fit a trend line using the ‘equal number of points’method. Discuss the type of trend best reflected by these data.

12 The number of employees at the Comnatpac Bank was recorded over a 10-monthperiod. Plot and fit a trend line to the data. What would you say about the trend?

Date Jan. 01 Feb. 01 Mar. 01 Apr. 01 May 01 Jun. 01 Jul. 01 Aug. 01

Price ($) 2.50 2.70 3.00 3.20 3.60 3.70 3.90 4.20

Month Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Sales 5 10 15 40 70 95 100 90 60 35 20 10

Quarter Q1-96 Q2-96 Q3-96 Q4-96 Q1-97 Q2-97 Q3-97 Q4-97 Q1-98 Q2-98 Q3-98 Q4-98

Sales 120 135 150 145 140 120 100 110 120 140 190 220

Month Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Employees 6100 5700 5400 5200 4800 4400 4200 4000 3700 3300

Weeks

Pric

e (c

ents

)

20

40

60

80

100

0 5 10 15 20 25 t

Ch 04 FM YR 12 Page 149 Friday, November 10, 2000 9:19 AM

Page 6: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

150 F u r t h e r M a t h e m a t i c s

Fitting trend lines: the 2-mean and 3-median methods

As we saw in chapter 3, using our eyes to fit straight lines to a set of data is an unsatis-factory mathematical technique. In this section we shall look at two methods which aremore precise because specific mathematical processes are used to calculate theequation of the trend line. These methods are:

1. the 2-mean method2. the 3-median method.

Both methods take advantage of the fact that the independent variable, t, increasesuniformly, usually in the sequence 1, 2, 3, . . . and so on.

The 2-mean methodThis method is the simplest to use.Step 1. Divide the data into ‘lower’ and ‘upper’ halves, according to the value of t.Step 2. Compute, separately, the means of both halves, for both t and y values. Call

these means , for the lower half, and , , for the upper half.Step 3. The gradient of the line you want to fit is given by:

This is nothing more than the form for the gradient.Step 4. By transposing the linear equation, y = mx + b, the y-intercept (b) is computed

from the equation:.

tL y, L tU yU

myU yL–

tU tL–-----------------=

riserun--------

b yL m tL–=

Find the straight trend line for the following data set, using the 2-mean method.

t 1 2 3 4 5 6 7 8 9 10

y 7 9 11 13 16 18 19 20 23 27

THINK WRITE

Split the data into halves. The first half has t = 1, 2, 3, 4, 5.The second half has t = 6, 7, 8, 9, 10.There are 5 points in each group.

Calculate the means of each half.L =

= 11.2

L = = 3

U =

= 21.4

U =

= 8

1

2 y7 9 11 13 16+ + + +

5-------------------------------------------------

t1 2 3 4 5+ + + +

5----------------------------------------

y18 19 20 23 27+ + + +

5-------------------------------------------------------

t6 7 8 9 10+ + + +

5-------------------------------------------

2WORKEDExample

Ch 04 FM YR 12 Page 150 Friday, November 10, 2000 9:19 AM

Page 7: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 151

Because of the excellent fit of the equation to the data, the equation could be used topredict values of y for values of t greater than 10.

The 3-median methodAs you may recall from chapter 3, the 3-median method can be used to fit a straightline to a set of data points. Let us apply this method to the data set from workedexample 2. Recall the basic steps of the 3-median method:

Step 1. Divide the data into 3 groups: lower, middle and upper.

Step 2. Find the medians of each of the 3 groups.

Step 3. Calculate the gradient using the formula:

Step 4. Calculate y-intercept using formula b = [yL + yM + yU) − m(tL + tM + tU)]

(Note that we are using t rather than x for time series data.)

THINK WRITE

Calculate the gradient using the formula:

Calculate the y-intercept using the formula: b = 11.2 − 2.04 × 3= 5.08

State the equation of the straight line. y = mt + b = 2.04t + 5.08

Plot the data points and the fitted straight line. Note: With the equation we need only 2 points to graph the line.

When t = 0, y = 0 + 5.08 (0, 5.08)When t = 10, y = 2.08(10) + 5.08

= 25.88 (10, 25.88)

Interpret results. The line is an excellent fit to what appear to be linear data.

3

myU yL–

tU tL–-----------------=

m21.4 11.2–

8 3–---------------------------=

= 10.2

5----------

= 2.04

4

b yL m tL–=

5

6

05

10

15

20

25

30

0 2 4 6 8 10

y

t

7

myU yL–

tU tL–-----------------=

13---

Ch 04 FM YR 12 Page 151 Friday, November 10, 2000 9:19 AM

Page 8: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

152 F u r t h e r M a t h e m a t i c s

In comparing the results obtained in worked examples 2 and 3, we find that thegradients are similar (2 compared to 2.04) and the y-intercepts are also close (5.33compared to 5.08). Either line would be a satisfactory trend line.

Once you have an equation it can be used to predict or extrapolate future values aswell as interpolate values within the table. For instance, we calculated a trend line of y = 2t + 5.33. We could use this equation to find y at various values:

y(5.5) = 2(5.5) + 5.33 = 16.33 (interpolation)y(12) = 2(12) + 5.33 = 29.23 (prediction or extrapolation)

However, the further into the future you try to predict, the less likely it is that youranswer will be accurate.

Limitations to fitting trend linesIt is important to note that these techniques are limited to the case where the trend isclearly linear; they cannot be applied effectively to cyclical or seasonal trends. As anexample, consider the following data set which represents sales of swimsuits at apopular clothing store.

Find the straight trend line for the following data set, using the 3-median method.

t 1 2 3 4 5 6 7 8 9 10

y 7 9 11 13 16 18 19 20 23 27

THINK WRITE

Split the data into 3 groups. Since there are 10 points, we divide using the 3–4–3 pattern, as shown in chapter 3.

The groupings are shown as shading in the table above.

Calculate the median of each group. tL = 2; yL = 9tM = 5.5; yM = 17tU = 9; yU = 23

Calculate the gradient using the formula:

Calculate the y-intercept using the formula:

b = [(yL + yM + yU) − m(tL + tM + tU)]

b = [(9 + 17 + 23) − 2(2 + 5.5 + 9)]

= [49 − 2(16.5)]

= × 16 = 5.33

State the equation of the straight line. y = mt + b = 2t + 5.33

1

2

3

myU yL–

tU tL–-----------------=

m23 9–9 2–

---------------=

147

------=

2=

413---

13---

13---

13---

5

3WORKEDExample

Ch 04 FM YR 12 Page 152 Friday, November 10, 2000 9:19 AM

Page 9: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 153

Use a 2-mean and b 3-median methods to fit a trend line to the swimsuit data below.

2-mean method

3-median method

Month (t) Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Sales (y) 106 96 83 68 62 58 67 81 87 96 111 102

THINK WRITE

a Split the data into halves.Note 1 = Jan., 2 = Feb., . . . 12 = Dec.

a The first half has t = 1, 2, 3, 4, 5, 6.The second half has t = 7, 8, 9, 10, 11, 12.There are 6 points in each group.

Calculate the means of each half.Note: In this case, and are easily calculated.

= 90.67

= 9.5

Calculate the gradient using the

formula:

Calculate the y-intercept using the

formula: b = 78.83 − 1.97 × 3.5

= 71.94State the equation of the straight line.

y = mt + b = 1.97t + 71.94

Plot the data points and the fitted trend line.Note: The trend line is a poor predictor, due to the cyclic nature of the trend.

Month (x) 1 2 3 4 5 6 7 8 9 10 11 12

Sales (y) 106 96 83 68 62 58 67 81 87 96 111 102

1

2tL tU yL

106 96 83 68 62 58+ + + + +6

----------------------------------------------------------------------

78.83=

=

tL 3.5=

yU 67 81 87 96 111 102+ + + + +6

-------------------------------------------------------------------------=

tU

3

myU yL–

tU yL–-----------------=

m90.67 78.83–

9.5 3.5–---------------------------------=

11.846

-------------=

1.97=

4

b yL m tL–=

5

6 y

t5060708090

100110120

0 4 8 12

4WORKEDExample

Continued over page

Ch 04 FM YR 12 Page 153 Friday, November 10, 2000 9:19 AM

Page 10: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

154 F u r t h e r M a t h e m a t i c s

Note: Care must be taken when fitting trend lines. Look at the data first, and if theyhave only a secular or random trend (not cyclic or seasonal), then you can probably fita straight line using either the 2-mean or 3-median method. Which method you use isup to you — they essentially yield equally effective trend lines.

THINK WRITE

b Split the data into 3 groups. Note: Change the variable from t to x to match formulas for the 3-median method.

b The groups are shown with shading in the preceding table.

Calculate the medians of each group. When calculating medians for 4 data points, choose the two middle t-values and the two middle y-values independently (see chapter 3).

The middle two t-values in the first group are 2 and 3.The middle two y-values in this group are 83 and 96.tL = 2.5; yL = 89.5 (using 83 and 96)tM = 6.5; yM = 64.5 (using 62 and 67)tU = 10.5; yU = 99 (using 96 and 102)

Calculate the gradient using the formula:

Calculate the y-intercept using the formula:

b = [(yL + yM + yU) − m(tL + tM + tU)]

b = [(89.5 + 64.5 + 99) − 1.19(2.5 + 6.5 +

10.5)]

= [253 − 1.19(19.5)]

= × 229.795

= 76.6

State the equation of the straight line. y = mt + b = 1.19t + 76.6

Plot the data and the trend line.

Note: Although this line is slightly different from that in part a, it is no better as a predictor. No method will effectively fit a straight line when the data are not linear!

1

2

3

myU yL–

tU tL–-----------------=

m99 89.5–10.5 2.5–------------------------=

9.58

-------=

1.19=

4

13---

13---

13---

13---

5

6 y

x5060708090

100110120

0 4 8 12

Ch 04 FM YR 12 Page 154 Friday, November 10, 2000 9:19 AM

Page 11: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 155

Fitting trend lines: the 2-mean and 3-median methods

1 The following table represents the number of cars remaining to be completed on anassembly line. Fit a straight line to the following data using the 2-mean method. Put thefirst 5 points in the first half.

2 Repeat question 1, putting the first 4 points in the first half. Comment on the differencein the answers.

3 Repeat question 1 using the 3-median method and comment on the difference in thetrend line equation.

4 From the equations of the trend lines, it should be possible to predict when there are nocars left on the assembly line. This is done by finding the value of t which makes y = 0.Using the 3 equations from questions 1–3, find the times when there will be no carsleft on the assembly line.

Time (hours) 1 2 3 4 5 6 7 8 9

Cars remaining 32 26 27 23 16 17 13 10 9

remember1. The trend line is a straight line that can be used to represent the entire time

series and could be used for predicting the future values of the time series. The line can be found in several ways.(a) Fit by eye: try to fit a straight line using methods of chapter 3.(b) Calculate using the 2-mean method.

(i) Divide the time series into lower and upper halves.(ii) Compute the means of the t and y values for each half. These are

called , , for the lower half, and , , for the upper half.

(iii) Compute the gradient using the formula: .

(iv) Compute the y-intercept using the formula: b = .

(v) Write the equation of the straight line: y = mt + b.(c) Calculate using the 3-median method.

(i) Divide the data into 3 groups: lower, middle and upper.(ii) Find the median of each of the 3 groups.

(iii) Calculate the gradient using the formula: m = .

(iv) Calculate the y-intercept using the formula:

b = [(yL + yM + yU) − m(tL + tM + tU)]

(v) Write the equation of the straight line: y = mt + b.

tL yL tU yU

myU yL–

tU tL–-----------------=

yL m tL–

yU yL–

tU tL–-----------------

13---

remember

4BWORKEDExample

2 SkillSH

EET 4.1

WORKEDExample

3

EXCEL Spreadsheet

3-medianmethod

Ch 04 FM YR 12 Page 155 Friday, November 10, 2000 9:19 AM

Page 12: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

156 F u r t h e r M a t h e m a t i c s

5 When the MicroHard Company firststarted, it employed only one person.Each month the company has grown, sothat after 12 months there are 14 peopleworking there. The time series data areshown by the graph at right.a Fit a 3-median line to the data.b Predict the number of employees

after a further 12 months.

6 The table below shows the share price of MicroHard during a volatile period in thestock market. Fit:a 2-mean andb 3-median linesand comment on your result. What type of trend is this?

7 The following time series shows the number of Internet Web Sites over a 9-monthperiod. Plot the data and fit a 3-median trend line. Comment on this line as a predictorof further growth.

8 For the following 4 tables, identify the type of trend. Use the 2-mean method to calcu-late the trend line if the trend appears to be secular or random. If the trend is cyclic orseasonal, do not calculate a line.

a

b

c

d

9 Repeat question 7 using the 2-mean method. Was there much difference between the 2equations?

Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Price ($) 2.75 3.30 3.15 2.25 2.10 1.80 1.50 2.70 4.10 4.20 3.55 1.65 2.60 2.95 3.25 3.70

Time (months) 1 2 3 4 5 6 7 8 9

Sites (millions) 2.00 2.20 2.50 3.10 3.60 4.70 6.10 7.20 8.50

x 1 2 3 4 5 6 7 8 9 10

y 180 150 170 155 140 155 135 155 140 130

x 1 2 3 4 5 6 7 8 9 10

y 10 50 40 15 25 55 45 15 30 50

x 1 2 3 4 5 6 7 8 9 10

y 12 15 16 20 23 26 30 33 37 39

x 1 2 3 4 5 6 7 8 9 10

y 35 33 37 34 38 36 39 41 38 40

t

y

141210

201816

86420

0 4 8 122 6 10Months

Num

ber

of s

taff

WORKEDExample

4

EXCEL

Spreadsheet

Two-meanmethod

Ch 04 FM YR 12 Page 156 Friday, November 10, 2000 9:19 AM

Page 13: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 157

Least-squares trend linesAs we saw in chapter 3, a better technique for fitting straight lines is least squaresregression. Again, this method will be effective only if the data given are reasonablylinear, so it is a good idea to plot the data first. In fact, because we are now dealing withtime series, the linear regression can be simplified greatly. This simplification relies ona technique called centring.

Centring the time scaleWith most (if not all) time series, we are given the t data in a constant sequence, usually1, 2, 3, 4 . . . and so on. Because these data represent time and not any real set ofnumbers, it really does not matter what values we use for time — we could equally use2, 4, 6, or even −10, −9, −8. Centring involves transforming the data so that the middlerecord has a value of 0, the smaller time values are negative and the larger ones arepositive. We can then take advantage of this pattern and simplify the least-squaresregression formulas. How this is accomplished depends on whether we have an evennumber or an odd number of data points.

Centring with an odd number of pointsConsider the following table. The first row is the traditional time data 1, 2, 3, 4 . . .while the second row contains the centred data.

Note: Centring is extremely simple — find the middle time value and set it to 0, andadjust all the other points accordingly.

Centring with an even number of pointsIn this case there are only 8 points; note the difference in the centring method.

Here there are two ‘middle’ values; the larger one becomes 0.5, the smaller one −0.5.The remaining points are adjusted accordingly.

Why bother to centre the data? The reason is that the mean or average value of tcentredbecomes 0. Also note, as a check of your centring, that the sum of all the t values is 0.

Recall the regression formulas from chapter 2, where x has been replaced by t.

and

Now, if we used tcentred in place of t, then , so the formulas are simplified to:

and .

This makes the calculation of m and b extremely simple and fast, especially if youuse a calculator. Note also that neither m nor b depend upon n, the number of points.

T 1 2 3 4 5 6 7 8 9

tcentred −4 −3 −2 −1 0 1 2 3 4

T 1 2 3 4 5 6 7 8

tcentred −3.5 −2.5 −1.5 −0.5 0.5 1.5 2.5 3.5

m Σty nt y–

Σt2 nt2–------------------------= b y m t–=

t 0=

mΣtyΣt2---------= b y=

Ch 04 FM YR 12 Page 157 Friday, November 10, 2000 9:19 AM

Page 14: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

158 F u r t h e r M a t h e m a t i c s

Plotting the regression lineTo compare the equation obtained by the least-squares method with the other methodsalready discussed, we need to transform the regression line back to the original t scale.Step 1. Transform the time values from tcentred back to t.

In worked example 5 we subtracted 5.5 from each original t value to gettcentred. In other words tcentred = t − 5.5.

Step 2. Substitute into the regressionequation.In worked example 5:

y = 2.08(t − 5.5) + 16.3y = 2.08t − 11.44 + 16.3y = 2.08t + 4.86

Step 3. Plot this equation along with theoriginal time series. This equationcan be used to predict future trends.

Use the following data from worked example 3. Centre the time data where Jan. = 1, Feb. = 2, . . . , and calculate the trend line for the centred data using the least-squares method.

t 1 2 3 4 5 6 7 8 9 10

y 7 9 11 13 16 18 19 20 23 27

THINK WRITE

Centre the time data. The centred t-values are:

Compute Σt2 for m by squaring the t values.

Compute Σty for m by first writing the y-values.

Then multiply by tcentred.

Now add up row 2 and row 4.

Σt2 = 20.25 + 12.25 + 6.25 + . . . + 20.25= 82.5

Σty = −31.5 + −31.5 + −27.5 + . . . + 125.5= 171.5

Compute m and b from formulas and state the equation for the trend line.

m =

=

= b =

=

= so y = 2.08t + 16.3

1

t −4.5 −3.5 −2.5 −1.5 −0.5 0.5 1.5 2.5 3.5 4.5

t2 20.25 12.25 6.25 2.25 0.25 0.25 2.25 6.25 12.25 20.25

y 7 9 11 13 16 18 19 20 23 27

ty −31.5 −31.5 −27.5 −19.5 −8 9 28.5 50 80.5 121.5

2

3

4

5

6Σty

Σt2

--------

171.582.5

-------------

2.08y7 9 11 13 16 18 19 20 23 27+ + + + + + + + +

10---------------------------------------------------------------------------------------------------------------

16.3

5WORKEDExample

t

y302520151050

0 2 4 6 8 10

Ch 04 FM YR 12 Page 158 Friday, November 10, 2000 9:19 AM

Page 15: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 159

Can least-squares regression handle cyclic time series?Let us consider the following cyclical data of average monthly maximum temperaturesin an Australian city. To see how an odd number of points are centred, we shall look atan 11-month cycle only.

To analyse these data we use the following spreadsheet solution.

These formulas are used for the spreadsheet.

Now, look at the regression line obtained from thisspreadsheet: y = −0.491t + 21.273

To transform back to the original time scale:tcentred = t − 6y = −0.491(t − 6) + 21.273y = −0.491t + 24.22

Month Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov.

Temperature 28 26 24 21 18 16 17 18 20 21 25

Month t tcentred temp (y) t 2 tyJan.Feb.Mar.Apr.MayJun.Jul.Aug.Sep.Oct.Nov.

1234567891011

−5−4−3−2−1012345

2826242118161718202125

251694101491625

−140−104−72−42−18017366084125

Totals 234 110

mb

−54

−0.49121.273

3B C D E F G

4 Month t tcentred temp (y) t 2 ty56789101112131415161718192021

Jan.Feb.Mar.Apr.MayJun.Jul.Aug.Sep.Oct.Nov.

1234567891011

−5−4−3−2−1012345

2826242118161718202125

=D5^2=D6^2=D7^2=D8^2=D9^2=D10^2=D11^2=D12^2=D13^2=D14^2=D15^2

=D5*E5=D6*E6=D7*E7=D8*E8=D9*E9=D10*E10=D11*E11=D12*E12=D13*E13=D14*E14=D15*E15

Totals =SUM(E5:E15) =SUM(F5:F15)

mb

=SUM(G5:G15)

=G17/F17=E17/11

y

t

30

25

20

150 2 4 6 8 10 12

Ch 04 FM YR 12 Page 159 Friday, November 10, 2000 9:19 AM

Page 16: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

160 F u r t h e r M a t h e m a t i c s

This line is plotted along with the original temperature data. This equation could beused to predict future trends.

The graph demonstrates that the trend line equation would be a poor predictor. Con-sider the observation for May (t = 5). The equation would predict y = −0.491(5) + 24.22= 21.8, while the actual observation was only 18. For most months, the data points area long way from the straight line. This also indicates a poor prediction line. In fact,from chapter 3, it was found that the correlation coefficient was −0.41, which indicatesthat time (t) has only a moderately weak effect on temperature. So least squares is nobetter than the earlier methods in fitting trend lines for data that are not linear.

Least-squares trend lines

1 The Teeny-Tiny-Tot Company has started to make prams. Its sales figures for the first8 months are given in the table below.

a Centre the time data, using the sequence Jan. = 1, Feb. = 2, . . . , and calculate thetrend line for the centred data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the company’s sales for December.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

2 The sales figures of Harold Courtenay’s latest novel (in thousands of units) are givenin the table below. The book was released a week before the first figures werecollected.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the sales for weeks 10, 12 and 14.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

Date Jan. Feb. Mar. Apr. May Jun. Jul. Aug.

Sales 65 95 130 115 145 170 190 220

Time (weeks) 1 2 3 4 5 6 7 8 9

Sales (’000) 1 3 5 17 21 25 28 27 26

rememberTo use the least-squares regression technique to find a trend line:1. Centre the data so that the sum of all t values = 0. There are two methods,

depending on whether there are even or odd number of points in the time series.

2. The gradient can be calculated simply from the formula: .

3. The y-intercept can be calculated from: .

mΣty

Σt2---------=

b y=

remember

4CWORKEDExample

5

EXCEL

Spreadsheet

Leastsquarestrendlines

Ch 04 FM YR 12 Page 160 Friday, November 10, 2000 9:19 AM

Page 17: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 1613 Farmer Brown’s yield of soybeans per hectare has been monitored over the last 8 years.

By using modern farming methods she has increased her yield most years. There wasa drought in 1998, causing a bad yield. Yields are measured in tonnes per hectare.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the yield for 2001.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

4 The price of long-distance telephone calls has been changing recently. The cost of a3-minute call to Paris from Melbourne has been monitored over a 7-week period.

a Centre the time data and calculate the trend line for these data using the least- squares method.

b Plot the data points and the trend line on the same set of axes.

c Use the trend line equation to predict the next 3 data points.

d Comment on the suitability of the trend line as a predictor of future trends, supporting your arguments with mathematical statements.

Year 1993 1994 1995 1996 1997 1998 1999 2000

Yield 1.2 1.7 2.1 2.3 2.6 1.1 2.5 2.9

Time period 1 2 3 4 5 6 7

Cost ($) 4.55 4.05 3.95 3.95 3.55 3.25 2.95

Ch 04 FM YR 12 Page 161 Friday, November 10, 2000 9:19 AM

Page 18: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

162 F u r t h e r M a t h e m a t i c s

5 Since management instituted new policies, the productivity at the DROF car plant hasbeen improving slowly but steadily. The following table records the number of carsproduced each week over a 10-week period.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict car production for weeks 10, 12 and 14.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

6 The following data represent the share price for the first few days of a new softwarecompany.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the price for the next 4 days.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

7 The following table represents the daily water level in a reservoir during a drought.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the price for the next 4 days.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

8 The following table represents the height of James, measured each year.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the height for the next 4 years.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

Time (weeks) 1 2 3 4 5 6 7 8 9 10

Cars produced 650 655 670 680 685 700 705 720 730 745

Day 1 2 3 4 5 6 7 8 9

Price ($) 1.10 1.43 1.56 1.78 2.45 2.44 2.89 3.02 3.66

Day 1 2 3 4 5 6 7 8 9

Level (m) 4.3 4.1 3.8 3.4 3.1 2.8 2.7 2.4 2.2

Year 1 2 3 4 5 6 7 8 9 10 11 12

Height (cm) 43 56 63 79 83 88 92 99 105 110 118 127

Ch 04 FM YR 12 Page 162 Friday, November 10, 2000 9:19 AM

Page 19: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 1639 The average quarterly price of coffee (per 100 kg) has been recorded for 3 years.

a Centre the time data and calculate the trend line for these data using the least-squares method.

b Plot the data points and the trend line on the same set of axes.c Use the trend line equation to predict the price for the next quarter.d Comment on the suitability of the trend line as a predictor of future trends,

supporting your arguments with mathematical statements.

10 A mathematics teacher gives her stu-dents a test each month for 10months, and the class average isrecorded. These tests are carefullydesigned to be of similar difficulty.a Centre the time data and calculate

the trend line for these data usingthe least-squares method.

b Plot the data points and the trendline on the same set of axes.

c Use the trend line equation to pre-dict the results for the last exam inDecember.

d Comment on the suitability of thetrend line as a predictor of futuretrends, supporting your argumentswith mathematical statements.

11 To make an improvement on the spreadsheet given in the text on page 159, can youmodify it so that it automatically centres the t values? (Hint: If n = the number of data

points, then you need to subtract to centre values.)

Quarter Q1-96 Q2-96 Q3-96 Q4-96 Q1-97 Q2-97 Q3-97 Q4-97 Q1-98 Q2-98 Q3-98 Q4-98

Price ($) 358 323 316 336 369 333 328 351 389 387 393 402

Test Mark (%)

Feb. 57

Mar. 63

Apr. 62

May 67

Jun. 65

Jul. 68

Aug. 70

Sep. 72

Oct. 74

Nov. 77

n 1+2

------------

WorkS

HEET 4.1

Ch 04 FM YR 12 Page 163 Friday, November 10, 2000 9:19 AM

Page 20: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

164 F u r t h e r M a t h e m a t i c s

Smoothing time seriesBy now, you should appreciate the fact that fitting linear trend lines to time series thatare not really linear is both bad mathematics and bad policy — it doesn’t work! So howcan we have a method that generates trend lines for such time series? If the non-linearnature of the data is random we can use a technique called smoothing. If the non-linearnature is seasonal, we use a method called seasonal adjustment.

Moving-average smoothingThis technique relies on the principle that averages of data can be used to represent theoriginal data. When applied to time series, a number of data points are averaged, thenwe move on to another group of data points in a systematic fashion and average them,and so on. It is generally quite simple. Consider the following example:

As we use three points to average, moving along the table from left to right, this iscalled a 3-point moving average smoothing.

Note: The calculation of the t values is quite simple.

We are free to choose any number of points for our smoothed graph; we could havea 4-point smoothing, a 5-point smoothing or even an 11-point smoothing. Although it ispreferable to choose an odd number, such as 3 or 5, it is possible to choose evennumbers as well, with a slight change in the method. In either case it does not matterhow many points are in our time series.

Moving average smoothing with odd numbers of pointsAs seen above, the method for smoothing with an odd number (3, 5, . . .) is quitesimple, and can be done in a vertical tabular form. It is crucial that the time values beequally spaced, but they don’t have to be in the sequence 1, 2, 3.

Note: There are fewer smoothed points than original ones. For a 3-point smooth, 1point at either end is ‘lost’, while for a 5-point smooth 2 points at either end are ‘lost’.

Time (t) Data (y) Moving average

1 12

2 10 = 12.3

3 15 = 12.7

4 13 = 14.7

5 16 = 14.0

6 13 = 15.7

7 18 = 17.3

8 21 = 19.3

9 19

Notice how the third column iscomputed from the first two.

1. Take the first three t points (1,2, 3) and find their average(2); take the first three y pointsin the table (12, 10, 15) andfind their average (12.3).

2. Take the next three t points (2,3, 4) and find their average(3); take the next three ypoints in the table (10, 15, 13)and find their average (12.7).

3. Repeat until you reach the lastthree t points.

4. Take the last three t points (7,8, 9) and find their average(8); take the last three y pointsin the table (18, 21, 19) andfind their average (19.3).

12 10 15+ +3

------------------------------

10 15 13+ +3

------------------------------

15 13 16+ +3

------------------------------

13 16 13+ +3

------------------------------

16 13 18+ +3

------------------------------

13 18 21+ +3

------------------------------

18 21 19+ +3

------------------------------

Ch 04 FM YR 12 Page 164 Friday, November 10, 2000 9:19 AM

Page 21: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 165

The main reason for using a smoothing technique is to remove irregularities or wildvariations in our time series.

The temperature of a sick patient is measured every 2 hours and the results are recorded.a Create a 3-point moving average smoothing of the data.b Plot both original and smoothed data.c Predict the temperature for 18 hours using the last smoothed value.

Time (hours) 2 4 6 8 10 12 14 16

Temp. (°C) 36.5 37.2 36.9 37.1 37.3 37.2 37.5 37.8

THINK WRITE

a Put the data in a table. aCalculate a 3-point moving average for each data point. Note: The ‘lost’ values are at t = 2 and t = 16. Therefore, the first point plotted is (4, 36.87).

b Plot the data. The smoothed line is the thicker, red one.Note: The smoothed data start at the 2nd time point and finish at the 7th point.

b

Interpret the result. The smoothed line has removed much of the fluctuation of the original time series and, in fact, clearly exposes the secular trend (upwards) in temperature.

c Last smoothed data point is 37.50. c The temperature at 18 hours is predicted to be 37.50°.

1 Time Temp. Smoothed temp.

2 36.5

4 37.2 (36.5 + 37.2 + 36.9) = 36.87

6 36.9 (37.2 + 36.9 + 37.1) = 37.07

8 37.1 (36.9 + 37.1 + 37.3) = 37.10

10 37.3 (37.1 + 37.3 + 37.2) = 37.20

12 37.2 (37.3 + 37.2 + 37.5) = 37.33

14 37.5 (37.2 + 37.5 + 37.8) = 37.50

16 37.8

13---

13---

13---

13---

13---

13---

2

1 38

37.5

37

36.5

360 4 8 12

Number of hours

Tem

p. (

°C)

16

2

6WORKEDExample

Ch 04 FM YR 12 Page 165 Friday, November 10, 2000 9:19 AM

Page 22: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

166 F u r t h e r M a t h e m a t i c s

Prediction using moving averagesBecause the moving average does not generate a single linear equation, there arelimited possibilities for using the resultant smoothed data for prediction. However,there are two things that can be done:1. Predict the next value — use the last smoothed value to predict the next time point.

In the above example, our prediction for t = 18 would be temperature = 37.50. Thisis not necessarily an accurate prediction but it is the best we can do without a lineartrend equation.

2. Fit a single straight line to the smoothed data — using one of the 2-mean, 3-medianor least-squares techniques, one could find a single equation for the smoothed datapoints. This is often the preferred technique.

How many points should be in the moving average?When smoothing data, it is important to decide on the number of points to be used.Should a 3-point, 5-point or even an 11-point moving average be used? This is animportant but complicated question. Here are some basic hints. (Let p = 3 for 3 points,p = 5 for 5 points . . . and let n = the number of points in the time series.)1. The value of p should be considerably smaller than n. For example, if n = 7, p

should be no more than about 4.2. If there is a cyclic or seasonal variation that we want to remove, let p ≈ length of

cycle. Otherwise p should be less than the length of the cycle. However, moving-average smoothing may not be effective at removing the variation. For example, ifthere are quarterly data with seasonal variation, use p = 4.

3. It is always preferable to use an odd value of p, regardless of whether n is even orodd.

4. The larger the value of p, the smoother the trend line of the resulting data becomes.More of the fluctuations will be removed. However, you can go too far.

Moving average smoothing using a spreadsheetA spreadsheet can be devised to calculate the average data values and then the new setof smoothed points plotted on a graph. Below is the spreadsheet for worked example 6.The graph is shown in worked example 6.

Below are the formulas used. Note the row and column numbers carefully. Add ordelete rows from the middle of the sheet (around row 9) rather than at the ends. Thereis no need to calculate the first (E6) and last (E13) average, as these are the ‘lost’values. It should be clear how to turn this into a 5-point, or 7-point smooth. Whywouldn’t we go any further?

3-point

t temp. smooth

2 36.5

4 37.2 36.87

6 36.9 37.07

8 37.1 37.10

10 37.3 37.20

12 37.2 37.33

14 37.5 37.50

16 37.8

Ch 04 FM YR 12 Page 166 Friday, November 10, 2000 9:19 AM

Page 23: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s

167

Smoothing time series

1

The following table represents sales of a textbook.

a

Create a 3-point moving average of the data.

b

Plot both the original and smoothed data.

c

Predict the sales for 1998 using the last smoothed value.

2

The sales of a certain car seem to have been declining in recent months. The manage-ment wishes to find out if this is the case. Using a 3-point moving average, smooth thedata and comment on the result. Use Jan.

=

1, Feb.

=

2 . . .

B C D E F

3

4 3-point

5

t

temp. smooth

6 2 36.5

7 4 37.2 =SUM(D6:D8)/3

8 6 36.9 =SUM(D7:D9)/3

9 8 37.1 =SUM(D8:D10)/3

10 10 37.3 =SUM(D9:D11)/3

11 12 37.2 =SUM(D10:D12)/3

12 14 37.5 =SUM(D11:D13)/3

13 16 37.8

14

Year (

t

)

1990 1991 1992 1993 1994 1995 1996 1997

Sales (

y

)

2250 2600 2400 2750 2900 2450 3100 3400

Month

Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Sales

120 70 100 110 90 80 70 90 80 100 60 60

remember1. Smoothing involves replacing the original time series with another one where

most of the variation has been removed to see if there is a secular trend. Points are ‘lost’ at the start and end of the time series. Refer to the text for detailed descriptions of the techniques involved.

2. Moving average smoothing works best with an odd number of points. For a 3-point smoothing, 1 point is lost at either end of the time series.

remember

4DEXC

EL Spreadsheet

Movingaverage

WWORKEDORKEDEExamplexample

6

Ch 04 FM YR 12 Page 167 Friday, January 10, 2003 12:14 PM

Page 24: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

168 F u r t h e r M a t h e m a t i c s

3 Management is still not satisfied — perform a 5-point moving average on the datafrom question 2 and discuss the result.

4 Consider the quarterly rainfall data below. Rainfall has been measured over a 3-yearperiod. Since the data are seasonal, perform a 3-point moving average and commenton whether there is a trend other than the cyclical one.

5 The attendance at the Woop-Woop Football Club games was recorded over 10 years.Management wishes to see if there is a trend. Perform a 3-point moving average onthe data and comment on the result.

6 Use a spreadsheet solution to complete a 3-point moving average on the followingdata which represent sales figures for a 21-week period.

7 Coffee price data are reproduced below. To remove the seasonal variation, perform a3-point moving average to smooth the data. Plot the smoothed and original data andcomment on your result.

Time (t) Spring1998

Summer1998

Autumn1998

Winter1998

Spring1999

Summer1999

Autumn1999

Winter1999

Spring2000

Summer2000

Autumn2000

Winter2000

Rainfall (mm) 100 50 65 120 90 50 60 110 85 40 50 100

Year 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000

Attendance (’000) 75 72 69 74 66 72 61 64 69 65

Week SalesSmoothed

data Week SalesSmoothed

data

1 34 12 44

2 27 13 47

3 31 14 49

4 37 15 41

5 41 16 52

6 29 17 48

7 32 18 44

8 37 19 49

9 47 20 56

10 38 21 54

11 41

Quarter Q1-96 Q2-96 Q3-96 Q4-96 Q1-97 Q2-97 Q3-97 Q4-97 Q1-98 Q2-98 Q3-98 Q4-98

Price ($) 358 323 316 336 369 333 328 351 389 387 393 402

Ch 04 FM YR 12 Page 168 Friday, November 10, 2000 9:19 AM

Page 25: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 1698 The sales of a new car can vary due to the effect of advertising and promotion. The

sales figures for Nassin Motor Company’s new sedan are shown in the table. Performa 5-point moving average to smooth the data. Plot the data, and use the last smoothedvalue to predict sales for the next month.

9 The attendance at weekly Trash’n’Treasure sales can vary due to weather. Perform a3-point moving average to smooth the data in the table. Can you determine on whichdays the weather was poor?

10 A large building site requries varying numbers of workers. The weekly employmentfigures over the last 7 weeks have been recorded. By performing a 3-point movingaverage, predict the number of people required for the next week.

Month Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Sales 141 270 234 357 267 387 288 303 367 465 398

Week 1 2 3 4 5 6 7 8 9 10

Attendance 480 160 440 600 255 500 250 470 520 700

Week 1 2 3 4 5 6 7

Employees 67 78 54 82 69 88 94

Ch 04 FM YR 12 Page 169 Friday, November 10, 2000 9:19 AM

Page 26: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

170 F u r t h e r M a t h e m a t i c s

Smoothing with an even number of points

As mentioned in the previous section, it is usually preferable to use an odd numberof points. However, there are times when an even number of points can be used —that is, a 4-point, 6-point or even 10-point moving average. When we used an oddnumber of points, the result was automatically centred; that is, the y-data had thesame t-values as the original (except at the first and last ‘lost’ points). This does notoccur with an even-point smoothing, as shown in the following example of a 4-pointmoving average.

Observe that the first average (10.5) is not aligned with any particular year — it isaligned with 1993.5! Also note that there are now three ‘lost’ values (the sevenoriginal records reduced to four). In other words, the moving average is not centredproperly. To align the data correctly, an additional step needs to be performed; this iscalled centring.

Time y-value4-point average (smoothed value)

Calculation Result

1992 6

1993 10

(6 + 10 + 14 + 12) ÷ 4 10.5

1994 14

(10 + 14 + 12 + 11) ÷ 4 11.75

1995 12

(14 + 12 + 11 + 15) ÷ 4 13

1996 11

(12 + 11 + 15 + 16) ÷ 4 13.5

1997 15

1998 16

Ch 04 FM YR 12 Page 170 Friday, November 10, 2000 9:19 AM

Page 27: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 171Use the following procedure to centre the data:

Step 1. Find the average of the first two smoothed points and align it with the 3rd timepoint.

Step 2. Find the average of the next two smoothed points and align it with the 4th timepoint.

Step 3. Repeat, leaving two blank entries at both top and bottom of the table.

This is demonstrated in the following table, using the data from the previous table.

The first average (11.125) is now aligned with 1994, the second (12.375) aligned with1995 and so on. This process not only introduces an extra step, but an extra averaging(or smoothing) as well. It is usually preferable to stick with an odd-point smoothing toreduce these difficulties.

However, if the original time series has seasonal variation, by taking a 4-point movingaverage we get a point from each season (spring, summer, autumn, winter) in our movingaverage. Thus, we may remove much of the seasonal fluctuation in the data.

Time y-value4-point average (smoothed value) 4-point average after centring

Calculation Result Calculation Result

1992 6

1993 10

(6 + 10 + 14 + 12) ÷ 4 10.5

1994 14 (10.5 + 11.75) ÷ 2 11.125

(10 + 14 + 12 + 11) ÷ 4 11.75

1995 12 (11.75 + 13) ÷ 2 12.375

(14 + 12 + 11 + 15) ÷ 4 13

1996 11 (13 + 13.5) ÷ 2 13.25

(12 + 11 + 15 + 16) ÷ 4 13.5

1997 15

1998 16

Ch 04 FM YR 12 Page 171 Friday, November 10, 2000 9:19 AM

Page 28: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

172 F u r t h e r M a t h e m a t i c s

The quarterly sales figure for a dress shop (in thousands of dollars) were recorded over a 2-year period. Perform a centred 4-point moving average on the data and plot the result. Comment on any trends you find.

Time Summer Autumn Winter Spring Summer Autumn Winter Spring

Sales (’000) 27 22 19 25 31 25 22 29

THINK WRITE

Put the data in a table.Note: Code the time column.Calculate a 4-point moving average in column 3.Average the pairs of averages to find the 4-point centred data. This is done in column 4.

Plot the data. The smoothed line is the thicker, red one.Note: The smoothed data start at the 3rd time point and finish at the 6th point.

Interpret the results. Observe the steadily increasing trend (even with only four smoothed points) that was not obvious from original data.

1Time Sales 4-point moving average 4-point centred m.a.

1 27

2 22

(27 + 22 + 19 + 25) ÷ 4 = 23.25

3 19 (23.25 + 24.25) ÷ 2 = 23.75

(22 + 19 + 25 + 31) ÷ 4 = 24.25

4 25 (24.25 + 25.00) ÷ 2 = 24.63

(19 + 25 + 31 + 25) ÷ 4 = 25.00

5 31 (25.00 + 25.75) ÷ 2 = 25.38

(25 + 31 + 25 + 22) ÷ 4 = 25.75

6 25 (25.75 + 26.75) ÷ 2 = 26.25

(31 + 25 + 22 + 29) ÷ 4 = 26.75

7 22

8 29

2

3

4 35

25

150 2 4 6

Time

Sale

s (×

$10

00)

8

5

7WORKEDExample

Ch 04 FM YR 12 Page 172 Friday, November 10, 2000 9:19 AM

Page 29: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 173

Even point smoothing with spreadsheetsThe spreadsheet for the 4-point moving average of worked example 7 is shown below.

The formulas are shown below. Note the cell row and column labels.

There is little difference between this and a 3-point moving-average spreadsheet,except that the SUMs are located (columns E and F) to correspond to the appropriateterm in the time series (columns C and D).

t y 4-point 4-point-C*

1 27

2 22 23.25

3 19 24.26 23.75

4 25 25 24.625

5 31 25.75 25.375

6 25 26.75 26.25

7 22

8 29

C D E F

4 t y 4-point 4-point-C*

5 1 27

6 2 22 =SUM(D5:D8)/4

7 3 19 =SUM(D6:D8)/4 =SUM(E6:E7)/2

8 4 25 =SUM(D7:D8)/4 =SUM(E7:E8)/2

9 5 31 =SUM(D8:D11)/4 =SUM(E8:E9)/2

10 6 25 =SUM(D9:D12)/4 =SUM(E9:E10)/2

11 7 22

12 8 29

13

remember1. Smoothing involves replacing the original time series with another one where

most of the variation has been removed, to see if there is a secular trend.2. Moving averages work best with an odd number of points. For a 3-point

moving average, one point is lost at either end of the time series.3. Moving average smoothing with an even number of points is a 2-step process.

First, we perform a 4-point moving average, then centre by averaging pairs of the 4-point averages. For 4-point averages, two points are lost at each end of the time series.

remember

Ch 04 FM YR 12 Page 173 Friday, November 10, 2000 9:19 AM

Page 30: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

174 F u r t h e r M a t h e m a t i c s

Smoothing with an even number of points

1 Perform a 4-point centred moving average to smooth the following data and plot theresult. Comment on any trends that you find.

2 The price of oranges fluctuates from season to season. Data have been recorded for 3 years.Perform a 4-point centred moving average, plot the data and comment on any trends.

3 Use a spreadsheet to complete the following table. The time series represents the tem-perature of a hospital patient over 15 days

t 1 2 3 4 5 6 7 8 9 10

y 75 54 62 60 70 45 54 59 62 64

t Autumn1998

Winter1998

Spring1998

Summer1998

Autumn1999

Winter1999

Spring1999

Summer1999

Autumn2000

Winter2000

Spring2000

Summer2000

Price 45 67 51 44 52 76 63 48 58 80 66 52

Day Temperature4-point moving

average4-point centredmoving average

1 36.6

2 36.4 36.75

3 36.8 36.825

4 37.2 36.85

5 36.9 36.95

6 36.5 37

7 37.2 37.05

8 37.4 37.275

9 37.1 37.375

10 37.4 37.25

11 37.6 37.275

12 36.9 37.325

13 37.2 37.15

14 37.6

15 36.9

4EWORKEDExample

7

Ch 04 FM YR 12 Page 174 Friday, November 10, 2000 9:19 AM

Page 31: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 175

4 The sales of summer clothing vary according to the season. The following table givesseasonal sales data (in thousands of dollars) for 3 years at a Sydney Jones departmentstore.

a Calculate a 4-point centred moving average.b Plot the original and smoothed data.c Determine if there is an underlying trend upwards or downwards.

5 Calculate a 6-point centred moving average on the data from question 3.

6 An athlete wishes to measure her performance in running a 1 km race. She records hertimes over the last 10 days.

a Calculate a 4-point centred moving average.b Plot the original and smoothed data.c Determine if there is a significant improvement in her times.

7 The following table shows the share price index of Industrial Companies during anunstable fortnight’s trading. By calculating a 4-point centred moving average, deter-mine if there seems to be an upward or downward trend.

Season Q3-96 Q4-96 Q1-97 Q2-97 Q3-97 Q4-97 Q1-98 Q2-98 Q3-98 Q4-98 Q1-99 Q2-99

Sales 78 92 90 73 62 85 83 70 61 78 74 59

Day 1 2 3 4 5 6 7 8 9 10

Time (s) 188 179 183 180 173 171 182 168 171 166

Day 1 2 3 4 5 6 7 8 9 10

Index 678 762 692 714 689 687 772 685 688 712

Ch 04 FM YR 12 Page 175 Friday, November 10, 2000 9:19 AM

Page 32: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

176 F u r t h e r M a t h e m a t i c s

Median smoothingAn alternative to moving average smoothing is to replace the averaging of a group ofpoints with the median of each group. Although no particular mathematical advantageis gained, it is a faster technique requiring no calculations (provided you use odd-pointmedian smoothing). Often it can be done directly on a graph of a time series.

Median smoothing from a tableBy placing the data in a table, median smoothing can be performed simply and quickly.Look at each group of three points (for smoothing with 3-point medians) and choosethe middle value. Progress through the table one point at a time. As with other methods,points will be lost at the beginning and end of the table.

Generally, the effect of median smoothing is to remove some random fluctuations. Itprobably performs poorly on cyclical or seasonal fluctuations — unless the size of therange being used (3, 5, 7, . . . points) is chosen carefully.

Median smoothing from a graphProvided the graph has clearly marked data points, it is possible to find a mediansmooth directly from it.

Perform a 3-point median smoothing on the data in the table below which represents the cost of an airline ticket between Sydney and Melbourne over an 8-month period.

THINK WRITE

Put data in the table.Find the median of each group of 3 data points. Again, note the ‘lost’ values at t = 1 and t = 8.

1 Time Cost 3-point median smoothed cost

1 340

2 350 median of (340, 350, 320) = 340

3 320 median of (350, 320, 340) = 340

4 340 median of (320, 340, 300) = 320

5 300 median of (340, 300, 330) = 330

6 330 median of (300, 330, 350) = 330

7 350 median of (330, 350, 310) = 330

8 310

2

8WORKEDExample

Ch 04 FM YR 12 Page 176 Friday, November 10, 2000 9:19 AM

Page 33: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 177

Perform a 3-point median smoothing on the following graph of a time series.

THINK WRITE

Read the data values and compute the median.

The 1st data points are 12, 18, 16 — so median = 16.

The 2nd data points are 18, 16, 8 — so median = 16.

The 3rd data points are 16, 8, 12 — so median = 12.

The 4th data points are 8, 12, 16 — so median = 12.

The 5th data points are 12, 16, 12 — so median = 12.

The 6th data points are 16, 12, 8 — so median = 12.

The 7th data points are 12, 8, 10 — so median = 10.

The 8th data points are 8, 10, 14 — so median = 10.

Plot the medians on the graph. Note: Median smoothing has indicated a downward trend that is probably not in the real time series. This indicates that moving average smoothing would be the preferred option.

20181614121086

0 2 4 6 108

y

x

1

220181614121086

0 2 4 6 108

y

x

9WORKEDExample

remember1. Smoothing involves replacing the original time series with another one where

most of the variation has been removed, in order to see if there is a secular trend. There are three basic smoothing techniques.(a) Moving average smoothing works best with an odd number of points. For a

3-point smooth, one point is lost at either end of the time series.(b) Moving average smoothing with an even number of points is a 2-step

process. First you perform a 4-point moving average, then centre by averaging pairs of the 4-point smooth. For a 4-point centred smooth, two points are lost at each end of the time series.

(c) Median smoothing is usually done with an odd number of points. The number of points lost is the same as for moving average smoothing.

2. In all cases, points are ‘lost’ at the start and end of the time series. Refer to the text for detailed descriptions of the techniques involved.

remember

Ch 04 FM YR 12 Page 177 Friday, November 10, 2000 9:19 AM

Page 34: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

178 F u r t h e r M a t h e m a t i c s

Median smoothing

1 Perform a 3-point median smooth on the following data and plot the result. Commenton any trends that you find. These are the same data as in question 1, Exercise 4E, socompare the graphs of the median smooth with the moving average smooth.

2 The maximum daily temperatures for a year were recorded as a monthly average. Per-form a 3-point median smooth on the data. Comment on your result.

3 Perform a 3-point median smooth on the graphical timeseries shown at right. Comment on the effectiveness ofthe result.

4 Perform a 3-point median smooth on the graphical timeseries shown at right. Comment on the effectiveness ofthe result.

5 Perform a 3-point median smooth on the data in thefollowing table, which represents the share price of theHAL computer company over the last 15 days.

6 Perform a 5-point median smooth on the data in the following table, which representsthe share price of the Pear-Shaped Computer Company over an 8-week trading period.

t 1 2 3 4 5 6 7 8 9 10

y 75 54 62 60 70 45 54 59 62 64

Month Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

Temp. (°C) 31 29 27 24 21 20 22 21 23 25 27 26

Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Price 1.45 1.67 1.56 1.72 1.58 1.71 1.67 1.82 1.56 1.78 1.88 1.56 1.67 1.71 1.82

Day Price Day Price Day Price Day Price

1 0.87 11 1.04 21 1.01 31 1.89

2 1.34 12 1.19 22 0.98 32 1.75

3 1.14 13 1.09 23 1.12 33 1.55

4 1.08 14 1.10 24 1.07 34 1.35

5 0.89 15 1.04 25 1.23 35 1.15

6 0.67 16 1.02 26 1.32 36 1.30

7 0.98 17 0.94 27 1.45 37 1.20

8 1.23 18 0.98 28 1.56 38 1.17

9 1.06 19 0.89 29 1.67 39 1.07

10 1.08 20 1.00 30 1.78 40 0.87

4FWORKEDExample

8

12840

0 2 4 6 108

2016

y

x

WORKEDExample

9

10090807060504030

20 4 6 12108 x

y

WorkS

HEET 4.2

Ch 04 FM YR 12 Page 178 Friday, November 10, 2000 9:19 AM

Page 35: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 179

Seasonal adjustmentAs we have seen in the sections on fitting a straight line to a time series, it is difficult tofind an effective linear equation for such data. As well, the sections on smoothing indi-cated that seasonal data may not lend themselves to the techniques of moving-average ormedian smoothing. We may just have to accept that the data vary from season to seasonand treat each record individually.

For example, the unemployment rate in Australia is often quoted as ‘6.8% — seasonallyadjusted’. The Government has accepted that each season has its own time series, more orless independent of the other seasons. How can we remove the effect of the season on ourtime series? The technique of seasonally adjusting, or ‘de-seasonalising’, will modify theoriginal time series, hopefully removing the seasonal variation, and exposing any othertrends (secular, cyclic, random) which may be ‘hidden’ by seasonal variation.

De-seasonalising time seriesThe method of de-seasonalising time series is best demonstrated with an example.Observe carefully the various steps, which must be performed in the order shown.

Unemployment figures have been collected over a 5-year period and presented in this table. It is difficult to see any trends, other than seasonal ones.a Compute the seasonal indices.b De-seasonalise the data using the seasonal indices.c Plot the original and deseasonalised data.d Comment on your results, supporting your statements with mathematical evidence. THINK WRITEa Find the yearly averages over

the four seasons for each year and put them in a table.

a 1994: (6.2 + 8.1 + 8.0 + 7.2) ÷ 4 = 7.37501995: (6.5 + 7.9 + 8.2 + 7.7) ÷ 4 = 7.57501996: (6.4 + 8.3 + 7.9 + 7.5) ÷ 4 = 7.52501997: (6.7 + 8.5 + 8.2 + 7.7) ÷ 4 = 7.77501998: (6.9 + 8.1 + 8.3 + 7.6) ÷ 4 = 7.7250

Divide each term in the original time series by its yearly average.

Summer 1994: 6.2 ÷ 7.3750 = 0.8407Autumn 1994: 8.1 ÷ 7.3750 = 1.0983Winter 1994: 8.0 ÷ 7.3750 = 1.0847Spring 1994: 7.2 ÷ 7.3750 = 0.9763Summer 1995: 6.5 ÷ 7.5750 = 0.8581...Spring 1998: 7.6 ÷ 7.7250 = 0.9838

1

Year 1994 1995 1996 1997 1998Average 7.3750 7.5750 7.5250 7.7750 7.7250

2

1994 1995 1996 1997 1998Summer 0.8407 0.8581 0.8505 0.8617 0.8932Autumn 1.0983 1.0429 1.1030 1.0932 1.0485Winter 1.0847 1.0825 1.0498 1.0547 1.0744Spring 0.9763 1.0165 0.9967 0.9904 0.9838

10WORKEDExampleSeason 1994 1995 1996 1997 1998

Summer 6.2 6.5 6.4 6.7 6.9

Autumn 8.1 7.9 8.3 8.5 8.1

Winter 8.0 8.2 7.9 8.2 8.3

Spring 7.2 7.7 7.5 7.7 7.6

Continued over page

Ch 04 FM YR 12 Page 179 Friday, November 10, 2000 9:19 AM

Page 36: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

180 F u r t h e r M a t h e m a t i c s

THINK WRITE

Find the seasonal averages from this second table. These are called seasonal indices.

Summer: (0.8407 + 0.8581 + 0.8505 + 0.8617 + 0.8932) ÷ 5 = 0.8608Autumn:(1.0983 + 1.0429 + 1.1030 + 1.0932 + 1.0485) ÷ 5 = 1.0772Winter:(1.0847 + 1.0825 + 1.0498 + 1.0547 + 1.0744) ÷ 5 = 1.0692Spring:(0.9763 + 1.0165 + 0.9967 + 0.9904 + 0.9838) ÷ 5 = 0.9927

b Divide each term in the original series by its seasonal index. This is the seasonally adjusted time series.Note: Your answers may vary a little, depending upon how and when you rounded your calculations.

b Summer 94: 6.2 ÷ 0.8608 = 7.2023Autumn 94: 8.1 ÷ 1.0772 = 7.5195

Spring 98: 7.6 ÷ 0.9927 = 7.6557

c Graph the original and the seasonally adjusted time series.

c

d Note that most, but not all, of the seasonal variation has been removed. However, by using least squares we could more confidently fit a straight line to the de-seasonalised data.

d There appears to be a slight upward trend in unemployment.

3

Season Seasonal index

Summer 0.8608

Autumn 1.0772

Winter 1.0692

Spring 0.9927

...

1994 1995 1996 1997 1998

Summer 7.202 7.551 7.435 7.783 8.015

Autumn 7.520 7.334 7.705 7.891 7.520

Winter 7.482 7.669 7.388 7.669 7.763

Spring 7.253 7.756 7.555 7.756 7.656

8.58.07.57.0

6.00 4 8 12

Time period

Une

mpl

oym

ent f

igur

es

16 20

6.5

Ch 04 FM YR 12 Page 180 Friday, November 10, 2000 9:19 AM

Page 37: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 181

Spreadsheet solutionA spreadsheet using the data in worked example 10 has been constructed.Note: The input data are in the table at the top of the spreadsheet.Step 1. Yearly averages are calculated just below the data table.Step 2. Each term is divided by the appropriate yearly average.Step 3. Seasonal indices are calculated (to the right of step 2).Step 4. ‘De-seasonalised’ data are calculated (below step 2).

Season 1994 1995 1996 1997 1998

SummerAutumnWinterSpring

6.28.1

87.2

6.57.98.27.7

6.48.37.97.5

6.78.58.27.7

6.98.18.37.6

Step 1 Yearly ave. 7.375 7.575 7.525 7.775 7.725

Step 3

Step 2 Season 1994 1995 1996 1997 1998 Seasonal indices

SummerAutumnWinterSpring

0.8406781.0983051.0847460.976271

0.8580861.0429041.0825081.016502

0.8504981.10299

1.0498340.996678

0.8617361.0932481.0546620.990354

0.8932041.0485441.0744340.983819

0.860841.0771981.0692370.992725

Step 4 Season 1994 1995 1996 1997 1998

SummerAutumnWinterSpring

7.2022647.5195087.4819727.252767

7.550767.3338417.6690227.756431

7.4345957.7051757.3884487.554965

7.7830917.8908427.6690227.756431

8.0154227.5195087.7625467.655698

06

7

8

9

2 4 6 8 10 12 14 16 18 20

Original dataSeasonalised

Ch 04 FM YR 12 Page 181 Friday, November 10, 2000 9:19 AM

Page 38: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

182 F u r t h e r M a t h e m a t i c s

The formulas corresponding to the spreadsheet above follow. Note carefully the rowand column addresses.

23

Note the following:1. By adding/deleting columns between columns D and H, you could increase/decrease

the number of years. Remember to change the denominator in the seasonal indices(I13 . . . I16)

2. By adding/deleting more rows between Rows 5 and 8, you could increase/decreasethe number of seasons (see Exercise 4G, question 4). Do not forget to change thedenominator in row 10.

3. The sum of the seasonal indices always equals the number of seasons (4 in thisexample).

B C D E F G H I

3

4 Season 1994 1995 1996 1997 1998

5678

SummerAutumnWinterSpring

6.28.1

87.2

6.57.98.27.7

6.48.37.97.5

6.78.58.27.7

6.98.18.37.6

9

10 Step 1 Yearly ave.

=SUM(D5:D8)/4 =SUM(E5:E8)/4 =SUM(F5:F8)/4 =SUM(G5:G8)/4 =SUM(H5:H8)/4

11 Step 3

12 Step 2 Season 1994 1995 1996 1997 1998 Seasonal indices

13141516

SummerAutumnWinterSpring

=D5/D$10=D6/D$10=D7/D$10=D8/D$10

=E5/E$10=E6/E$10=E7/E$10=E8/E$10

=F5/F$10=F6/F$10=F7/F$10=F8/F$10

=G5/G$10=G6/G$10=G7/G$10=G8/G$10

=H5/H$10=H6/H$10=H7/H$10=H8/H$10

=SUM(D13:H13)/5=SUM(D14:H14)/5=SUM(D15:H15)/5=SUM(D16:H16)/5

17

18 Step 4 Season 1994 1995 1996 1997 1998

19202122

SummerAutumnWinterSpring

=D5/$I$13=D6/$I$14=D7/$I$15=D8/$I$16

=E5/$I$13=E6/$I$14=E7/$I$15=E8/$I$16

=F5/$I$13=F6/$I$14=F7/$I$15=F8/$I$16

=G5/$I$13=G6/$I$14=G7/$I$15=G8/$I$16

=H5/$I$13=H6/$I$14=H7/$I$15=H8/$I$16

rememberDe-seasonalising a time series involves replacing the original time series with another one where most or all of the seasonal variation is removed. To de-seasonalise data:(a) Average over all seasons for each year — these are the yearly averages.(b) Divide each point in the original time series by its corresponding yearly

average.(c) Using this new series, average over all years for each season — these are

the seasonal indices.(d) Divide each point in the original time series by its corresponding seasonal

index.

remember

Ch 04 FM YR 12 Page 182 Friday, November 10, 2000 9:19 AM

Page 39: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 183

Seasonal adjustment

Note: Your answers may vary slightly, depending upon rounding. Try to roundto 4 decimal places for all intermediate calculations.

1 The price of sugar ($/kilo) has beenrecorded over 3 years on a seasonalbasis.a Compute the seasonal indices.b De-seasonalise the data using the

seasonal indices.c Plot the original and de-seasonalised

data.d Comment on your results, sup-

porting your statements with mathematical evidence.

2 Data on the total seasonal rainfall (in mm) have been accumulated over a 6-year period.

a Compute the seasonal indices.b De-seasonalise the original time series.c Plot the original and de-seasonalised time series.d Comment on your result, supporting your statements with mathematical evidence.

3 It is known that young people(18–25) have problems infinding work that are differentfrom those facing older people.The youth unemployment stat-istics are recorded separatelyfrom the overall data. Using theyouth unemployment figures forfive years shown at right:a Compute the seasonal indices.b De-seasonalise the time series.c Plot the original and de-seasonalised time series.d Comment on your result, supporting your statements with mathematical evidence.

4 It is possible to seasonally adjust time series for other than the usual 4 seasons.Consider an expensive restaurant that wishes to study its customer patterns on a dailybasis. In this case a ‘season’ is a single day and there are 7 seasons in a weekly cycle.Data are total revenue each day shown in the table which follows. Modify thespreadsheet solution to allow for these 7 seasons and de-seasonalise the following dataover a 5-week period. Comment on your result, supporting your statements withmathematical evidence.

Season 1995 1996 1997 1998 1999 2000

Summer 103 97 95 117 118 120

Autumn 93 84 82 100 99 98

Winter 143 124 121 156 155 151

Spring 123 109 107 125 122 124

4G

Season 1998 1999 2000

Summer 1.03 0.98 0.95

Autumn 1.26 1.25 1.21

Winter 1.36 1.34 1.29

Spring 1.14 1.07 1.04

WORKEDExample

10

EXCEL Spreadsheet

Seasonaladjustment

Season 1994 1995 1996 1997 1998

Summer 7.6 7.7 7.8 7.7 7.9

Autumn 10.9 11.3 11.9 12.6 13.1

Winter 11.7 12.4 12.8 13.5 13.9

Spring 9.9 10.5 10.8 11.4 11.9

Ch 04 FM YR 12 Page 183 Friday, November 10, 2000 9:19 AM

Page 40: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

184 F u r t h e r M a t h e m a t i c s

5 The unemployment rate in a suc-cessful European economy is given inthe table at right.a Compute the seasonal indices.b De-seasonalise the time series.c Plot the original and de-

seasonalised time series.d Comment on your result, supporting your statements with mathematical evidence.

6 The price of wheat over 4 yearsand 4 seasons is given in the tableat right.a Compute the seasonal indices.b De-seasonalise the time series.c Plot the original and de-

seasonalised time series.d Comment on your result, sup-

porting your statements with mathematical evidence.

7 Sales (in thousands) of a new computer chip have been recorded for each quarter over 3 years.a Compute the seasonal indices.b De-seasonalise the time series.c Plot the original and de-seasonalised time series.d Comment on your result, supporting your

statements with mathematical evidence.

8 The Gross National Product(GNP) is a measure of a nation’seconomy. A measure of a govern-ment’s efficiency is the ratio ofgovernment spending to GNP. Theseasonal data for 5 years havebeen recorded for the island stateof Maximinia.a Compute the seasonal indices.b De-seasonalise the time series.c Plot the original and de-seasonalised time series.d Comment on your result, supporting your statements with mathematical evidence.

Season Week 1 Week 2 Week 3 Week 4 Week 5

Monday 1036 1089 1064 1134 1042

Tuesday 1103 1046 1085 1207 1156

Wednesday 1450 1324 1487 1378 1408

Thursday 1645 1734 1790 1804 1789

Friday 2078 2204 2215 2184 2167

Saturday 2467 2478 2504 2526 2589

Sunday 1895 1786 1824 1784 1755

Quarter 1 2 3 4

1998 5.8 4.9 3.5 6.7

1999 6.1 5.1 3.2 6.5

2000 5.7 4.5 4.1 7.1

Year 1997 1998 1999 2000

Spring 104 103 109 111

Summer 89 90 91 94

Autumn 91 99 98 101

Winter 121 127 131 138

Year 1998 1999 2000

1 67 95 99

2 71 103 96

3 78 102 98

4 89 107 92

Year 1996 1997 1998 1999 2000

Spring 4.4 4.6 4.8 4.2 3.9

Summer 3.8 4.1 4.7 4.2 3.7

Autumn 5.3 5.7 5.8 5.1 4.9

Winter 5.5 5.9 6.0 5.1 4.8

Ch 04 FM YR 12 Page 184 Friday, November 10, 2000 9:19 AM

Page 41: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 185

Time series• A time series is a set of measurements taken over (usually) equally spaced time

intervals, such as hourly, daily, weekly, monthly or annually.

Trend lines• There are 4 basic types of trend:

1. secular: increasing or decreasing steadily2. seasonal: varying from season to season3. cyclic: similar to seasonal but not tied to a calendar cycle4. random: variations caused by external triggers happening at random.

Fitting trend lines• The trend line is a straight line that can be used to represent the entire time series.

Trend lines can be used for predicting the future values of the time series. The line can be found in several ways:1. By eye: Try to fit a straight line using methods of Chapter 3.2. The 2-mean method:

(a) Divide the time series into lower and upper halves.(b) Compute the means of the t and y values for each half. These are called ,

, for the lower half, and , , for the upper half.

(c) Compute the gradient using the formula: .

(d) Compute the y-intercept using the formula: .

(e) Write the equation of the straight line: y = mt + b.3. The 3-median method:

(a) Divide the data into three groups: lower, middle and upper.(b) Find the median of each of the three groups.

(c) Calculate the gradient using the formula: .

(d) Calculate the y-intercept using the formula:

b = [(yL + yM + yU) − m(tL + tM + tU)].

(e) Write the equation of the straight line: y = mt + b.

Least-squares regression• Least-squares regression techniques can be used to find a trend line

1. Centre the data so that the sum of all t values = 0. There are two methods, depending on whether there are even or odd numbers of points in the time series.

2. The gradient can be calculated simply from the formula: .

3. The y-intercept can be calculated from: .

summary

tLyL tU yU

myU yL–

tU tL–-----------------=

b yL m tL–=

myU yL–

tU – tL-----------------=

13---

mΣty

Σt2---------=

b y=

Ch 04 FM YR 12 Page 185 Friday, November 10, 2000 9:19 AM

Page 42: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

186 F u r t h e r M a t h e m a t i c s

Smoothing time series• Smoothing involves replacing the original time series with another one where most

of the variation has been removed, in order to see if there is a secular trend. There are three basic smoothing techniques. In all cases, points are ‘lost’ at the start and end of the time series. Refer to the text for detailed descriptions of the techniques involved.

Moving average smoothing with an odd number of points• Moving average smoothing works best with an odd number of points. For a

3-moving average, two points are lost; one point each at end of the time series.

Moving average smoothing with an even number of points• Moving average smoothing with an even number of points is a 2-step process. First

you perform a 4-point moving average, then centre by averaging pairs of the 4-point averages. For a 4-point centred smooth, four points are lost; two points at each end of the time series.

Median smoothing• Median smoothing is usually done with an odd number of points. The number of

points lost is the same as for moving average smoothing.

De-seasonalisation• De-seasonalising a time series involves replacing the original time series with

another one where most or all of the seasonal variation is removed:1. Average over all seasons for each year — these are the yearly averages.2. Divide each point in the original time series by its corresponding yearly average.3. Using this new series, average over all years for each season — these are the

seasonal indices.4. Divide each point in the original time series by its corresponding seasonal index.

Ch 04 FM YR 12 Page 186 Friday, November 10, 2000 9:19 AM

Page 43: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 187

Multiple choice

1 The price of oranges over a 16-month period is recorded in the figure. The trend can be described as:A CyclicB SeasonalC RandomD SecularE There is no trend.

2 A 2-mean trend line was fitted to the data from question 1 using the values below. The gradient of this line is:

3 From another 16-month time series for the price of apples, it was found that the 2-mean trend line was: price = 0.415 × month + 8.45. A prediction for the price of apples in month 18 is:

4 A least squares trend line has been fitted to the time series in the figure. Its equation is most likely to be:A y = 10tB y = −8t + 10C y = 8tD y = 8t − 10E y = 8t + 10

5 The following data represent the number of employees in a car manufacturing plant. The data is smoothed using a 3-point moving average.

The first two points in the smoothed trend line are:

6 How many points would be obtained from the smoothed trend in question 5?

t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Price 20 28 10 14 18 24 16 26 16 18 22 20 17 25 20 5

A 4.93 B –0.203 C 0.313 D –3.30 E 0.0

A 8.45 B 0.42 C 6.64 D 15.09 E Cannot be determined with the above information.

Year 1993 1994 1995 1996 1997 1998 1999 2000

Number 350 320 300 310 270 240 200 160

A 320 and 300 B 320 and 310 C 323 and 310 D 335 and 310 E 323 and 273

A 8 B 7 C 6 D 5 E 4

CHAPTERreview

4A

t

50403020100

0 2 4 6 8Months

10 12 14

Pric

e of

ora

nges

16

4B

4B

4C

t

y

706050

1009080

403020100

0 4 82 6 10

4D

4D

Ch 04 FM YR 12 Page 187 Friday, November 10, 2000 9:19 AM

Page 44: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

188 F u r t h e r M a t h e m a t i c s

7 Consider the following data.

The value, after a 4-point smoothing after centring, plotted against the year 2002 is:

8 A 3-point median smooth is performed on the data in the figure at right. The last smoothed value is:A 25B 21.7C 20D 15E 9

9 Seasonal indices and adjustment can be used when:A there are random variations in the dataB there are seasonal variations along with a secular trendC there are seasonal variations onlyD there are seasonal or cyclic variationsE there are at least 4 seasons’ worth of data.

10 The seasonal indices at right were obtained from a time series:

The value of the winter’s seasonal index is:

11 Using the data from question 10, a seasonally adjusted value for the summer of 2000, when the original value was 520, is closest to:

Short answer1 The number of uniforms sold in a school uniform shop is reported in the table.

Fit a trend line to these data. What type of trend is best reflected by these data? Can you explain these trends?

2 Fit a 2-mean trend line to the following data, which represent the sales at a snack bar during the recent Melbourne show. State the gradient and y-intercept.

Time 1999 2000 2001 2002 2003 2004 2005

y-value 12 13 16 16 17 19 22

A 16.25 B 14.25 C 15.5 D 17 E 14.875

A 1.18 B 0.94 C 1.08 D 1.06 E Cannot be determined from the given information.

A 406 B 666 C 464 D 614 E Cannot be determined without additional information.

Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.

118 92 53 20 47 102 90 42 35 26 12 58

Day 1 2 3 4 5 6 7 8

Sales ($) 2300 2200 2600 3100 2900 3200 3300 3500

4E

4F

t

y35302520151050

0 2 4 6 8 10

4G

Season Spring Summer Autumn Winter

Index 1.12 0.78 0.92

4G

4G

4A

4B

Ch 04 FM YR 12 Page 188 Friday, November 10, 2000 9:19 AM

Page 45: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

C h a p t e r 4 T i m e s e r i e s 1893 Fit a 3-median trend line to the data at right.

a State the gradient and y-intercept as exact values.b Use your line to predict a value when t = 35.

4 A hotel records the number of rooms booked over an 11-day period. Fit a trend line using the least squares method.a State the gradient and y-intercept, rounded to

2 decimal places.b Predict the number of rooms booked for days 12 and 13.

5 Perform a 3-point moving average on the following rainfall data. Plot the original and smoothed data on the same set of axes. Give all answers rounded to 1 decimal place.

6 Fit a 5-point moving average to the following seasonal data of coat sales.

7 Fit a 4-point centred moving average to the data from question 6. Compare your results. What do you notice about the number of smoothed data points in each case?

8 Perform a 3-point median smooth on the data shown at right. Plot the smoothed points joined with a straight line.

9 The seasonal indices for the price of shares in CSP fruit canneries are:

De-seasonalise the following data:

Day 1 2 3 4 5 6 7 8 9 10 11

Rooms 12 18 15 20 22 20 25 24 26 28 30

Day 1 2 3 4 5 6 7 8

Rain (mm) 2 5 4 6 3 7 6 9

Season Winter 1997

Spring 1997

Summer 1997

Autumn 1997

Winter 1998

Spring 1998

Summer 1998

Autumn 1998

Sales ($) 690 500 400 720 780 660 550 440

Season Winter Spring Summer Autumn

Index 1.7 0.6 0.5 1.2

Season (2000)Share price

Seasonalised De-seasonalised

Spring 150

Summer 100

Autumn 300

Winter 400

t

y

0

20

40

60

8090

10

30

50

70

0 10 20 30 40 50 60 70 80 90

4B

4C

4D

4D

4E

t

y

0

5

10

15

20

25

30

0 2 4 6 8 10

354F

4G

Ch 04 FM YR 12 Page 189 Friday, November 10, 2000 9:19 AM

Page 46: Time series - iiNetmembers.ozemail.com.au/~rdunlop/CoplandMain... · 146 Further Mathematics Time series and trend lines In previous chapters we looked at bivariate, or (x, y), data

190 F u r t h e r M a t h e m a t i c s

AnalysisThe next 8 questons relate to the following data which represent seasonal rainfall (mm) in an Australian city.

1 Plot the data points and try to fit a straight trend line by eye. Comment on the ease of making this plot.

2 Now, try to plot a trend line using the 2-mean method. Compare the result with that of question 1.

3 Finally, plot a trend line using the least-squares technique. Again, compare your result with the previous ones.

4 To smooth out the seasonal variation, 3-point and 5-point moving average smoothings are tried. Compare the results of these two methods with the results from questions 1 to 3 by plotting the smoothed data.

5 Upon observing the results with the 5-point smoothing, a trend appears. Take the data from the 5-point moving average and fit a straight line using least-squares. Put the first smoothed point at t = 3 and then centre the time data. State the y-intercept and gradient. Compare this trend line with that from question 3.

6 Given the seasonal nature of the data, a 4-point moving average is tried. After calculating the 4-point moving average, fit a straight line using least-squares, following the method of question 5. Compare the results obtained with those from question 5.

7 Finally, try seasonal adjustment. Take t = 1 to be summer and find the seasonal indices. Then, seasonally adjust the data.

8 Take the seasonally adjusted data from question 7 and fit a trend line using least-squares. Comment on this result.

Season 1 2 3 4 5 6 7 8 9 10 11 12

Rainfall 43 75 41 13 47 78 50 19 51 83 55 25

testtest

CHAPTERyyourselfourselftestyyourselfourself

4

Ch 04 FM YR 12 Page 190 Friday, November 10, 2000 9:19 AM