Introduction

Forecasting can be defined as the art of predicting the occurrence of events before they actually take place (Archer 1980). Forecasting provides some information about the uncertain future for example regarding demand. Prediction of demand is one of most important problems for managers and planners. Extensive and successive changes in various aspects of the global economy in recent decades have caused prediction and its quality to be of the most critical basics of excellence of the organization. Answer to the following questions recognizes contribution of demand forecast among prediction problems:

How much should be produced? How much of the resources and capacity is required? How are products produced in production planning? How much funding is required in operations?

Because of the importance of such questions, most large firms have to forecast future demand for their products. Planning results would be closer to reality considering demand as a random variable. In the case where the demand is a random variable, the problem is very complex and few works have been done in this field. Most of practical results are limited to a particular cost structure (Gupta 1977). In this paper, we present an iterative method for prediction of demand with normally distributed and independent variables of n-dimensional space and the demand space is a nonlinear function, in general. In the proposed method, demand has arbitrary pricing structure.

The remainder of this paper is organized as follows. In “Literature review”, the related literature is reviewed. In “Assumptions and notations”, assumptions and notations are introduced. “Problem description” and “A proposed algorithm” give problem description for a simple problem and results are developed for n-dimensional and nonlinear demand-state function. The performance of the proposed iterative procedure is validated with randomly generated experimental data in “Numerical example”. Finally, “Conclusions and future works” is devoted to conclusions and directions for future research.

Literature review

Graves (1980) studies the multi-product production cycling problem which is concerned with the determination of a production–inventory policy for a single capacitated production facility dedicated to produce a family of products. He presented a heuristic method for this problem assuming stochastic demand. He assumed that demand is characterized by a known stationary distribution function. Bitran and Yanasse (1984) provided a heuristic method for multi-period production planning with capacity constraints and service level constraints. They developed probabilistic models to deterministic approximation (non-randomized) that for examples with a high service level has relatively small error. In their model, the stochastic problem is transformed into a deterministic one by replacing the random demand with its average values. Khang and Fujiwara (1993) in their method applied previous technique of Bitran and Yanasse (1984), significantly. They formulated the problem with uncertain demand as a network flow. In their study, a deterministic approximation is obtained from the probable problem which can be solved using network flow methods.

Sox and Muckstadt (1996) proposed a model and an approximate method of solving for the multi-product and multi-level production planning problem with finite horizon, capacity constraints and random demand. The model includes the linear inventory and backorder costs in objective function but the setup costs and times are not considered. The cumulative distribution of demand per period must be considered in their model. Demand of each period is not brought in their model separately. Cumulative distribution of demand in beginning of the planning horizon to each period is required. Although their proposed technique is an approximate method but in comparison with the previous methods, it could be operated in the reasonable runtime for the instances with large number of products and periods. They decomposed the problem and found near-optimal solution using the Lagrangian model.

Haneveld (1988) and Peters et al. (1977) considered the production planning problem with limited production capacity and random demand for multiple products formulated as a stochastic programming. Their approach is discretization of probability distribution to formulate the problem as a linear model that can be solved with linear programming algorithm in large scale.

Yokoyama (1999) proposed a method to deal with random demand. In his study, it is assumed that the demand in each period is independent and probability distribution is specified. His/her investigated problem is a single product and single level. The objective function is to minimize the expected value of total production costs, inventory costs, backorder and setup costs. In this study, a computational method has been developed using the branch and bound method. Melo and Dellaret (1996) presented production strategies for a stochastic lot-sizing problem with constant capacity. The objective is minimizing expected cost. The costs include setup costs, inventory costs and backorder costs. Brandimarte (2006) considered a stochastic version of the classical multi-item capacitated lot-sizing problem. He studies stochastic demand by scenario trees and discretization of probable values. In this model, a scenario is a sequence of tree nodes and a scenario is a deterministic parameter equivalent to stochastic parameter. The complexity of problem increases as the number of scenarios grows. So the model is solved using a heuristic method in large-scale dimensions.

