<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/cp/onlinemanual/000113" xml:lang="en">
   <Header>
      <Title>Forecast errors and seasonal correlation</Title>
      <Keyword type="header" order="d1e190952">
         <Level1>Forecast errors and seasonal correlation</Level1>
      </Keyword>
      <Keyword type="header" order="d1e190955">
         <Level1>Seasonal correlation</Level1>
      </Keyword>
   </Header>
   <GeneralSection>
      <Paragraph>After LN calculates
      the demand forecast for a plan item, LN determines the forecast errors and
      any seasonal correlation.</Paragraph>
      <List>
         <ListIntro>LN calculates the following fields in the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000" role="session">Plan Items - Forecast Settings (cpdsp1110m000)</GUIRef> session:</ListIntro>
         <ListItem> 
            <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.afce" role="manual">Average Forecast Error</GUIRef> (AFCE)</ListItem>
         <ListItem> 
            <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.madf" role="manual">Mean Absolute Deviation</GUIRef> (MAD)</ListItem>
         <ListItem> 
            <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.mrdf" role="manual">Mean Relative Deviation</GUIRef> (MRD)</ListItem>
         <ListItem> 
            <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.sdev" role="manual">Standard Deviation</GUIRef> (SDEV)</ListItem>
         <ListItem> 
            <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.scrf" role="manual">Seasonal Correlation Factor</GUIRef> (COR)</ListItem>
      </List>
      <Paragraph>The calculations are
      based on the following formulas:</Paragraph>
      <GeneralSection>
         <SectionTitle>Average forecast error</SectionTitle>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>AFCE = sum(FD(t) - AD(t)) / n</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="5">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">AFCE</TD>
                  <TD rowspan="1" colspan="1">the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.afce" role="manual">Average Forecast Error</GUIRef> field</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">sum()</TD>
                  <TD rowspan="1" colspan="1">the sum of all historical periods</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">FD(t)</TD>
                  <TD rowspan="1" colspan="1">the forecast demand for period t</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">AD(t)</TD>
                  <TD rowspan="1" colspan="1">the actual demand for period t</TD>
               </TR>
               <TR no="5" isLast="true">
                  <TD rowspan="1" colspan="1">n</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods</TD>
               </TR>
            </TBODY>
         </TABLE>
      </GeneralSection>
      <GeneralSection>
         <SectionTitle>Mean absolute forecast error</SectionTitle>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>MAD = sum(abs(FD(t) -	 AD(t))) / n</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="6">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">MAD</TD>
                  <TD rowspan="1" colspan="1">the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.madf" role="manual">Mean Absolute Deviation</GUIRef> field</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">sum()</TD>
                  <TD rowspan="1" colspan="1">the sum of all historical periods</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">abs(FD(t)-AD(t))</TD>
                  <TD rowspan="1" colspan="1">the absolute value of (FD(t)-AD(t))</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">FD(t)</TD>
                  <TD rowspan="1" colspan="1">the forecast demand for period t</TD>
               </TR>
               <TR no="5" isLast="false">
                  <TD rowspan="1" colspan="1">AD(t)</TD>
                  <TD rowspan="1" colspan="1">the actual demand for period t</TD>
               </TR>
               <TR no="6" isLast="true">
                  <TD rowspan="1" colspan="1">n</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods</TD>
               </TR>
            </TBODY>
         </TABLE>
      </GeneralSection>
      <GeneralSection>
         <SectionTitle>Mean relative forecast error</SectionTitle>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>MRD = sum(100 * abs((FD(t) - AD(t))) / AD(t)) / n</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="5">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">MRD</TD>
                  <TD rowspan="1" colspan="1">
                     <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.mrdf" role="manual">Mean Relative Deviation</GUIRef>
                  </TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">sum</TD>
                  <TD rowspan="1" colspan="1">the sum of all historical periods</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">FD(t)</TD>
                  <TD rowspan="1" colspan="1">the forecast demand for period t</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">AD(t)</TD>
                  <TD rowspan="1" colspan="1">he actual demand for period t</TD>
               </TR>
               <TR no="5" isLast="true">
                  <TD rowspan="1" colspan="1">n</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods</TD>
               </TR>
            </TBODY>
         </TABLE>
      </GeneralSection>
      <GeneralSection>
         <SectionTitle>Standard deviation of the forecast error</SectionTitle>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>SDEV = sqr(sum(((FD(t) - AD(t)) - AFCE)^2) / (n - 1))</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="7">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">SDEV</TD>
                  <TD rowspan="1" colspan="1">the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.sdev" role="manual">Standard Deviation</GUIRef> field</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">sqr()</TD>
                  <TD rowspan="1" colspan="1">the square root</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">sum()</TD>
                  <TD rowspan="1" colspan="1">the sum of all historical periods</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">FD(t)</TD>
                  <TD rowspan="1" colspan="1">the forecast demand for period t</TD>
               </TR>
               <TR no="5" isLast="false">
                  <TD rowspan="1" colspan="1">AD(t)</TD>
                  <TD rowspan="1" colspan="1">the actual demand for period t</TD>
               </TR>
               <TR no="6" isLast="false">
                  <TD rowspan="1" colspan="1">AFCE</TD>
                  <TD rowspan="1" colspan="1">the mean forecast error</TD>
               </TR>
               <TR no="7" isLast="true">
                  <TD rowspan="1" colspan="1">n</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods</TD>
               </TR>
            </TBODY>
         </TABLE>
      </GeneralSection>
      <GeneralSection>
         <SectionTitle>Seasonal correlation</SectionTitle>
         <Paragraph>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.</Paragraph>
         <Figure space-and-orientation="indented-estimated">
            <FigIntro>The following diagram illustrates this for a season length of
			 one month.</FigIntro>
            <HTML:IMG xmlns:HTML="http://www.w3.org/TR/REC-html40" height="144" width="576"
                      SRC="../images/nt_flow_000113.gif"
                      alt="[...]"/>
            <FigLegend>
               <LegendEntry>
                  <Symbol>A</Symbol>
                  <Desc>Data set 1</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>B</Symbol>
                  <Desc>Data set 2</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>1</Symbol>
                  <Desc>January</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>2</Symbol>
                  <Desc>February</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>3</Symbol>
                  <Desc>March</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>4</Symbol>
                  <Desc>April</Desc>
               </LegendEntry>
               <LegendEntry>
                  <Symbol>5</Symbol>
                  <Desc>May</Desc>
               </LegendEntry>
            </FigLegend>
         </Figure>
         <GeneralSection>
            <SectionTitle>Standard deviations:</SectionTitle>
            <Formula space-and-orientation="indented-estimated">
               <Paragraph>SDV1 = sqr(sum(((DM(t) - DM1)^2) / (m - 1)) SDV2 =
			 sqr(sum(((DM(t+L) - DM2)^2) / (m - 1))</Paragraph>
            </Formula>
         </GeneralSection>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="9">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">SDV1</TD>
                  <TD rowspan="1" colspan="1">the standard deviation for data set one</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">SDV2</TD>
                  <TD rowspan="1" colspan="1">the standard deviation for data set two</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">sqr()</TD>
                  <TD rowspan="1" colspan="1">the square root</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">sum()</TD>
                  <TD rowspan="1" colspan="1">the sum for all historical periods</TD>
               </TR>
               <TR no="5" isLast="false">
                  <TD rowspan="1" colspan="1">DM(t)</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted actual demand for period t (*)</TD>
               </TR>
               <TR no="6" isLast="false">
                  <TD rowspan="1" colspan="1">DM1</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted average demand for data set one (*)</TD>
               </TR>
               <TR no="7" isLast="false">
                  <TD rowspan="1" colspan="1">DM2</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted average demand for data set two (*)</TD>
               </TR>
               <TR no="8" isLast="false">
                  <TD rowspan="1" colspan="1">L</TD>
                  <TD rowspan="1" colspan="1">the season length in periods</TD>
               </TR>
               <TR no="9" isLast="true">
                  <TD rowspan="1" colspan="1">m</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods minus the season length in
              periods</TD>
               </TR>
            </TBODY>
         </TABLE>
         <Paragraph>(*) For the
        calculation of the trend-adjusted average demand, see <Link href="/baanerp/cp/onlinemanual/000111" role="manual">Forecast method: polynomial regression</Link>.</Paragraph>
         <Paragraph>LN determines the
        covariance factor for the two sets of data.</Paragraph>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>COV = sum((DM(t) - DM1) x (DM(t+L) - DM2) / (m - 1))</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="7">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">COV</TD>
                  <TD rowspan="1" colspan="1">covariance factor</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">sum</TD>
                  <TD rowspan="1" colspan="1">the sum of all periods minus the season length in periods</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">DM(t)</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted actual demand for period t</TD>
               </TR>
               <TR no="4" isLast="false">
                  <TD rowspan="1" colspan="1">DM1</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted average demand for data set one</TD>
               </TR>
               <TR no="5" isLast="false">
                  <TD rowspan="1" colspan="1">DM2</TD>
                  <TD rowspan="1" colspan="1">the trend-adjusted average demand for data set two</TD>
               </TR>
               <TR no="6" isLast="false">
                  <TD rowspan="1" colspan="1">L</TD>
                  <TD rowspan="1" colspan="1">the season length in periods</TD>
               </TR>
               <TR no="7" isLast="true">
                  <TD rowspan="1" colspan="1">m</TD>
                  <TD rowspan="1" colspan="1">the number of historical periods minus the season length in
              periods</TD>
               </TR>
            </TBODY>
         </TABLE>
         <Paragraph>Finally, the seasonal
        correlation factor is computed as follows:</Paragraph>
         <Formula space-and-orientation="indented-estimated">
            <Paragraph>COR = COV / (SDV1 x SDV2)</Paragraph>
         </Formula>
         <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
            <TBODY noTR="4">
               <TR no="1" isLast="false">
                  <TD rowspan="1" colspan="1">COR</TD>
                  <TD rowspan="1" colspan="1">the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.scrf" role="manual">Seasonal Correlation Factor</GUIRef> field</TD>
               </TR>
               <TR no="2" isLast="false">
                  <TD rowspan="1" colspan="1">COV</TD>
                  <TD rowspan="1" colspan="1">covariance factor</TD>
               </TR>
               <TR no="3" isLast="false">
                  <TD rowspan="1" colspan="1">SDV1</TD>
                  <TD rowspan="1" colspan="1">standard deviation for data set one</TD>
               </TR>
               <TR no="4" isLast="true">
                  <TD rowspan="1" colspan="1">SDV2</TD>
                  <TD rowspan="1" colspan="1">standard deviation for data set two</TD>
               </TR>
            </TBODY>
         </TABLE>
      </GeneralSection>
   </GeneralSection>
   <RelatedTopics>
      <SectionTitle>Related topics</SectionTitle>
      <RelTopic>
         <Link href="/baanerp/cp/onlinemanual/000079" role="manual">Algorithm for demand forecasting</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/cp/onlinemanual/000321" role="manual">Forecasting methods</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/cp/onlinemanual/000111" role="manual">Forecast method: polynomial regression</Link>
      </RelTopic>
   </RelatedTopics>
</ManualTopic>