Escolar Documentos
Profissional Documentos
Cultura Documentos
=
] ) ( ) ( ][ ) ( ) ( [
2 2 2 2
y y n x x n
y x xy n
r
Simple Linear Regression
Simple linear regression analysis
analyzes the linear relationship that exists
between two variables.
bx a y + =
where:
y = Value of the dependent variable
x = Value of the independent variable
a = Populations y-intercept
b = Slope of the population regression line
Simple Linear Regression
The coefficients of the line are
or
=
2 2
) ( x x n
y x xy n
b
x b y a =
y b x
a
n
=
Problem 7
- The manager of a seafood restaurant was
asked to establish a pricing policy on
lobster dinners. Experimenting with
prices produced the following data:
- Create the scatter plot and determine if
a linear relationship is appropriate.
- Determine the correlation coefficient
and interpret it
- Obtain the regression line and interpret
its coefficients.
Sold (y) Price (x)
200 6.00
190 6.50
188 6.75
180 7.00
170 7.25
162 7.50
160 8.00
155 8.25
156 8.50
148 8.75
140 9.00
133 9.25
Forecast Accuracy
- Source of forecast errors:
- Model may be inadequate
- Irregular variations
- Incorrect use of forecasting technique
- Random variation
- Key to validity is randomness
- Accurate models: random errors
- Invalid models: nonrandom errors
- Key question: How to determine if forecasting
errors are random?
Error measures
- Error - difference between actual value and predicted
value
- Mean Absolute Deviation (MAD)
- Average absolute error
- Mean Squared Error (MSE)
- Average of squared error
- Mean Absolute Percent Error (MAPE)
- Average absolute percent error
MAD, MSE, and MAPE
MAD =
Actual forecast
n
MSE =
Actual forecast)
- 1
2
n
(
Actual Forecast
100
Actual
MAPE
n
Example
Period Actual Forecast (A-F) |A-F| (A-F)^2 (|A-F|/Actual)*100
1 217 215 2 2 4 0.92
2 213 216 -3 3 9 1.41
3 216 215 1 1 1 0.46
4 210 214 -4 4 16 1.90
5 213 211 2 2 4 0.94
6 219 214 5 5 25 2.28
7 216 217 -1 1 1 0.46
8 212 216 -4 4 16 1.89
-2 22 76 10.26
MAD= 2.75
MSE= 10.86
MAPE= 1.28
Controlling the Forecast
- Control chart
- A visual tool for monitoring forecast errors
- Used to detect non-randomness in errors
- Forecasting errors are in control if
- All errors are within the control limits
- No patterns, such as trends or cycles, are present
Controlling the forecast
Control charts
- Control charts are based on the following
assumptions:
- when errors are random, they are Normally
distributed around a mean of zero.
- Standard deviation of error is
- 95.5% of data in a normal distribution is within 2
standard deviation of the mean
- 99.7% of data in a normal distribution is within 3
standard deviation of the mean
- Upper and lower control limits are often determine
via
MSE
0 2 0 3 MSE or MSE
Example
- Compute 2s control limits for
forecast errors of previous
example and determine if the
forecast is accurate.
- Errors are all between -6.59
and +6.59
- No pattern is observed
- Therefore, according to control
chart criterion, forecast is
reliable
-6.59
-4.59
-2.59
-0.59
1.41
3.41
5.41
0 10
3.295
2 6.59
s MSE
s
= =
=
Problem 8
- The manager of a travel agency has
been using a seasonally adjusted
forecast to predict demand for
packaged tours. The actual and
predicted values are
- Compute MAD, MSE, and MAPE.
- Determine if the forecast is working
using a control chart with 2s limits. Use
data from the first 8 periods to develop
the control chart, then evaluate the
remaining data with the control chart.
Period Demand Predicted
1 129 124
2 194 200
3 156 150
4 91 94
5 85 80
6 132 140
7 126 128
8 126 124
9 95 100
10 149 150
11 98 94
12 85 80
13 137 140
14 134 128
Problem
- Given the following demand data, prepare a nave
forecast for periods 2 through 10. Then determine each
forecast error, and use those values to obtain 2s control
limits. If demand in the next two periods turns out to be
125 and 130, can you conclude that the forecasts are in
control?
Period 1 2 3 4 5 6 7 8 9 10
Demand 118 117 120 119 126 122 117 123 121 124
Choosing a Forecasting Technique
- No single technique works in every situation
- Two most important factors
- Cost
- Accuracy
- Other factors include the availability of:
- Historical data
- Computers
- Time needed to gather and analyze the data
- Forecast horizon