Ma et al. (2013) proposed three forecasting techniques which would be chosen by the retailer to minimize the sum of the bullwhip effect on product orders and inventory under different weightings in a two-level supply chain. In this study, the observations were used to develop managerial insights regarding choosing an appropriate forecasting technique after considering certain distinct characteristics of the product. Kim (2013) modeled a bilateral contract with order quantity flexibility. Under the contract, the buyer places orders in advance for the predetermined horizons and makes minimum purchase commitments. In this study, for demand forecasting in a supply chain, two techniques were considered i.e., the exponentially weighted moving average and the minimum mean square error.

Zheng et al. (2010) presented a solution method using application of the Black–Scholes model incorporating stochastic processes used in financial engineering for option pricing. Indulkar and Ramalingam (2013) proposed a Monte Carlo analysis for forecasting the load of plug-in electric vehicles. This study applied the Monte Carlo method and considering the associated ranges of the various parameters and variables, the range of the load was forecasted. Christ (2011) developed an overarching linear basis function model to forecast demand. In this study, in order to ensure that all relevant demand drivers were included, the model was validated following a typical frequentist interpretation. Finally, the appropriate tests were extended for Bayesian learning.

Massy (1976) proposed the stochastic evolutionary adoption model. In this study, several methods were outlined for estimating the proposed model’s parameters from panel data. Furthermore, a simulation procedure was also considered in order to project the results into a total market forecast. Jaipuria and Mahapatra (2014) proposed an integrated approach of discrete wavelet transforms (DWT) analysis and artificial neural network (ANN) denoted as DWT-ANN for demand forecasting. In this study, the proposed model was tested and validated by conducting a comparative study between Autoregressive Integrated Moving Average (ARIMA) and proposed DWT-ANN model using a data set from open literature.

All other papers considered uncertain demand and applied the concept of service level. Three types of service levels are introduced in the literature review of probabilistic demand (Tempelmeier 2011).

  • α service level: it is a service-level constraint to limit the total expected backlog relative to the maximum possible total expected backlog. The overall objective is to minimize the expected costs due to setups, inventory and overtime (Helber et al. 2012).

  • β service level (or “fill rate”): it is the fraction of the demand per cycle that is met immediately, i.e., without backlogging. This makes it difficult to simultaneously determine production quantities. Furthermore, the β service level does not reflect the waiting time of the customer (Helber et al. 2012).

  • γ service level: The attractive feature of this measure is that it reflects backlog and hence, to some extent the waiting time of the customers. It can be defined either (as above) for a specific period t, or as an average over the entire planning horizon. However, for a particular period the expected demand may be smaller than the expected backlog or even be zero. Therefore, this measure can be negative or even undefined (if the expected demand is zero) (Helber et al. 2012).

Assumptions and notations

The assumptions underlying the subsequent analysis include the following:

  • Demand-state equation consists of two parts, first part indicates the impact of various factors on demand (such as economic or social indicators, or environmental factors and etc.) and second part achieved from demand is estimated using previous data.

  • Demand formulation is a linear or nonlinear and n-dimensional equation.

  • The demands in the separate discrete periods (e.g., days, weeks) are independent, normally distributed, variables but not necessarily have the same means and standard deviations.

  • Demand in each period is independent of other periods.

The following notations, arranged alphabetically, will be used:

g ( . ) : :

Linear or nonlinear n-dimensional function that is the difference between the anticipated demand for the various conditions and historical data

I ( . ) : :

A linear or nonlinear n-dimensional function that indicates the impact of various factors on demand (such as economic or social indicators, or environmental factors and etc.)

h ( . ) : :

Anticipated demand of historical data

x i : :

Independent and normally distributed random variable in dimension i

μ i : :

Mean value of the variable x i

σ i : :

Standard deviation of the variable x i

x i : :

Most probable demand point in the dimension i

Problem description

Demand is forecasted by various factors (e.g. currency, seasonal variations and etc.). On the other hand demand can also before casted using historical data. Predicted demand is matched with the environmental and historical data if the difference between these two predictions is zero. However, due to the stochastic variables, such prediction is very complicated. Therefore, a method to find the most probable point is provided in this paper.

