4.3 White-box verification and validation
4.3.3 Subclass W 1 regression validation
Based on the pattern of estimated demand data for the winter subclasses considered in this study, the following variables are defined for inclusion in the model. Let K = 1, 2, . . . , k, . . . , K be the set of weeks in a season, and let
Yk be the total estimated demand in week k,
Lk be the total unit inflow during week k as planned by the Retailer,
Ek =
1 if the last day of week k is after the 29th or before the 11th of a month, 0 otherwise,
Fk =
1 if week k falls in Febuary, 0 otherwise,
Mk =
1 if week k falls in March, 0 otherwise,
Ak =
1 if week k falls in May, 0 otherwise,
Jk =
1 if week k falls in June, 0 otherwise,
Uk =
1 if week k falls in July, 0 otherwise, and let
Gk =
1 if week k falls in August, 0 otherwise.
The dependent variable, Yk, is the estimated demand in week k, and ˆYk is the forecasted weekly
demand. As for summer subclasses, variable Lk is included to account for anticipated demand,
as planned by the Retailer, in the form of total weekly planned inflow in week k, and Ek is
included to account for monthly demand, which—as with summer subclasses—is higher due to salaries and wages. Initial experiments indicated the presence of positive autocorrelation, and a weekly lag of demand and inflows were included to remove autocorrelation in the model. The model must be applicable to Subclass W2, on inspection of W2heteroscedasticity is an issue for W2. To ensure the model is homoscedastic,
q ˆ
Yk and pYk−1 replace ˆYk and Yk−1.
The winter selling season spans from the beginning of February until the end of July, lasting exactly 26 weeks. The pattern of estimated demand indicated that April has the highest recorded demand, possibly due to Easter festivities. Monthly dummy variables were included in this model, where April is kept as the reference month.
Having identified the variables, parameters ˆβ1, ˆβ2, . . . , ˆβ10 were estimated and the resulting re-
gression equation for Subclass W1is given by q ˆ Yk = 39.99 + 0.57 p Yk−1+ 24.42Ek− 27.66Fk− 24.06Mk− 10.42Ak− 11.86Jk −26.46Uk− 76.91Gk+ 0.00036Lk+ 0.00029Lk−1. (4.3)
Regression equation (4.3) makes intuitive sense, when all variables are 0, the week falls in the month of April and demand is expected to be positive. Demand is higher in week k if positive demand occurred last week k − 1. The high coefficient of Ek is reasonable for the
same reason as identified in the summer subclasses (that demand is higher after the Retailer’s customers receive salaries and wages, usually paid at the end of the month). Monthly dummy variable coefficients confirm demand during April is indeed highest, as all signs for these dummy variables are negative and the coefficient value indicates the magnitude of difference between expected demand during April and any of the other months. The second highest demand is in May, followed by June, March, July, February and lastly (demand is expected to be smallest in) August. Positive inflows this week and last week are likely to increase demand this week as the coefficients are positive but relatively small compared to the other variable coefficients.
The coefficient of determination indicates a good fit, R2=0.8471 and adjusted R2=0.8243. The joint explanatory power of independent variables are tested through the F -test and correspond- ing p-value which is smaller than 0.05, concluding the model as a whole is statistically significant. The significance of each independent variable is reported on in Table 4.7. Two variables, Akand
Lk−1 are not statistically significant (p-value > 0.05), the remaining variables are all statistically
significant. Demand during May, Ak, is not significantly different from demand during April,
however it may be significantly different from demand during other months. The lag variable, pYk−1 is sufficient in removing autocorrelation in this dataset. To ensure the model is applica- ble to other datasets where autocorrelation may be a bigger issue, Lk−1 is kept even though it
is not statistically significant for this dataset.
Variable t value p value Intecept 3.84 0.0003 √ Yk−1 7.32 < .0001 Ek 6.61 < .0001 Fk -3.10 0.0028 Mk -3.58 0.0006 Ak -1.77 0.081 Jk -2.06 0.043 Uk -3.95 0.0002 Gk -4.91 < .0001 Lk 2.28 0.0261 Lk−1 1.96 0.054
Table 4.7: Parameter estimates for regression equation (4.3), t-values and p-values.
The assumptions of multiple regression are formally tested for regression (4.3). All coefficients in Subclass W1’s regression equation are constant and there is linearity in parameters, so As- sumption 1 holds. Assumption 2 of homoscedasticity in the residuals is formally tested using Breusch-Pagan test. The p-value is 0.4897 (as obtained from SAS 9.4 [36]) for regression equa- tion (4.3), the null hypothesis is not rejected and residuals are assumed to be homoscedastic. Concluding that Assumption 2 holds.
Results obtained via SAS 9.4 [36] for four tests of normality are presented in Table 4.8. The null hypothesis for each test is that residuals follow a normal distribution. The p-values for all tests are greater than 0.05, the level of significance; and the null hypothesis is not rejected. Assumption 3, which states that all residuals are normally distributed, holds.
Equation (4.3) contains an intercept and the assumption of Durbin-Watson is valid. The Durbin- Watson test statistic is 2.01 (obtained via SAS 9.4 [36]), the lower and upper bounds are 1.39
4.3. White-box verification and validation 39
Test Statistic p value Shapiro-Wilk 0.98 0.40 Kolmogorov-Smirnov 0.046 > 0.15 Cramer-von Mises 0.024 > 0.25 Anderson-Darling 0.24 > 0.25
Table 4.8: Statistical test for normality of Subclass W1.
and 1.9 respectively (n = 77, df = 10, α = 0.05). As the test statistic is larger than the upper bound, the null hypothesis of no positive or negative autocorrelation is not rejected and it is assumed no autocorrelation is present in the residuals, Assumption 4 holds. To test for multicollinearity, the Pearson correlation coefficient—presented in Table 4.9—indicate no linear relationship between any two different independent variables and Assumption 5 holds.
√ Yk−1 Ek Fk Mk Ak Jk Uk Gk Lk Lk−1 √ Yk−1 1 -0.158 -0.614 -0.287 0.328 0.241 -0.016 -0.084 -0.119 0.133 Ek -0.158 1 -0.08 0.087 -0.029 0.004 -0.029 0.177 0.132 -0.015 Fk -0.614 -0.08 1 -0.186 -0.174 -0.18 -0.174 -0.055 0.089 -0.06 Mk -0.287 0.087 -0.186 1 -0.209 -0.216 -0.209 -0.066 0.273 0.166 Ak 0.328 -0.029 -0.174 -0.209 1 -0.202 -0.195 -0.062 0.08 0.048 Jk 0.241 0.004 -0.18 -0.216 -0.202 1 -0.202 -0.064 -0.1 -0.043 Uk -0.016 -0.029 -0.174 -0.209 -0.195 -0.202 1 -0.062 -0.296 -0.257 Gk -0.084 0.177 -0.055 -0.066 -0.062 -0.064 -0.062 1 -0.102 -0.101 Lk -0.119 0.132 0.089 0.273 0.08 -0.1 -0.296 -0.102 1 0.12 Lk−1 0.133 -0.015 -0.06 0.166 0.048 -0.043 -0.257 -0.101 0.12 1 Table 4.9: Pearson correlation coefficients of regression (4.3).
28-10-2010 05-02-2011 16-05-2011 24-08-2011 02-12-2011 11-03-2012 19-06-2012 27-09-2012 05-01-2013 15-04-2013 24-07-2013 01-11-2013 09-02-2014 20-05-2014 28-08-2014 06-12-2014 0 5 000 10 000 15 000 20 000 25 000 Demand (in uni ts ) Actual Fit Forecast
Figure 4.3: Graphical display of the fit and forecast accuracy of Subclass W1, obtained via regression (4.3) for the years 2011–2014.
Total actual demand for W1 as estimated from historical sales data for 2014 is equivalent to 152 202 units. The regression equation (4.3) overestimates demand for this period by 26.31%, predicting 192 247 units of demand for 2014. A graphical representation of the fit (red, dashed) and forecast (green, dashed) accuracy generated via regression (4.3) indicated the overestimation of demand is around April and an underestimation in July. All the assumptions of multiple regression hold and regression equation (4.3) is an acceptable model to forecast weekly demand for Subclass W1.