Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Chapter 1 what’s forecasting 1

Forecasting
- Depends on variables related to the past and the present to find what the best
prediction of these variables is.
- Forecasting is a result of unknown future.
- Help to inform decisions and provide a guide to long term strategic planning.
Forecasting, goals, and planning
Forecasting
- Predicting the future as accurate as possible with all available information.
Goals
- What you would like to happen.
- Goals are set without any plans to achieve them.
Planning
- A response involves determining the appropriate actions to make matching
between forecasts and goals.
Types of forecasting
 According to time horizon
Short-term
- Scheduling of personal
- Production
- Transportation
Medium-term
- Determining future resources requirements
- Purchase raw materials
- Hire personal
- Buy machinery & equipment
Long-term
- Used in strategic planning
- Decisions must take account of:
 Market opportunities
 Environmental factors
 Internal resources
 According to data type
Quantitative
- Sufficient quantitative information is available
Qualitative
- Little or no quantitative information is available
- But sufficient qualitative knowledge exists

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 2

Unpredictable
- Little or no information is available
Quantitative forecasting can be applied when three conditions exist
1- Information about the past is available
2- The information can be quantified in the form of numerical data
3- It can be assumed that some aspects of the past pattern will continue in the future
Quantitative data
It has a wide range of methods developed with in specific purpose each method has
its own properties, accuracies, and costs that we consider when we choosing a
specific method. Most problems use either time series data or cross-sectional data.
Time series data
- Collected at regular intervals over time
Cross-sectional data
- Collected at a single point in time
Cross-sectional forecasting
Used to predict the value of something we have not observed, using the information on
the cases that we have observed.
Example
House prices for all houses sold in 2011 in a particular area
- We are interested in predicting the price of a house not in our data set using
various house characteristics
 Position
 Number of bed rooms
 Age
Time series forecasting
- Used when you are forecasting something that is changing over time
Example
 Daily IBM stock price
 Monthly rainfall
 Quarterly sales results for amazon
 Annual google profits

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 3

Graphical presentation
Graphs enable many features of the data to be visualized including patterns, unusual
observations, changes over time, and relationship between variables.

 Time plot
- For time series, the most
obvious graphical form is a
time plot in which the data are
plotted over time.

 Seasonal plot
- It’s similar to a time plot except that
the data are plotted against the
individual “seasons” in which the
data were observed

 Scatter plot
- Show how much one variable is
affected by another. The relationship
between two variables is called their
correlation.
- We put the variable we want to
forecast (response or dependent)
against one of the explanatory
(independent) variables

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 4

The basic steps in a forecasting task


Problem definition
- requires an understanding of the way the forecasts will be used
- Who requires the forecasts
- how the forecasting function fits within the organization
- A forecaster needs to spend time talking to everyone who will be involved in
collecting data, maintaining databases, and using the forecasts for future planning.
Gathering information
- There are always at least two kinds of information required
- Statistical data.
- The accumulated expertise of the people who collect the data and use the
forecasts.
 Very old data will be less useful due to changes in the system
being forecast.
Preliminary (exploratory or independent) analysis
- starting with graphing the data
- Are there consistent patterns?
- Is there evidence of the presence of business cycles?
- Are there any outliers in the data that need to be explained by those with
expert knowledge?
- How strong are the relationships among the variables available for
analyses?
Choosing and fitting models
- the availability of historical data
- the strength of relationships between the forecasts variable and any
explanatory variables
- It is common to compare two or three potential models
- Each models is itself an artificial construct(explicit and implicit)
Using and evaluating a forecasting
- Once a model has been selected and its parameters estimated, the model is
used to make forecasts.
- A number of methods have been developed to help in assessing the
accuracy of forecasts.
- There are also organizational issues in using and acting on the forecasts.

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 5

Some important statistical tools used for forecasting