First, a linear equation with two variables will be considered for simplicity and then the results are extended to the general case.

g X = I x 1 - h x 2 = x 1 - x 2
(1)

The above two random variables are assumed to be independent and normally distributed. The mean values of x 1 and x 2 are μ 1 and μ 2 , respectively. And σ 1 and σ 2 are standard deviations of these variables. In the proposed procedure, the vector X is transformed into the independent standardized normal vector, U.

Our aim was to find the point with the highest probability density or maximum likelihood.

Demand space and g(X) = 0 lie in the coordinate system as shown in Figs. 1 and 2.

Fig. 1
figure 1

Demand space and g(X) = 0 in the 3D coordinate system

Fig. 2
figure 2

Demand space and g(X) = 0 in the 2D coordinate system

Figures 3 and 4 show transformation of variables to U-space system.

Fig. 3
figure 3

Transformation and most probable point in 3D U-space

Fig. 4
figure 4

Transformation and most probable point in 2D U-space

It is proved that due to the rotational symmetry of the second-moment representation of the standardized normal distribution Z, the geometrical distance from the origin in Z-space to any point on f(Z) = 0 is simply the number of standard deviations from the mean value point in X-space to the corresponding point on f(X) = 0 (Choi et al. 2007).

Since the point that has most probability is the point that has the minimum standard deviation (Wallace 2005), the most probable point has minimum geometrical distance from the origin in U-space to any point on g(U) = 0.

Suppose function g(.) in Eq. (1) with two variables x 1 and x 2 . Transform the variables into standard normalized random variables u 1 and u 2 :

u i = x i - μ x i σ x i
(2)

Figure 5 shows geometrical interpretation of the most probable point in a two-dimensional space and function g(.) expressed in Eq. 1. Figure 6 shows this interpretation in a three-dimensional graph.

g u 1 , u 2 = σ x 1 . u 1 + μ x 1 - σ x 2 . u 2 + μ x 2 = 0
(3)
g u 1 , u 2 = σ x 1 . u 1 - σ x 2 . u 2 μ x 1 + μ x 1 - μ x 2 = 0
(4)
P x 1 , x 2 = 0 × σ x 1 + μ x 1 , 0 × σ x 2 + μ x 2
(5)
Fig. 5
figure 5

Geometrical interpretation of the most probable point in a two-dimensional space

Fig. 6
figure 6

Most probable point in g(U) = 0 surface with two variables

These calculations are complicated for n-dimensional and nonlinear problem. So we proposed an iterative method in this paper to facilitate this computation.

In general, the independent variables can be assumed to be normally distributed in a multi-dimensional space. The demand surface is a nonlinear function of these variables:

g X = g x 1 , x 2 , , x n T
(6)

The variables are transformed to a standard normalized form by Eq. (2). Demand-state surface with n-dimensional and independent, normally distributed random variables X is

g X = g x 1 , x 2 , , x n T = 0
(7)

This demand-state function can be linear or nonlinear. Based on the transformation given in Eq. (2), the demand-state function given in Eq. (7) is transformed into

g U = g σ x 1 . u 1 + μ x 1 , σ x 2 . u 2 + μ x 2 , , σ x n . u n + μ x n T = 0
(8)

p is the point of intersection between vector comes from origin O and demand-state surface g(U) = 0. Distance from the origin to the p point is the shortest distance.

First-order Taylor series expansion for g(U) in the p in the U-space is:

g U = g p + i = 1 n g ( p ) u i . ( u i - p )
(9)

From Eq. (2)

g ( U ) u i = g ( X ) x i σ x i
(10)

Consider a two-variable function represented in Fig. 7.

Fig. 7
figure 7

p* in a two-variable demand function

According to Fig. 7 and basic concepts of mathematics:

O P . g U p = g U p O P = g ~ ( U p ) g ( U p )
(11)
cos φ 1 = - g ( p ) u 1 g ( U p )
(12)
cos φ 2 = - g ( p ) u 2 g ( U p )
(13)
u 1 = O P × cos φ 1
(14)
u 2 = O P × cos φ 2
(15)

