Professional Documents
Culture Documents
Teaching Forecasting and Prediction
Teaching Forecasting and Prediction
Abstract. This paper aimed to materialize how to teach forecasting and predictions to undergraduate students.
There are two modes of thinking, including the determination of forecasters and forecast errors. To determine the
best forecast, we have to use the methodology of minimizing sums of forecast errors, which is further discussed in
this paper. An example of this is single exponential smoothing, which is rather difficult when it comes to determining
the smoothing constant alpha. In management and administrative situations, the need for planning is great because
the lead time for decision-making ranges from several years to a few days or even a few hours. The ability to predict
many types of events seems, as natural today as, to be the accurate forecasting of weather conditions in a few
decades.
Keywords: Teaching forecasting, exponential smoothing, forecast errors, prediction.
76
Teaching Forecasting and Prediction 77
by Fi = αXi + (1–α)Fi. The hardest part of utilizing single y-intercept, b is the slope, X is the value of the forecast,
exponential smoothing in forecasting and prediction is and Y is the forecasted value of demand, which can also be
determining the smoothing constant alpha. The larger the stated as F.
value of α or closer to 1, the less smoothed it is, and the Along with this, there is also robust regression. This
smaller the value of α or closer to 0, the more smooth it is the same as linear regression but on a more “robust”
is. Since the aforementioned smoothing calculations are scale. Some factors that are important when doing robust
straightforward and only a minimal amount of historical regression analysis are to protect against distortion by
information should be preserved from one prediction to anomalous and good efficiency when the data come from
the next, it is possible to employ higher-order polynomials the ideal Gaussian model, as well as from a range of other
as forecasting models [1]. similar models [11]. Regardless of which regression we
decide to utilize, they are all very similar to one another
Example 1: Let us take a situation with the following
when it comes to forecasting and prediction.
demand values 10, 12, 14, 15 and smoothing constant
α = 0.1. Let us determine the forecasted demand with these Example 2: The waiting time (in minutes) for bank cus-
given values. Assume that the first forecast is the same as tomers wanting to sign up for a loan was measured at four
the actual demand, which is 10. banks for all customers who arrived between 2:00 and 2:30
The forecast for 2019 is 10, so the forecast for 2020 is p.m. on a certain Wednesday. The results are shown below.
(0.1*10). So:
Model Summary
S R2 R2 (Adjusted) R2 (Predicted)
14.4032 88.35% 80.59%
Analysis of Variance
Adjusted
Degrees Sum Adjusted
of of Means
Source Freedom Squares Squared F-Value P-Value
Regression 4 9441.8 2360.46 11.38 0.006
C1 1 2786.0 2786.04 13.43 0.011
C2 1 1.5 1.49 0.01 0.935
C3 1 6.8 6.81 0.03 0.862 Figure 2. Air passengers over time.
C4 1 47.9 47.94 0.23 0.648
Error 6 1244.7 207.45
Total 10 10686.5
# start and end date training data
start(train)
Fits and Diagnostics for Unusual Observations end(train)
# Creating test dataset
Standard test = window(ap, start = c(1960,1))
Deviation test
Observations C5 Fit Residual of Residual length(test)
3 115.0 115.0 −0.0 # Model 1: Additive Trend and seasonality (Figure 3)
9 98.0 122.1 24.1 −2.21 R # Plotting the complete dataset
plot(ap, main = "Airpassengers Over Time", ylab =
Example 4: We are using air passengers’ data to show an "Passengers")
example of forecasting using R. The advantage of using model1 = tslm(train ∼ trend + season)
R or Python is that the syntax can be reused with little summary(model1)
changes for new data or new cases. Comment lines are lines(model1$fitted.values, col = "red", lwd = 2)
prefixed with a # sign.
# forecast
# Linear regression analysis air passenger dataset pred1 = forecast(model1, h = 12)
ap = AirPassengers pred1
lines(pred1$mean, col = "blue", lwd = 2)
# install forecast
install.packages("forecast") # accuracy
accuracy(pred1, test)
# Load forecast package # Model 2: Multiplicative Trend and Seasonality (Figure 4)
library(forecast) # Plotting the complete dataset
plot(ap, main = "Airpassengers Over Time", ylab =
# structure of the dataset "Passengers")
str(ap) model2 = tslm(train ∼ trend + season, lambda = 0)
summary(model2)
# view the dataset lines(model2$fitted.values, col = "red", lwd = 2)
View(ap)
# forecast
# Plotting raw time series data (Figure 2) pred2 = forecast(model2, h = 12)
plot(ap, main = "Airpassengers Over Time", ylab = pred2
"Passengers") lines(pred2$mean, col = "blue", lwd = 2)
companies and organizations. However, there are precau- [5] Ekbia, H., and Nardi, B. (2014). Heteromation and its (dis) contents:
tions for both types of divisions of labor. The invisible division of labor between humans and machines. First
The division of labor between humans and computer Monday.
[6] Haase, K. (2012). Lotsizing and scheduling for production planning
systems has changed for both technology and humans. (Vol. 408). Springer Science and Business Media.
There has been a shift from technologies of automation [7] Hammershøj, L. G. (2019). The new division of labor between human
with the aim of disallowing human intervention at nearly and machine and its educational implications. Technology in Society,
all points in the system [5]. For machines, it is impor- 59, 101142.
tant to note that there may be biased datasets, small or [8] Hyndman RJ, Khandakar Y (2008). Automatic time series forecast-
incomplete datasets, and artificial intelligence for specific ing: the forecast package for R. Journal of Statistical Software, 26(3),
1–22. doi:10.18637/jss. v027
tasks. For humans, we have an enhanced value of human
[9] Hyndman, R., Koehler, A. B., Ord, J. K., and Snyder, R. D. (2008).
judgment. Computers are only capable of solving tasks Forecasting with exponential smoothing: the state space approach. Springer
within practices in which rules are specified by humans Science and Business Media.
or patterns found in datasets. Humans have the capacity [10] Khanzode, K. C. A., and Sarode, R. D. (2020). Advantages and
to change practices through creativity and innovation, as Disadvantages of Artificial Intelligence and Machine Learning: A
these processes are effective in nature. The paradox of this Literature Review. International Journal of Library and Information
Science (IJLIS), 9(1), 3.
is that even though computers can make rapid change
[11] Li, G. (1985). Robust regression. Exploring data tables, trends, and
possible, human intervention is still a necessity [7]. shapes, 281, U340.
[12] McCarthy, John. “What is artificial intelligence.” URL: http://www-
CONCLUSION formal.stanford.edu/jmc/whatisai.html (2004).
[13] McLachlan, G. J. (2005). Discriminant analysis and statistical pattern
recognition. John Wiley and Sons.
In teaching forecasting and analytics along with prediction, [14] Merriam-Webster Dictionary. (2022). forecast. The Merriam-
there are many similarities. It is critical that academics Webster.Com Dictionary. Retrieved 2022, from h t t p s : / / w w w.
understand the content that is currently being taught merriam-webster.com/dictionary/forecast
in these courses and develop the most optimal teaching [15] Merriam-Webster Dictionary. (2022). predict. The Merriam-
model. These findings illustrate a current gap between Webster.Com Dictionary. Retrieved 2022, from h t t p s : / / w w w.
teaching analytics and teaching forecasting with a signif- merriam-webster.com/dictionary/predict
[16] Mishra, S. (2018). Financial management and forecasting using busi-
icant variance among the topics taught across programs. ness intelligence and big data analytic tools. International Journal of
Financial Engineering, 5(02), 1850011.
REFERENCES [17] Montgomery, D. C., Peck, E. A., and Vining, G. G. (2021). Introduction
to linear regression analysis. John Wiley and Sons.
[1] Brown, R. G., and Meyer, R. F. (1961). The fundamental theorem of [18] Rayens, W. S. (1993). Discriminant analysis and statistical pattern
exponential smoothing. Operations Research, 9(5), 673–685. recognition.
[2] Chen, Z. L., and Vairaktarakis, G. L. (2005). Integrated scheduling of [19] Reason, J. (1990). Human error. Cambridge university press.
production and distribution operations. Management Science, 51(4), [20] Silva, A., and Stam, A. (1995). Discriminant analysis.
614–628. [21] Sinuany-Stern, Z. (2021). Forecasting methods in higher education:
[3] Davydenko, A., and Fildes, R. (2016). Forecast error measures: critical An overview. Handbook of Operations Research and Management Science
review and practical recommendations. Business forecasting: Practical in Higher Education, 131–157.
problems and solutions, 34. [22] Strigini, L., and Huang, F. (2021). HEDP: A Method for Early Fore-
[4] Dolgui, A., Ivanov, D., Sethi, S. P., and Sokolov, B. (2019). Scheduling casting Software Defects based on Human Error Mechanisms.
in production, supply chain and Industry 4.0 systems by optimal [23] Suhardi, S., Widyastuti, T., Bisri, B., and Prabowo, W. (2019). Fore-
control: fundamentals, state-of-the-art and applications. International casting Analysis Of New Students Acceptance Using Time Series
Journal of Production Research, 57(2), 411–432. Forecasting Method. Jurnal Akrab Juara, 4(5), 10–23.