Mean ̅ = ∑𝒀
𝒀 𝒏
𝒎𝒊𝒅𝒅𝒍𝒆 𝒐𝒃𝒔𝒆𝒓𝒗𝒂𝒕𝒊𝒐𝒏 𝒊𝒇 𝒏 𝒐𝒅𝒅;
𝐌𝐞𝐝𝐢𝐚𝐧 { 𝒂𝒗𝒆𝒓𝒂𝒈𝒆 𝒐𝒇 𝒎𝒊𝒅𝒅𝒍𝒆 𝒕𝒘𝒐
𝒐𝒃𝒔𝒆𝒓𝒗𝒂𝒕𝒊𝒐𝒏 𝒊𝒇 𝒏 𝒆𝒗𝒆𝒏

MAD =
̅|
∑|𝒀 − 𝒀
𝒏
̅ )𝟐
∑(𝒀−𝒀
MSD =
𝒏

̅ )𝟐
∑(𝒀−𝒀
𝒔𝟐 = 𝒏−𝟏

̅ )𝟐
∑(𝒀−𝒀
𝒔 = √𝒔𝟐 = √ 𝒏−𝟏

Example
Consider the mileage of the 19 Japanese cars given in the following table.
The vehicles have been numbered from 1 to 19 for easy reference.
Make Vehicle Mileage
Mazda MPV V6 1 19
Nissan Van 4 2 19
Acura Legend V6 3 20
Mitsubishi Wagon 4 4 20
Nissan Axxess 4 5 20
Mitsubishi Sigma V6 6 21
Nissan Stanza 4 7 21
Mazda 929 V6 8 21
Nissan Maxima V6 9 22
Toyota Cressida 6 10 23
Nissan 240SX 4 11 24
Subaru Loyale 4 12 25
Mitsubishi Galant 4 13 25
Honda Prelude Si 4WS 4 14 27
Subaru XT 4 15 28
Mazda Protégé 4 16 32
Honda Civic CRX Si 4 17 33
Subaru Justy 3 18 34

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 6

Toyota Tercel 4 19 35
Solution:

V M ̅|
|𝑴 − 𝑴 ̅ )𝟐
(𝑴 − 𝑴

1 19 5.7 32.5

2 19 5.7 32.5

3 20 4.7 22.1

4 20 4.7 22.1

5 20 4.7 22.1

6 21 3.7 13.7

7 21 3.7 13.7

8 21 3.7 13.7

9 22 2.7 7.3

10 23 1.7 2.89

11 24 0.7 0.49

12 25 0.3 0.09

13 25 0.3 0.09

14 27 2.3 5.29

15 28 3.3 10.89

16 32 7.3 53.29

17 33 8.3 68.89

18 34 9.3 86.49

19 35 10.3 106.1

∑ 469 83.1 514.21

̅ = ∑ 𝑴 = 𝟒𝟔𝟗 = 24.7
𝑴 𝒏 𝟏𝟗
𝒏+𝟏 𝟏𝟗+𝟏
𝐦𝐞𝐝𝐢𝐚𝐧 = = = 23
𝟐 𝟐
̅|
∑|𝑴−𝑴 𝟖𝟑.𝟏
MAD = = = 4.37
𝒏 𝟏𝟗

̅)𝟐
∑(𝑴−𝑴 𝟓𝟏𝟒.𝟐𝟏
MSD = = = 27.06
𝒏 𝟏𝟗

̅)𝟐
∑(𝑴−𝑴 𝟓𝟏𝟒.𝟐𝟏
𝒔𝟐 = = = 28.56
𝒏−𝟏 𝟏𝟗 − 𝟏

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 7

𝒔 = √𝒔𝟐 = √𝟐𝟖. 𝟓𝟔 = 5.34


Important definitions
 Univariate data
- For a single data set (univariate data) or a single time series, the most
common descriptive statistics are the mean, the standard deviation, and
the variance.
- One variable whatever it measures.
 Bivariate data
- For a pair of random variables it is of interest to describe how the two data
sets relate to each other.
- The most widely used summary numbers (statistics) for this purpose are the
covariance and the correlation.
- Tow variables whatever it measures.
 Trivariate data
- three variable whatever it measures.
 Multivariate data
- Many of variable whatever it measures.
Covariance
- The mean value of the product of the deviations of two variates from their
respective means.
∑(𝑿−𝑿̅ ) (𝒀−𝒀̅)
𝑪𝑶𝑽 𝑿𝒀 =
𝒏−𝟏
Correlation
- A quantity measuring the extent of the interdependence of variable
quantities.
- Is a statistical technique that can show whether and how strongly pairs of
variables are related.
𝑪𝑶𝑽 𝑿𝒀 ̅ ) (𝒀−𝒀
∑(𝑿−𝑿 ̅)
𝒓 𝑿𝒀 = = ̅ )𝟐 √∑(𝒀−𝒀
̅ )𝟐
𝑺𝑿 𝑺𝒀 √∑(𝑿−𝑿

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 8

Example
The following table shows the price and millage for the Japanese cars given in the previous
example.

Make Vehicle Mileage Price


Mazda MPV V6 1 19 14.944
Nissan Van 4 2 19 14.799
Acura Legend V6 3 20 24.760
Mitsubishi Wagon 4 4 20 14.929
Nissan Axxess 4 5 20 13.949
Mitsubishi Sigma V6 6 21 17.879
Nissan Stanza 4 7 21 11.650
Mazda 929 V6 8 21 23.300
Nissan Maxima V6 9 22 17.899
Toyota Cressida 6 10 23 21.498
Nissan 240SX 4 11 24 13.249
Subaru Loyale 4 12 25 9.599
Mitsubishi Galant 4 13 25 10.989
Honda Prelude Si 4WS 4 14 27 13.945
Subaru XT 4 15 28 13.071
Mazda Protégé 4 16 32 6.599
Honda Civic CRX Si 4 17 33 9.410
Subaru Justy 3 18 34 5.866
Toyota Tercel 4 19 35 6.488

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 9

Solution

V M P ̅)
(𝑴 − 𝑴 ̅)
(𝑷 − 𝑷 ̅ )𝟐
(𝑷 − 𝑷 ̅ ) (𝑷 − 𝑷
(𝑴 − 𝑴 ̅)

1 19 14.944 -5.7 1.006 1.012 -5.734

2 19 14.799 -5.7 1.867 3.485 -10.641

3 20 24.760 -4.7 10.822 117.115 -50.863

4 20 14.929 -4.7 0.991 0.982 -4.657

5 20 13.949 -4.7 0.011 0.0001 -0.051

6 21 17.879 -3.7 3.941 15.531 -14.581

7 21 11.650 -3.7 -2.288 5.234 8.465

8 21 23.300 -3.7 9.362 87.647 -34.639

9 22 17.899 -2.7 3.961 15.689 -10.694

10 23 21.498 -1.7 7.56 57.153 -12.852

11 24 13.249 -0.7 -0.689 0.474 0.482

12 25 9.599 0.3 -4.399 18.826 -1.319

13 25 10.989 0.3 -2.949 8.696 -0.884

14 27 13.945 2.3 0.007 0.00004 0.016

15 28 13.071 3.3 -0.867 0.751 -2.861

16 32 6.599 7.3 -7.399 53.860 -54.012

17 33 9.410 8.3 -4.528 20.502 -37.582

18 34 5.866 9.3 -8.072 65.157 -75.069

19 35 6.488 10.3 -7.45 55.502 -76.735

∑ 469 264.823 527.616 -384.211

̅ = ∑ 𝑷 = 𝟐𝟔𝟒.𝟖𝟐𝟑 = 13.938
𝑷 𝒏 𝟏𝟗
̅) (𝑷−𝑷̅ )
∑(𝑴−𝑴 −𝟑𝟖𝟒.𝟐𝟏𝟏
𝑪𝑶𝑽𝑴𝑷 = = = -21.289
𝒏−𝟏 𝟏𝟗−𝟏

𝑪𝑶𝑽 𝑴𝑷 ̅) (𝑷−𝑷̅ )
∑(𝑴−𝑴 −𝟑𝟖𝟒.𝟐𝟏𝟏 −𝟑𝟖𝟒.𝟐𝟏𝟏
𝒓 𝑴𝑷 = = = = 𝟓.𝟑𝟒∗𝟐𝟐.𝟗𝟔 = -122.659
𝑺𝑴 𝑺𝑷 ̅)𝟐 √∑(𝑷−𝑷̅ )𝟐
√∑(𝑴−𝑴 √𝟓𝟏𝟒.𝟐𝟏√𝟓𝟐𝟕.𝟔𝟏𝟔

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 10

Forecast accuracy measures


 How to measure the suitability of a particular forecasting method for a given
data set?
- Accuracy is treated as the overriding criterion for selecting a forecasting
method.
- The word “accuracy” refers to “goodness of fit”.
- That refers to how well the forecasting model is able to reproduce the data
that are already known.
- To the consumer of forecasts, it is the accuracy of the future forecast that
is most important.
Mean error
If 𝑌𝑡 is the actual observation for time period t and 𝐹𝑡 is the forecast for the same period,
then the error is defined as: a measure of difference between two continuous variables.
General role

𝒆𝒕 = 𝒀𝒕 − 𝑭𝒕 𝒐𝒓 ̂𝒕
𝒆𝒕 = 𝒀𝒕 − 𝒀
If there are observations and forecasts for n time periods, then there will be n error terms,
and the following standard statistical measures can be defined:

MEAN ERROR
𝒏
𝟏
𝑴𝑬 = ∑ 𝒆𝒕
𝒏
𝒕=𝟏

MEAN ABSOLUTE ERROR


𝒏
𝟏
𝑴𝑨𝑬 = ∑|𝒆𝒕 |
𝒏
𝒕=𝟏
MEAN SQUARED ERROR
𝒏
𝟏
𝑴𝑺𝑬 = ∑ 𝒆𝟐𝒕
𝒏
𝒕

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 11

Example
The following table shows the last 8 months of observations (January to August 2018) of
cotton production (in thousands of tons). The second column shows forecasts F or these
values, obtained using a simple method.

Period Observation Forecast


t 𝒀𝒕 ̂𝒕
𝑭𝒕 𝒐𝒓 𝒀
1 138 150.25
2 136 139.50
3 152 157.25
4 127 143.50
5 151 138.00
6 130 127.50
7 119 138.25
8 153 141.50
9 ––– 140.50
10 ––– 167.25

Relative or Percentage error


Each of previous statistics deals with measure of accuracy whose size depends on the
scale of the data. Therefore, they don't facilitate comparison across different time series
and for different time intervals. To make comparisons like these, we need to work with
relative or percentage error measures. First we need to define a relative or percentage
error as
𝒀𝒕 − 𝑭𝒕
𝑷𝑬𝒕 ( ) × 𝟏𝟎𝟎
𝒀𝒕
Then the following two relative measures are frequently used

MEAN PERSENTAGE ERROR


𝒏
𝟏
𝑴𝑷𝑬 = ∑ 𝑷𝑬𝒕
𝒏
𝒕=𝟏
MEAN ABSOLUTE PERSENTAGE ERROR
𝒏
𝟏
𝑴𝑨𝑷𝑬 = ∑|𝑷𝑬𝒕 |
𝒏
𝒕=𝟏

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 12

Example
Using the data in the previous example, find PE, MPE, AND MAPE.

Period Observation Forecast


t 𝒀𝒕 ̂𝒕
𝑭𝒕 𝒐𝒓 𝒀
1 138 150.25
2 136 139.50
3 152 157.25
4 127 143.50
5 151 138.00
6 130 127.50
7 119 138.25
8 153 141.50
9 ––– 140.50
10 ––– 167.25

U-Theil’s statistic
It is a proportional measure. Compare two forecast methods; simple model (naïve model)
and more advanced model.

2
𝐹𝑡+1 − 𝑌𝑡+1
∑𝑛−1
𝑡=1( )
𝑌𝑡
𝑈= √ 2
𝐹𝑡+1 − 𝑌𝑡
∑𝑛−1
𝑡=1( )
𝑌𝑡
We can conclude that, if:
1- U= 1, the simple model is sufficient.
2- U< 1, the simple model is not sufficient. The more small U, the more
insufficient the simple model.
3- U> 1, the simple method gives better results

Mahmoud soliman 01 22 22 47 596


Chapter 1 what’s forecasting 13

Example
Using the data in the previous example, find U-Theil’s statistic.

Period Observation Forecast


t 𝒀𝒕 ̂𝒕
𝑭𝒕 𝒐𝒓 𝒀
1 138 150.25
2 136 139.50
3 152 157.25
4 127 143.50
5 151 138.00
6 130 127.50
7 119 138.25
8 153 141.50
9 ––– 140.50
10 ––– 167.25

Mahmoud soliman 01 22 22 47 596

You might also like