Quantitative Techniques to Transport PlanningCourses IndexOffline index pageNetTel@Africa
Page 44 of 88 pages. Chapter: 8: Time Series and Forecasting More information about chapter

Techniques for Extracting the Trend

There are three techniques that can be used to extract a trend from a set of time series values.

a) Semi-Averages. This is the simplest technique, involving the calculation of two (x,y) averages which, when plotted on a chart as two separate  points and joined up, form a straight line.

b) Least Squares Regression. This method, is covered in correlation and regression analysis topic.

c) Moving Average. This is the most commonly used method for identifying a trend and involves the calculation of set of averages.

The Method of Semi-Averages

The Semi-Average Method of extracting the trend is demonstrated with the example below;

Suppose the following sales (£00, to nearest £10) were recorded for a firm and it is required to obtain a semi-average trend

-

-

Week 1

-

-

-

-

Week 2

-

-

Day

Mon

Tue

Wed

Thu

Fri

Mon

Tue

Wed

Thu

Fri

Sales (y)

250

320

340

520

410

260

380

410

670

420

Procedure

a) Split the data into lower and upper group

Lower Group is250320340520410
Upper Group is260380410670420

b) Find the mean value of each group

Mean of Lower group (L) =  <insert formula>
          = 368

Mean of upper group (U) =  <insert formula>
         = 428

c) Plot on the graph, each mean against an appropriate time point.
An appropriate time point can always be taken as the median time point of the respective group, i.e. L would be plotted against Wednesday of week 1 and U against Wednesday of week 2.

d) The line joining the two plotted points is the required Trend.
Note that it is important that the two groups in question have an equal number of data values. If the given data, however, contains an odd number of data values, the middle value can be ignored (for the purposes of obtaining the trend line)

Once a trend line has been obtained, the trend values corresponding to each time point can be read off from the graph.

Example1

Using the data given below;

a) Use the method of semi-averages to obtain and plot a trend line
b) Draw up a table showing the original data (Y) values against the trend (T)

UK Outward Passenger Movement by Sea

Year

Quarter

Number of Passengers (millions)

1

1

2.2

2

5.0

3

7.9

4

3.2

2

1

2.9

2

5.2

3

8.2

4

3.8

3

1

3.2

2

5.8

3

9.1

4

4.1

Solution

a) 

<insert formula><insert formula>

The mean values both L and U must be plotted against a hypothetical point between the middle two time points in their respective sets. Thus L is plotted between Q3 and Q4 of Year 1 whilst U is plotted between Q1 and Q2 of Year 3. As shown below.

<insert graph>

  
The two means  (L and U) have been plotted joined by a straight line to form the trend line.

b) The trend values have been read from the graph and are tabulated below, together with the original data values.

Year

Quarter

Number of Passengers (millions)

Trend Values

1

1

2.2

3.9

2

5.0

4.1

3

7.9

4.3

4

3.2

4.5

2

1

2.9

 4.7

2

5.2

4.9

3

8.2

5.2

4

3.8

5.4

3

1

3.2

5.6

2

5.8

5.8

3

9.1

6.0

4

4.1

6.2

The Method of Least Squares Regression

Procedure

1. Take the physical time points (i.e. quarters) as the independent variable x

2. Take the actual data values as dependent variable y.

3. Translate the Regression line of y on x , y = a + bx

Example2

Use the data in example 1 to calculate least squares regression and extract a trend component for each point given.

Solution

Make y = number of passenger and x = time point

Use the general formula y = a + bx.

Where:

<insert formula>

And

<insert formula>

Quarter
x

Number of Passengers (millions)
y

xy

x2

1

2.2

2.2

1

2

5.0

10.0

4

3

7.9

23.7

9

4

3.2

12.8

16

5

2.9

14.5

25

6

5.2

31.2

36

7

8.2

57.4

49

8

3.8

30.4

64

9

3.2

28.8

81

10

5.8

58.0

100

11

9.1

100.1

121

12

4.1

49.2

144

78

60.6

418.3

650

Therfore

<insert formula>

b = 0.1706

and

<insert formula>