Extending Eqs. (11)–(15) to general case gives the following relations:

O P = g ( U p ) g ( U p ) = g p - i = 1 n g ( p ) u i . p i = 1 n g ( p ) u i 2
(16)
cos φ i = - g p u i g U p = - g ( X ) x i σ x i i = 1 n g ( X ) x i σ x i 2
(17)
u i = x i - μ x i σ x i = O P × cos φ i
(18)
x i = μ x i + O P × cos φ i × σ x i i = 1 , 2 , , n
(19)

A proposed algorithm

The main steps of the proposed iterative method to forecast the demand are:

  1. 1.

    Define the appropriate demand-state function of Eq. (6).

  2. 2.

    Set the mean value point as an initial point, i.e., x i , 1 = μ x i , i = 1 , 2 , , n . Here x i , k is the ith element in the vector X k of the kth iteration.

  3. 3.

    Compute the gradients of the demand-state function at this point.

  4. 4.

    Compute the initial OP and its direction cosine.

  5. 5.

    Compute a new point X k and U k (Eqs. 19 and 18), function value, and gradients at this new point.

  6. 6.

    Compute the OP using Eq. (16) and the direction cosine variables from Eq. 17.

  7. 7.

    Repeat steps 5–7 for GE (maximum replications determined by the user) times.

  8. 8.

    When GE is greater than a specific number or g(X) is close to zero sufficiently, stop iterations.

  9. 9.

    Compute the coordinates of the point X k or most probable point ( X ) , that has the smallest absolute value of the demand-state function.

Several nonlinear and multi-dimensional examples have been solved with this procedure. Most of the examples will converge to a special point.

Numerical example

The demand function is

g x 1 , x 2 , x 3 = x 1 3 + x 2 3 - x 3

where x 1 , x 2 and x 3 are the random variables with normal distributions with means μ 1 = 10 , μ 2 = 2 , μ 3 = 10 and standard deviations σ 1 = 2 , σ 2 = 0.5 , σ 3 = 3 , respectively (in 1,000 units). Find most probable demand point using proposed iterative method.

Set the mean point as an initial point and the required convergence tolerance ε = ± 0.00001 . In the following demand-state function value and its gradients in initial point are computed.

g X 1 = x 1 3 + x 2 3 - x 3 = 10 3 + 2 3 - 10 = 998 g x 1 | μ 1 = 3 μ 1 2 = 300 g x 2 | μ 2 = 3 μ 2 2 = 12 g x 3 | μ 3 = - 1 O P 1 = g ( X 1 ) g ( μ 1 , μ 2 , μ 3 ) x 1 σ 1 2 + g ( μ 1 , μ 2 , μ 3 ) x 2 σ 2 2 + g ( μ 1 , μ 2 , μ 3 ) x 3 σ 3 2 OP 1 = 998 300 × 2 2 + 12 × 0.5 2 + ( - 1 ) × 3 2 = 1.6632 cos ϕ i = - g x i | μ i σ i g ( μ 1 , μ 2 , μ 3 ) x 1 σ 1 2 + g ( μ 1 , μ 2 , μ 3 ) x 2 σ 2 2 + g ( μ 1 , μ 2 , μ 3 ) x 3 σ 3 2 cos ϕ 1 = - 0.9999 cos ϕ 2 = - 0.0099 cos ϕ 3 = 0.0050

Applying Eqs. (18) and (19), anew point is computed.

x 12 = μ 1 + O P 1 σ 1 cos ϕ 1 = 10 + 1.6632 × 2 × - 0.9999 = 6.6737 x 22 = μ 2 + O P 1 σ 2 cos ϕ 2 = 2 + 1.6632 × 0.5 × - 0.0099 = 1.9917 x 32 = μ 3 + O P 1 σ 3 cos ϕ 3 = 10 + 1.6632 × 3 × 0.0050 = 10.0249 u 12 = x 12 - μ 1 σ 1 = 6.6737 - 10 2 = - 1.6631 u 22 = x 22 - μ 2 σ 2 = 1.9917 - 2 0.5 = - 0.0166 u 32 = x 32 - μ 3 σ 3 = 10.0249 - 10 3 = 0.0083

