0% found this document useful (0 votes)
49 views9 pages

Lect 4

The document discusses various forecasting methods for estimating future demand, including qualitative and quantitative approaches as well as time-series forecasting techniques like exponential smoothing, simple moving averages, and simple linear regression. It provides examples of how to apply these methods to demand data and calculates forecasts. The document also discusses evaluating forecast accuracy using measures like mean squared error and mean absolute error.

Uploaded by

sertyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views9 pages

Lect 4

The document discusses various forecasting methods for estimating future demand, including qualitative and quantitative approaches as well as time-series forecasting techniques like exponential smoothing, simple moving averages, and simple linear regression. It provides examples of how to apply these methods to demand data and calculates forecasts. The document also discusses evaluating forecast accuracy using measures like mean squared error and mean absolute error.

Uploaded by

sertyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

2022-2023

Operation Research

Lecture Four
- Forecast

Asst. Lect. Hiba Dhaher


Electrical Engineering Depart.
1- Introduction to forecasting
Forecasting is a method to use the past experience and estimate the future. This is a
very critical planning tool. It can be used for sales forecasting, demand forecasting
and technology forecasting. In production engineering, demand estimation is an
important part of production planning. There are two types of demands: dependent
and independent demands. The quantity of dependent demand is estimated by the
demand of complete or end product. But for the estimation of independent demand,
various qualitative and quantitative models of forecasting are used. Forecasting is the
initial phase of production planning in which the quantity of product required in the
near future is estimated and production schedule is prepared accordingly.

2- Forecasting Methods
Forecasting methods are divided into two categories:
1- Qualitative forecasting.
2- Quantitative forecasting.

3- Time-series Forecasting
The time-series forecasting methods are based on the analysis of historical data.
Time series may be defined as a set of observations measured at successive times or
over successive periods. In the time-series methods, the assumption is that the past
patterns in the data can be used to forecast future data points. Here, future data point
means the points on the projection of the line using extrapolation.

Figure (1) Time series types

1
The following methods are for time-series forecasting:

3.1 Exponential Smoothing Method


The forecast for the period (t + 1) is equal to the actual demand for the period (t) plus
the (α) times of the difference of the actual and forecasting value for the period (t).
Here, (α) tries to smoothen the variation in the previous period actual and forecasting
values of the demand. The forecast for (tth) period can be given as:

Ft+1= ( ) ( )

Here, (α) is smoothening factor.

Example 1
Using the data shown in Table below forecast the demand for the periods using the
exponential smoothing method (α = 0.3).

month 1 2 3 4 5 6
demand 600 628 670 735 809 750

Solution:

Demand Forecast( )
Month
Ft+1 ( )
(xt) ( )
1 600 600
2 628 600 + 0.3(600 – 600) = 600
3 670 600 + 0.3(628 – 600) = 608.4
4 735 608.4 + 0.3(670 – 608.4) = 626.8
5 809 626.8 + 0.3(735 – 626.8) = 659.3
6 750 659.3+0.3(809-659.3)= 704.2

2
Example 2
It is currently the end of month (2) , at the end of month (1) the manufacturing of an
established brand of child milk forecasted that demand for the milk during month (2)
would be (67)(thousand tins) , whereas the actual demand in month (2) was (76)
(thousand tins) . Calculate an exponential forecast of the demand in month (3), using
(α = 0.2).

Solution:

y2 =76 F2 =67

Ft+1 ( )

F3 ( )

= 67+0.2(76-67)

= 68.8

At the end of month (2), the forecast of demand in month (3), is (68.8) (thousand tins)

3.2 Simple Moving Average Method (SMA)


