<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/cp/onlinemanual/000113" xml:lang="en">
	<Header>
		<Title xmlns:ssa="http://www.ssaglobal.com" xmlns:HTML="http://www.w3.org/TR/REC-html40">Forecast errors and seasonal correlation</Title>
		<Keyword><Level1>Forecast errors and seasonal correlation</Level1>
		</Keyword>
		<Keyword><Level1>Seasonal correlation</Level1>
		</Keyword>
	</Header>
	<GeneralSection><Paragraph>After SSA ERP calculates the demand forecast for a plan item, SSA ERP determines the forecast errors and any seasonal correlation.</Paragraph>
		<List><ListIntro>SSA ERP 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="formfield">Average Forecast Error</GUIRef> (AFCE)</ListItem>
			<ListItem><GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.madf" role="formfield">Mean Absolute Deviation</GUIRef> (MAD)</ListItem>
			<ListItem><GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.mrdf" role="formfield">Mean Relative Deviation</GUIRef> (MRD)</ListItem>
			<ListItem><GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.sdev" role="formfield">Standard Deviation</GUIRef> (SDEV)</ListItem>
			<ListItem><GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.scrf" role="formfield">Seasonal Correlation Factor</GUIRef> (COR)</ListItem>
		</List>
		<Paragraph>The calculations are based on the following formulas:</Paragraph>
		<GeneralSection><SectionTitle>Average forecast error</SectionTitle>
			<Formula><Paragraph UserLevel="Novice" UserType="Taskuser">AFCE = sum(FD(t) - AD(t)) / n</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>AFCE</TD>
						<TD>the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.afce" role="formfield">Average Forecast Error</GUIRef> field</TD>
					</TR>
					<TR><TD>sum()</TD>
						<TD>the sum of all historical periods</TD>
					</TR>
					<TR><TD>FD(t)</TD>
						<TD>the forecast demand for period t</TD>
					</TR>
					<TR><TD>AD(t)</TD>
						<TD>the actual demand for period t</TD>
					</TR>
					<TR><TD>n</TD>
						<TD>the number of historical periods</TD>
					</TR>
				</TBODY>
			</TABLE>
		</GeneralSection>
		<GeneralSection><SectionTitle>Mean absolute forecast error</SectionTitle>
			<Formula><Paragraph UserLevel="Novice" UserType="Taskuser">MAD = sum(abs(FD(t) -	 AD(t))) / n</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>MAD</TD>
						<TD>the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.madf" role="formfield">Mean Absolute Deviation</GUIRef> field</TD>
					</TR>
					<TR><TD>sum()</TD>
						<TD>the sum of all historical periods</TD>
					</TR>
					<TR><TD>abs(FD(t)-AD(t))</TD>
						<TD>the absolute value of (FD(t)-AD(t))</TD>
					</TR>
					<TR><TD>FD(t)</TD>
						<TD>the forecast demand for period t</TD>
					</TR>
					<TR><TD>AD(t)</TD>
						<TD>the actual demand for period t</TD>
					</TR>
					<TR><TD>n</TD>
						<TD>the number of historical periods</TD>
					</TR>
				</TBODY>
			</TABLE>
		</GeneralSection>
		<GeneralSection><SectionTitle>Mean relative forecast error</SectionTitle>
			<Formula><Paragraph UserLevel="Novice" UserType="Taskuser">MRD = sum(100 * abs((FD(t) - AD(t))) / AD(t)) / n</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>MRD</TD>
						<TD><GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.mrdf" role="formfield">Mean Relative Deviation</GUIRef>
						</TD>
					</TR>
					<TR><TD>sum</TD>
						<TD>the sum of all historical periods</TD>
					</TR>
					<TR><TD>FD(t)</TD>
						<TD>the forecast demand for period t</TD>
					</TR>
					<TR><TD>AD(t)</TD>
						<TD>he actual demand for period t</TD>
					</TR>
					<TR><TD>n</TD>
						<TD>the number of historical periods</TD>
					</TR>
				</TBODY>
			</TABLE>
		</GeneralSection>
		<GeneralSection><SectionTitle>Standard deviation of the forecast error</SectionTitle>
			<Formula><Paragraph UserLevel="Novice" UserType="Taskuser">SDEV = sqr(sum(((FD(t) - AD(t)) - AFCE)^2) / (n - 1))</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>SDEV</TD>
						<TD>the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.sdev" role="formfield">Standard Deviation</GUIRef> field</TD>
					</TR>
					<TR><TD>sqr()</TD>
						<TD>the square root</TD>
					</TR>
					<TR><TD>sum()</TD>
						<TD>the sum of all historical periods</TD>
					</TR>
					<TR><TD>FD(t)</TD>
						<TD>the forecast demand for period t</TD>
					</TR>
					<TR><TD>AD(t)</TD>
						<TD>the actual demand for period t</TD>
					</TR>
					<TR><TD>AFCE</TD>
						<TD>the mean forecast error</TD>
					</TR>
					<TR><TD>n</TD>
						<TD>the number of historical periods</TD>
					</TR>
				</TBODY>
			</TABLE>
		</GeneralSection>
		<GeneralSection><SectionTitle>Seasonal correlation</SectionTitle>
			<Paragraph>SSA ERP 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><FigIntro>The following diagram illustrates this for a season length of one month.</FigIntro>
				<HTML:IMG SRC="../images/nt_flow_000113.gif" height="144" width="576" xmlns:ssa="http://www.ssaglobal.com" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><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><Paragraph UserLevel="Novice" UserType="Taskuser">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"><TBODY><TR><TD>SDV1</TD>
						<TD>the standard deviation for data set one</TD>
					</TR>
					<TR><TD>SDV2</TD>
						<TD>the standard deviation for data set two</TD>
					</TR>
					<TR><TD>sqr()</TD>
						<TD>the square root</TD>
					</TR>
					<TR><TD>sum()</TD>
						<TD>the sum for all historical periods</TD>
					</TR>
					<TR><TD>DM(t)</TD>
						<TD>the trend-adjusted actual demand for period t (*)</TD>
					</TR>
					<TR><TD>DM1</TD>
						<TD>the trend-adjusted average demand for data set one (*)</TD>
					</TR>
					<TR><TD>DM2</TD>
						<TD>the trend-adjusted average demand for data set two (*)</TD>
					</TR>
					<TR><TD>L</TD>
						<TD>the season length in periods</TD>
					</TR>
					<TR><TD>m</TD>
						<TD>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>SSA ERP determines the covariance factor for the two sets of data.</Paragraph>
			<Formula><Paragraph UserLevel="Novice" UserType="Taskuser">COV = sum((DM(t) - DM1) x (DM(t+L) - DM2) / (m - 1))</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>COV</TD>
						<TD>covariance factor</TD>
					</TR>
					<TR><TD>sum</TD>
						<TD>the sum of all periods minus the season length in periods</TD>
					</TR>
					<TR><TD>DM(t)</TD>
						<TD>the trend-adjusted actual demand for period t</TD>
					</TR>
					<TR><TD>DM1</TD>
						<TD>the trend-adjusted average demand for data set one</TD>
					</TR>
					<TR><TD>DM2</TD>
						<TD>the trend-adjusted average demand for data set two</TD>
					</TR>
					<TR><TD>L</TD>
						<TD>the season length in periods</TD>
					</TR>
					<TR><TD>m</TD>
						<TD>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><Paragraph UserLevel="Novice" UserType="Taskuser">COR = COV / (SDV1 x SDV2)</Paragraph>
			</Formula>
			<TABLE border="1"><TBODY><TR><TD>COR</TD>
						<TD>the <GUIRef href="/baanerp/cp/dsp/cpdsp1110m000#cpdsp110.scrf" role="formfield">Seasonal Correlation Factor</GUIRef> field</TD>
					</TR>
					<TR><TD>COV</TD>
						<TD>covariance factor</TD>
					</TR>
					<TR><TD>SDV1</TD>
						<TD>standard deviation for data set one</TD>
					</TR>
					<TR><TD>SDV2</TD>
						<TD>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>