a = 3.94

Thus the regression line for the Trend is T = 3.94 + 0.17x, the normal y has been replaced by ‘T’.

The time point values (x = 1,2,3,4,5,6, etc) can now be substituted into the above regression line to give the trend values required.

When x = 1 (i.e. Q1, year 1)  T= 3.94 + 0.17 (1) = 4.11
When x = 2 (i.e. Q2, year 1)  T= 3.94 + 0.17 (2) = 4.28 . . . etc

The Trend values from Least Squares regression are tabulated below:

x

y

Trend (T)

1

2.2

4.11

2

5.0

4.28

3

7.9

4.45

4

3.2

4.62

5

2.9

4.79

6

5.2

4.96

7

8.2

5.13

8

3.8

5.30

9

3.2

5.47

10

5.8

5.64

11

9.1

5.81

12

4.1

5.98

The Method of Moving Average

  • A moving average is an average of the results of a fixed number of periods
  • The moving average method is a technique used to find the Trend. This method attempts to remove seasonal variations from actual data by a process of averaging.

Moving Average of an Odd Number Results

Example:

Output at a factory appears to vary with the day of the week. Output over the last three weeks has been as follows:

Week 1

Week 2

Week 3

000 units

000 units

000 units

Monday

80

82

84

Tuesday

104

110

116

Wednesday

94

97

100

Thursday

120

125

130

Friday

62

64

66

Find

(a)  The moving average trend values.

(b)  Draw the graph of both output and trend on the same graph paper.

Solution

An average of five items, which coincide, with the length of the natural cycle of the series will be used.

(a)

Output (Y)

Five day Moving Total

Trend (T)

Week 1

Monday

80

-

-

Tuesday

104

-

-

Wednesday

94

460

92.00

Thursday

120

462

92.40

Friday

62

468

93.60

Week 2

Monday

82

471

94.20

Tuesday

110

476

95.20

Wednesday

97

478

95.60

Thursday

125

480

96.00

Friday

64

486

97.20

Week 3

Monday

84

489

97.80

Tuesday

116

494

98.80

Wednesday

100

496

99.20

Thursday

130

-

-

Friday

66

-

-

Procedure

The average in the 1st Five days (Mo, Tu, We, Th, Fr) period were

<insert formula>

The average output in 2nd Five days ( Tu, We, Th, Fr,Mo) period were;

<insert formula>

The average output in 3rd Five days (, We, Th, Fr,Mo,Tu) period were

<insert formula>

Similarly, the other averages are calculated and are tabulated above.

(b) 

<insert graph>

Moving Average over an even number of Periods (Centered Moving Average)

When calculating moving averages with an even period (i.e. 4, 6, or 8), the resulting moving average would seem to have to be placed in between two corresponding time points. However, a trend value is required to coincide with a particular time points. Therefore centering process is deployed in this type of situation. (A moving average of two will be calculated on the first average trend.)

Example:

Calculate a moving average trend line of the following results

Year

Quarter

Volume of Sales in '000 units

2001

1

600

2

840

3

420

4

720

2002

1

640

2

860

3

420

4

740

2003

1

670

2

900

3

430

4

760

Solution

Year

Quarter

Volume of Sales
'000 units

4Qtr
Moving Total

8Qtr
Moving Total

Trend
Centered Moving Average

2001

1

600

-

-

-

2

840

-

-

-

3

420

2580

5200.00

650.00

4

720

2620

5260.00 

657.50

2002

1

640

2640

5280.00

660.00

2

860

2640

5300.00

662.50

3

420

2660

5350.00

668.75

4

740

2690

5420.00

677.50

2003

1

670

2730

5470.00

683.75

2

900

2740

5500.00

687.50

3

430

2760

-

-

4

760

-

-

-

Procedure

The 1st  4 Qtr Moving Total =

<insert formula>

The 1st  8 Qtr Moving Total =

<insert formula>

The 1st Trend Value =

<insert formula>

The other results are tabulated in the table above

Go to previous pageOrganizers for courseStudy question for this pageGo live and check course documents folderGo live and access discussion forumGo to next page