| # Forecast errors and seasonal correlation After LN calculates the demand forecast for a plan item, LN determines the forecast errors and any seasonal correlation. LN calculates the following fields in the Plan Items - Forecast Settings (cpdsp1110m000) session: Average Forecast Error (AFCE) Mean Absolute Deviation (MAD) Mean Relative Deviation (MRD) Standard Deviation (SDEV) Seasonal Correlation Factor (COR) The calculations are based on the following formulas: Average forecast error
    AFCE = sum(FD(t) - AD(t)) / n
AFCE | the Average Forecast Error field
sum() | the sum of all historical periods
FD(t) | the forecast demand for period t
AD(t) | the actual demand for period t
n | the number of historical periods
Mean absolute forecast error
    MAD = sum(abs(FD(t) -	 AD(t))) / n
MAD | the Mean Absolute Deviation field
sum() | the sum of all historical periods
abs(FD(t)-AD(t)) | the absolute value of (FD(t)-AD(t))
FD(t) | the forecast demand for period t
AD(t) | the actual demand for period t
n | the number of historical periods
Mean relative forecast error
    MRD = sum(100 * abs((FD(t) - AD(t))) / AD(t)) / n
MRD | Mean Relative Deviation
sum | the sum of all historical periods
FD(t) | the forecast demand for period t
AD(t) | he actual demand for period t
n | the number of historical periods
Standard deviation of the forecast error
    SDEV = sqr(sum(((FD(t) - AD(t)) - AFCE)^2) / (n - 1))
SDEV | the Standard Deviation field
sqr() | the square root
sum() | the sum of all historical periods
FD(t) | the forecast demand for period t
AD(t) | the actual demand for period t
AFCE | the mean forecast error
n | the number of historical periods
Seasonal correlation LN determines the standard deviation from the actual demand for two sets of data. Data set one consists of the periods from the first period to the last period minus the season length in periods. Data set two consists of the periods from the first period after the season length in periods up to the last period. In other words, data set two is shifted by a season length compared to data set one. The following diagram illustrates this for a season length of one month.
A | Data set 1
B | Data set 2
1 | January
2 | February
3 | March
4 | April
5 | May
Standard deviations:
    SDV1 = sqr(sum(((DM(t) - DM1)^2) / (m - 1)) SDV2 =
    			 sqr(sum(((DM(t+L) - DM2)^2) / (m - 1))
SDV1 | the standard deviation for data set one
SDV2 | the standard deviation for data set two
sqr() | the square root
sum() | the sum for all historical periods
DM(t) | the trend-adjusted actual demand for period t (*)
DM1 | the trend-adjusted average demand for data set one (*)
DM2 | the trend-adjusted average demand for data set two (*)
L | the season length in periods
m | the number of historical periods minus the season length in periods
(*) For the calculation of the trend-adjusted average demand, see Forecast method: polynomial regression. LN determines the covariance factor for the two sets of data.
    COV = sum((DM(t) - DM1) x (DM(t+L) - DM2) / (m - 1))
COV | covariance factor
sum | the sum of all periods minus the season length in periods
DM(t) | the trend-adjusted actual demand for period t
DM1 | the trend-adjusted average demand for data set one
DM2 | the trend-adjusted average demand for data set two
L | the season length in periods
m | the number of historical periods minus the season length in periods
Finally, the seasonal correlation factor is computed as follows:
    COR = COV / (SDV1 x SDV2)
COR | the Seasonal Correlation Factor field
COV | covariance factor
SDV1 | standard deviation for data set one
SDV2 | standard deviation for data set two
Related topics Algorithm for demand forecasting Forecasting methods Forecast method: polynomial regression |