Suppose (t) represents the current period and we want to forecast for the
period (t + 1). Specifically, the forecast for period (t + 1) can be calculated
at the end of period (t) (after the actual demand for period (t) is known as

Ft+1= (Dt + Dt-1+ Dt+1-n)

Ft+1= ∑

Where (D) indicates the demand and (F) indicates the forecast, (t) is the
time period, (n) is the number of the averaging period.

3
Example 3

The monthly demands for office furniture (in units) are given in table below:

Month(x) 1 2 3 4 5 6 7 8 9 10 11 12
Demand(y) 600 628 670 735 809 870 800 708 842 870 739 -

Forecast the demand using (3-period) and (5-period) SMA for the (12th) month.

Solution:
Ft+1 = ∑
For 3 period

F4 = ( )= ( ) =~ 632

F5 = ( ) = 678

F6 = ( ) = 738

…… F12 = ( ) = 817

For 5 period

F6 = ( )= ( )

=~689
F7 = ( )=

F8 = ( ) = 777

F12 = ( ) = 777

4
month demand 3 period 5 period
1 600 …. …..
2 628 …. …..
3 670 …. …..
4 735 633 …..
5 809 678 …..
6 870 738 689
7 800 805 743
8 708 827 777
9 842 793 785
10 870 784 806
11 739 708 818
12 ….. 817 792

3.3 Simple Linear Regression Method


This is a mathematical technique that relates to one variable, that is, the
independent variable, with another variable called the dependent in the
form of a linear equation. The linear regression equation is
y=a+bx
Where y is the dependent variable, (a) is the intercept, b is the slope of the
line and x is the dependent variable.

a = ̅-b̅

∑ (̅)(̅)
b= ∑ (̅)

Where (a) is a constant, b is a coefficient of variable (x), and ( ̅ ) is the


mean value of (x), ( ̅ ) is the mean value of (y), (x) is time, (y) is the
demand, and (n) is the period for which data is analyzed using linear
regression methods.

5
Example 4
The weekly demands of a motorcycle by a retailer are shown in the table
below forecast and estimate the demand for the (14th) week.

Week 1 2 3 4 5 6 7 8 9 10 11 12
demand 420 450 460 420 500 550 480 520 610 570 600 590

Solution:

week(x) demand(y) Xy x2 yt
1 420 420 1 419.4
2 450 900 4 436.63
3 460 1380 9 453.8
4 420 1680 16 471.09
5 500 2500 25 488.3
6 550 3300 36 505.5
7 480 3360 49 522.7
8 520 4160 64 540.01
9 610 5490 81 557.24
10 570 5700 100 574.4
11 600 6600 121 591.17
12 950 7080 144 608.93
2
Σx = 78 Σy = 6170 Σxy = 42,570 Σx = 650

∑ ( ̅)( ̅ ) ( )( )
b= ∑
= = 17.23
( ̅) ( )

a = ̅-b ̅
= 514.1667 – 17.23(6.5)
= 402.17

y =402.17-17.23x
x=1
y1= 402.17 – 17.23(1)
= 419.4

F14= 402.17 – 17.23(14)


= 643.39
6
4- How good are the forecast?
 A good forecasting result in small errors and bad forecasting give large errors.
 It is sensible to use a criterion based on the errors ( ) to compare
different forecasting methods.
 There are (n-1) errors because is not available because no forecast of (y1) at
time (0).
 Two criterion are most common :

1- Mean squared error (MSE).

2- Mean absolute error (MAE)

∑ | |

Example 5
Forecast for the following data using exponential forecast using (α = 0.2)
and find MSE & MAE.

month(xt) 1 2 3 4 5 6 7
demand(yt) 67 76 83 78 68 59 69

Solution:
xt yt Ft et = | |
1 67 67 or …. …. …. ….
2 76 67 9 81 9
3 83 68.8 14.20 201.64 14.20
4 78 71.64 6.36 40.45 6.36
5 68 72.91 -4.91 24.1 4.91
6 59 71.93 -12.93 176.1 12.93
7 69 69.34 0.34 0.115 0.34

∑ =200.31 ∑| |

7
Ft+1 ( )
F2 = 67+0.2(76-67) = 68.8
F3 = 68.8 +0.2(83-68.8) = 71.64
F4= 71.64+0.2(78-71.64) = 72.91


= = 25.03

∑ | |
MAE = =

Example 6

Using table below to find MSE&MAE

Week (xt) 1 2 3 4 5 6 7 8 9 10 11 12
Demand (yt) 420 450 460 420 500 550 480 520 610 570 600 590

Solution:

(xt) (yt) (Ft) et = | |


1 420 419.4 0.6 0.36 0.6
2 450 436.63 13.37 178.75 13.37
3 460 453.86 6.14 37.69 6.14
4 420 471.09 51.09 2610.18 51.09
5 500 488.32 11.68 136.42 11.68
6 550 505.55 44.45 1975.80 44.45
7 480 522.78 42.78 1830.12 42.78
8 520 540.01 20.01 400.40 20.01
9 610 557.24 52.76 2783.61 52.76
10 570 574.47 4.47 19.98 4.47
11 600 591.17 8.83 77.96 8.83
12 590 608.93 18.93 358.34 18.93


= = 867.46

∑ | |
MAE = =

You might also like