The next iteration includes the calculation of the demand-state function and its gradient in the X 2

g X 1 = x 1 3 + x 2 3 - x 3 = 6 . 6737 3 + 1 . 9917 3 - 10.0249 = 295.1173 g x 1 | μ 1 = 3 μ 1 2 = 133.6148 g x 2 | μ 2 = 3 μ 2 2 = 11.9006 g x 3 | μ 3 = - 1 O P 2 = g X 2 - i = 1 3 g ( X 2 ) x i σ i u i 2 g ( μ 1 , μ 2 , μ 3 ) x 1 σ 1 2 + g ( μ 1 , μ 2 , μ 3 ) x 2 σ 2 2 + g ( μ 1 , μ 2 , μ 3 ) x 3 σ 3 2 O P 2 = 295.1173 - 133.6148 × 2 × - 1.6631 - 11.9006 × 0.5 × - 0.0166 - ( - 1 × 3 × 0.0083 ) 133.6148 × 2 2 + 11.9006 × 0.5 2 + ( - 1 ) × 3 2 O P 2 = 2.7671 cos ϕ i = - g x i | μ i σ i g ( μ 1 , μ 2 , μ 3 ) x 1 σ 1 2 + g ( μ 1 , μ 2 , μ 3 ) x 2 σ 2 2 + g ( μ 1 , μ 2 , μ 3 ) x 3 σ 3 2 cos ϕ 1 = - 0.9997 cos ϕ 2 = - 0.0223 cos ϕ 3 = 0.0112

Again applying Eqs. (18) and (19) another new point, X 3 , is computed:

x 13 = μ 1 + O P 1 σ 1 cos ϕ 1 = 10 + 2.7671 × 2 × - 0.9997 = 4.4676 x 23 = μ 2 + O P 1 σ 2 cos ϕ 2 = 2 + 2.7671 × 0.5 × - 0.0223 = 1.9692 x 33 = μ 3 + O P 1 σ 3 cos ϕ 3 = 10 + 2.7671 × 3 × 0.0112 = 10.0932 u 13 = x 12 - μ 1 σ 1 = 4.4676 - 10 2 = - 2.7662 u 23 = x 22 - μ 2 σ 2 = 1.9692 - 2 0.5 = - 0.0616 u 33 = x 32 - μ 3 σ 3 = 10.0932 - 10 3 = 0.0311

Table 1 represents the iteration results. The iteration stops after 17 repetitions. Results of more than 75 numerical examples showed this procedure reaches to a reasonable answer in a short time.

Table 1 Iteration results in the proposed method

So the predicted demand is x 3 , 17 = 11618.4 and D ~ = x 1 , 17 3 + x 2 , 17 3 = 1 . 9329 3 + 1 . 6383 3 = 11618.7

Conclusions and future works

This paper proposed an iterative method to forecast the demand. Demand predicted by this procedure can be compatible with both external conditions and historical data. Demand-state surface is n-dimensional and linear or nonlinear function. All variables are independent and normally distributed with specified means and standard deviations.

In reviewing the literature, it was observed that papers dealt with uncertain demand benefited from simulation, frequently. But in this paper we proposed a procedure to find most probable demand point. The numerical results indicated that run time of the presented method is short, sufficiently.

The main conclusions of this paper can be summarized as follows:

  • Proposed iterative method predicts demand with nth degree and n-dimensional equation for any integer n > 1.

  • Demand-state equation consists of two parts, first part indicates the impact of various factors on demand (such as economic or social indicators, or environmental factors, etc.) and second part achieved from demand is estimated using previous data. Demand-state function is subtraction of these two parts.

  • Demand forecasted by this method is compatible with both external conditions and historical data.

  • Numerical results showed proposed method converge to the specified answer in a short time.

Normally distributed variables were considered in this paper, considering other statistical distributions for variables of demand function is recommended for future research. To apply the proposed method to find the most probable point in uncertain process times in the production problems is another area for future studies.