Professional Documents
Culture Documents
PLEASE
PLEASE READ:
READ:
Forecasting Tips
If,
If, upon
upon opening,
opening, this
this file
file appears
appears to
to contain
contain errors
errors
(e.g.
(e.g. #NAME?),
#NAME?), please
please ensure
ensure the
the following:
following:
Go to Table of Contents
Go
Go to
to Tools
Tools ->
-> Add-Ins
Add-Ins (ALT
(ALT +
+T
T+
+ I,
I, all
all versions
versions of
of
Excel);
Excel);
Make
Make sure
sure Analysis
Analysis ToolPak
ToolPak and
and Analysis
Analysis ToolPak
ToolPak
-- VBA
VBA add-ins
add-ins are
are both
both checked.
checked.
liam.bastick@corality.com
www.corality.com
www.sumproduct.com
Table of Contents
Forecasting Tips
Go to Cover Sheet
TREND Illustration
Linear Regression
LINEST Example
LINEST More Complex
Bias and Accuracy
Total Pages:
Page
3
4
6
9
11
14
14
Examples
Section 1.
Forecasting Tips
Go to Table of Contents
278386597.xls
Examples_SC
Printed: 21:21:06 on 08/03/2015
Page 3 of 18
TREND Illustration
Forecasting Tips
Go to Table of Contents
Simple Example
Period
Sales ($)
133,890
135,000
135,790
137,300
138,130
139,100
139,900
141,120
141,890
10
143,230
11
144,000
12
13
14
15
16
17
18
19
20
21
22
23
24
145,290
146,172
147,190
148,208
149,226
150,244
151,262
152,281
153,299
154,317
155,335
156,353
157,372
278386597.xls
TREND_Illustration_BO
Printed: 21:21:06 on 08/03/2015
Page 4 of 18
TREND Illustration
Forecasting Tips
Go to Table of Contents
Simple Example
Problem with Seasonality
Period
Sales ($)
133,890
8.00%
135,000
8.06%
135,790
8.11%
137,300
8.20%
138,130
8.25%
139,100
8.31%
139,900
8.35%
141,120
8.43%
141,890
8.47%
10
143,230
8.55%
11
144,000
8.60%
12
145,290
8.68%
13
145,612
8.00%
14
146,820
8.06%
15
147,679
8.11%
16
149,321
8.20%
17
150,224
8.25%
18
151,278
8.31%
19
152,149
8.35%
20
153,475
8.43%
21
154,313
8.47%
22
155,770
8.55%
23
156,607
8.60%
24
158,010
8.68%
278386597.xls
TREND_Illustration_BO
Printed: 21:21:06 on 08/03/2015
Growth
8.76%
Page 5 of 18
Linear Regression
Forecasting Tips
Go to Table of Contents
Scenario
Company ABC Limited is interested in finding out the relationship between the amount that is spent on marketing
and the level of sales. The marketing manager believes that, as marketing expenditure increases,
the sales levels increase accordingly.
Task
Your task, as an accountant, is to analyse past data to determine whether there is in fact a relationship
between Marketing Expenditure and Sales levels.
Marketing
Expenditure Sales
($ '000)
($ '000)
Month
Jul-08
300
530
Aug-08
346
635
Sep-08
834
1,000
Oct-08
723
938
Nov-08
130
274
Dec-08
624
793
Jan-09
345
536
Feb-09
768
1,450
Mar-09
464
800
Apr-09
624
826
May-09
270
373
Jun-09
389
403
Jul-09
917
1,592
Aug-09
836
1,632
Sep-09
613
804
Oct-09
741
1,064
Nov-09
456
582
Dec-09
246
425
Jan-10
734
903
Feb-10
824
946
Mar-10
234
306
Apr-10
423
623
May-10
682
835
Jun-10
234
352
278386597.xls
Linear_Regression_BO
Printed: 21:21:06 on 08/03/2015
1,800
1,600
Sales ($ '000)
1,400
1,200
1,000
800
600
400
200
Oct08
Nov- Dec08
08
Jan09
Feb- Mar09
09
Apr- May09
09
Oct09
Page 6 of 18
Nov- Dec09
09
Jan10
Feb- Mar10
10
Apr10
May10
Jun10
Linear Regression
Forecasting Tips
Go to Table of Contents
Scenario
Note: In all the calculations below, Marketing Expenditure is referred to as [x_values]
whilst the Sales data is referred to as [y_values].
8.55 INTERCEPT(known_y's,known_x's)
What does this intercept tell us? It tells us that if our marketing expenditure was $0, we would still be making $8.55 worth of sales.
Calculating the gradient or slope (m)
This tells us how steep the line is.
known_y's
Sales_Data
known_x's
Marketing_Data
const
omitted
stats
omitted
SLOPE Formula
Using LINEST
1.44
8.55
What does the gradient tell us? It means that for every additional $1 spent on Marketing, the company is getting an additional $1.44 worth of sales.
Put in another way, we can say that the company sales levels are 1.44x the costs of marketing.
Now we have found out the equation of our line, it is:
y = 1.44x + 8.55
where
278386597.xls
Linear_Regression_BO
Printed: 21:21:06 on 08/03/2015
Page 7 of 18
Linear Regression
Forecasting Tips
Go to Table of Contents
Scenario
Step 3. Create a Graph
To make it easier to visualise this relationship, let's create a graph.
To do this, highlight the [Marketing Expenditure] and [Sales] columns,
then insert and a new chart.
Right click on the chart, select "Add Trendline", and select the "Linear" option.
Sales ($ '000)
1,800
1,600
1,400
1,200
1,000
800
600
400
200
-
100
200
300
400
500
600
700
800
900
1,000
800
1163.48
1163.48
278386597.xls
Linear_Regression_BO
Printed: 21:21:06 on 08/03/2015
1.002
1175.51
Page 8 of 18
LINEST Example
Forecasting Tips
Go to Table of Contents
Commentary
Your client has been to contribute to an awareness campaign to help reduce traffic accidents. To help target the campaign you want to understand how groups of
drivers vary. One strong hypothesis is that old drivers are slow and erratic and young drivers are fast. To investigate this you send out the analysts, who gather the
following data on speed and age.
Data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Average
Speed
(km / hr)
46.1
38.4
60.4
27.6
40.8
35.9
56.5
76.1
48.9
52.4
73.1
44.7
27.4
65.2
59.1
48.2
33.8
18.9
64.7
23.0
44.8
59.1
33.6
74.7
40.9
64.6
75.8
48.8
55.0
29.7
35.9
57.6
28.0
35.6
70.1
77.0
40.5
19.1
29.0
31.1
52.9
36.8
65.2
35.1
46.7
19.7
30.9
51.9
73.3
59.4
278386597.xls
LINEST_Example_BO
Printed: 21:21:06 on 08/03/2015
95.2
103.7
97.7
100.4
98.5
105.2
102.1
96.0
97.8
95.0
101.4
97.2
100.9
102.8
93.2
96.0
101.1
99.4
92.0
99.8
103.0
100.1
101.3
96.1
96.5
99.4
87.7
92.8
94.3
100.5
105.3
106.0
102.2
103.4
92.0
89.0
101.7
101.8
101.3
98.3
93.7
103.3
100.3
104.5
103.4
101.5
103.8
102.0
102.8
100.6
105.0
f(x) = - 0.12x + 105.09
R = 0.23
100.0
Observ
ation Driver Age
No.
(yrs)
95.0
90.0
85.0
80.0
10.0
20.0
30.0
40.0
50.0
Age
60.0
70.0
80.0
90.0
Page 9 of 18
LINEST Example
Forecasting Tips
Go to Table of Contents
Commentary
Your client has been to contribute to an awareness campaign to help reduce traffic accidents. To help target the campaign you want to understand how groups of
driversSimple
vary. One
strongEquation
hypothesis(with
is thatone
old drivers
are slow and
erratic and young drivers are fast. To investigate this you send out the analysts, who gather the
Very
Linear
independent
variable)
following data on speed and age.
y= c+ x
where:
y = Dependent Variable
c = Intercept / Constant
= Slope / Co-efficient
x = Independent Variable
Calculation
c = Intercept / Constant
= Slope / Co-efficient
Relationship
Relevant Function
105.09
c = Intercept / Constant
(0.12)
= Slope / Co-efficient
Relationship
=LINEST(known_y's,[known_x's],[const],[stats])
Relevant Function
[const] = logical argument that dictates whether or not to include a constant (1 = YES or 0 =
NO).
Default is YES
[stats] = logical argument that dictates whether or not to include additional statistics (1 = YES
or 0 = NO).
Default is NO
Where:
Where:
##
##
Calculation
Output from LINEST
Relationship
(0.12)
105.09
Relationship
Caution:
This relationship cannot be generalised to represent populations aged less than 20, or more than 80 years old!
278386597.xls
LINEST_Example_BO
Printed: 21:21:06 on 08/03/2015
Page 10 of 18
Commentary
You decide to drill down further on your traffic data, and create a more sophisticated analysis.
Now, you decide to perform the same estimation, but across a whole range of variables including:
- Age;
- Vehicle Value;
- Driver Gender; and
- Number of Passengers.
Note
We now embark upon a multi-factor linear estimation. That is, an estimation of a relationship between multiple independent variables, and a single dependent variable.
Some important points to consider when using LINEST (or Ordinary Least Squares) are that it assumes:
- All of the variables are independent from one another; and
- All of the observations are independent from one another.
If these assumptions are not true, then the output from the regression may be flawed.
278386597.xls
LINEST_More_Complex_BO
Printed: 21:21:07 on 08/03/2015
Page 11 of 18
Commentary
Data set
Observation
No.
Number of
Passengers
Vehicle
Value
($'000)
Driver Age
(yrs)
Driver is
Male (1) or
Female (0)
Average
Speed
(km / hr)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
4
3
1
1
4
5
2
6
5
3
4
3
4
5
4
2
6
4
4
5
3
5
4
4
6
5
1
4
1
3
5
5
5
2
4
4
3
4
5
3
2
2
3
4
2
$16.5
$21.3
$13.9
$42.2
$22.2
$35.1
$16.1
$24.0
$42.2
$14.2
$16.0
$6.2
$43.1
$43.1
$29.9
$0.6
$26.4
$2.7
$41.0
$11.9
$32.4
$30.5
$32.4
$8.2
$13.2
$45.9
$33.9
$26.9
$29.4
$41.8
$35.7
$48.1
$39.2
$13.4
$2.3
$40.6
$45.4
$4.2
$10.9
$5.5
$44.6
$2.5
$20.8
$12.4
$17.2
46.1
38.4
60.4
27.6
40.8
35.9
56.5
76.1
48.9
52.4
73.1
44.7
27.4
65.2
59.1
48.2
33.8
18.9
64.7
23.0
44.8
59.1
33.6
74.7
40.9
64.6
75.8
48.8
55.0
29.7
35.9
57.6
28.0
35.6
70.1
77.0
40.5
19.1
29.0
31.1
52.9
36.8
65.2
35.1
46.7
0
1
0
0
0
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
1
0
0
1
0
0
0
0
1
0
1
1
95.2
103.7
97.7
100.4
98.5
105.2
102.1
96.0
97.8
95.0
101.4
97.2
100.9
102.8
93.2
96.0
101.1
99.4
92.0
99.8
103.0
100.1
101.3
96.1
96.5
99.4
87.7
92.8
94.3
100.5
105.3
106.0
102.2
103.4
92.0
89.0
101.7
101.8
101.3
98.3
93.7
103.3
100.3
104.5
103.4
278386597.xls
LINEST_More_Complex_BO
Printed: 21:21:07 on 08/03/2015
Page 12 of 18
Commentary
46
47
48
49
50
278386597.xls
LINEST_More_Complex_BO
Printed: 21:21:07 on 08/03/2015
5
5
4
5
4
$28.1
$10.2
$35.2
$43.0
$31.2
19.7
30.9
51.9
73.3
59.4
0
1
0
1
0
101.5
103.8
102.0
102.8
100.6
Page 13 of 18
Commentary
Estimated Vehicle Speeds
Vehicle
Vehicle A
Vehicle B
Vehicle C
Number of
Passengers
Vehicle
Value
($'000)
Driver Age
(yrs)
Driver is
Male (1) or
Female (0)
3
1
5
$15.0
$20.0
$10.0
20.0
60.0
35.0
1
0
1
y=c+ 1 x 1 + 2 x 2 + 3 x3 + 4 x 4
Use LINEST (at default settings) to calculate co-efficients
4
4.86
3
(0.10)
2
0.02
1
0.54
N
u
m
4b
e
Output from LINEST
r
c
100.25
o
f
Comments:
We can now estimate the average speed of a vehicle using the coefficients calculated.
Vehicle
Vehicle A
Vehicle B
Vehicle C
278386597.xls
LINEST_More_Complex_BO
Printed: 21:21:07 on 08/03/2015
Number of
Passengers
Vehicle
Value
($'000)
Driver Age
(yrs)
Driver is
Male (1) or
Female (0)
Estimated Average
Speed
(km / hr)
3
1
5
$15.0
$20.0
$10.0
20.0
60.0
35.0
1
0
1
104.92
94.96
104.37
Page 14 of 18
P
a
s
s
e
n
g
e
###
r
s
Vehicle
Vehicle A
Vehicle B
Vehicle C
There are two aspects of forecasting errors to be concerned about - Bias and Accuracy
Bias - A forecast is biased if it errs more in one direction than in the other
- whether the method tends to under-forecast or over-forecast.
Accuracy - Forecast accuracy refers to the distance of the forecasts from actual demand, ignoring the direction of that error.
Example
For six periods forecasts and actual demand have been tracked. The following table gives actual demand D t and forecast demand Ft for six periods:
t
Dt
Ft
Et
(Et)2
|Et|
|Et|/Dt
170
200
230
195
-30
900
30
17.65%
35
1225
35
250
15.22%
210
40
1600
40
16.00%
4
5
200
220
-20
400
20
10.00%
185
210
-25
625
25
13.51%
180
200
-20
400
20
11.11%
-20
5150
170
83.49%
Total
Forecast Measure
278386597.xls
Bias_and_Accuracy_BO
Printed: 21:21:07 on 08/03/2015
Page 15 of 18
There are two aspects of forecasting errors to be concerned about - Bias and Accuracy
278386597.xls
Bias_and_Accuracy_BO
Printed: 21:21:07 on 08/03/2015
Page 16 of 18
278386597.xls
Bias_and_Accuracy_BO
Printed: 21:21:07 on 08/03/2015
Page 17 of 18
278386597.xls
Bias_and_Accuracy_BO
Printed: 21:21:07 on 08/03/2015
Page 18 of 18