# BAYESIAN STOCHASTIC MODELING OF SUPPLY CHAIN

Marcel ILIE¹ and Augustin SEMENESCU²

**Rezumat.** Sistemele lanțurilor de aprovizionare sunt din ce în ce mai expuse incertitudinii din cauza fluctuațiilor cererii, variațiilor timpilor de livrare și perturbărilor frecvente la nivelul rețelelor globale. Modelele deterministe și frecventiste convenționale eșuează adesea în a aborda în mod adecvat aceste complexități, deoarece nu dispun de mecanisme care să integreze cunoștințele anterioare și să actualizeze dinamic credințele. Acest studiu dezvoltă un cadru de inferență bayesiană pentru managementul lanțului de aprovizionare, care integrează modelarea probabilistică, învățarea și optimizarea într-o structură coerentă de luare a deciziilor. Cadrul utilizează modele bayesiene ierarhice pentru a surprinde dependențele multi-etajate și folosește tehnici Markov Chain Monte Carlo (MCMC) pentru estimarea posterioarelor și calibrarea parametrilor. Prin actualizarea continuă a distribuțiilor anterioare cu date noi, modelul sprijină prognozarea adaptivă a cererii, optimizarea inventarului în timp real și cuantificarea incertitudinii. Experimentele numerice, bazate pe seturi de date simulate și empirice, arată că abordarea bayesiană propusă oferă o acuratețe predictivă mai ridicată, niveluri de serviciu îmbunătățite și o reziliență crescută în comparație cu metodele tradiționale de optimizare stocastică. Rezultatele evidențiază capacitatea inferenței bayesiene de a oferi o fundație flexibilă și bazată pe date pentru sprijinul decizional robust în medii complexe și incerte ale lanțului de aprovizionare.

**Abstract.** Supply chain systems are increasingly exposed to uncertainty due to fluctuating demand, variable lead times, and frequent disruptions across global networks. Conventional deterministic and frequentist models often fail to adequately address these complexities, as they lack mechanisms to incorporate prior knowledge and update beliefs dynamically. This study develops a Bayesian inference framework for supply chain management that integrates probabilistic modeling, learning, and optimization within a coherent decision-making structure. The framework employs hierarchical Bayesian models to capture multi-echelon dependencies and utilizes Markov Chain Monte Carlo (MCMC) techniques for posterior estimation and parameter calibration. By continuously updating prior distributions with new data, the model supports adaptive demand forecasting, real-time inventory optimization, and uncertainty quantification. Numerical experiments using simulated and empirical datasets demonstrate that the proposed Bayesian approach yields higher predictive accuracy, improved service levels, and enhanced resilience compared with traditional stochastic optimization methods. The findings highlight the capability of Bayesian inference to provide a flexible and data-driven foundation for robust decision support in complex and uncertain supply chain environments.

**Keywords:** Bayesian inference; stochastic modeling; supply chain management; uncertainty quantification; hierarchical models; MCMC; adaptive decision-making; resilience.

**DOI** 10.56082/annalsarscieng.2025.2.62

<footnote>Marcel ILIE¹, Associate. Prof. Ph.D. Georgia Southern University, 1332 Southern Dr. Statesboro
GA 30458, USA, *Corresponding author.; milie@georgiasouthern.edu
Augustin SEMENESCU², Prof. National Science and Technology University Politehnica
Bucharest, Spl. Independentei 313, Bucharest, Romania, augustin.semenescu@upb.ro</footnote>
# 1. Introduction

In today's volatile global markets, supply chains face increasing uncertainty driven by fluctuating demand, geopolitical risks, pandemics, and disruptions in logistics networks. Traditional deterministic and frequentist models often struggle to capture these complexities due to their limited capacity to incorporate uncertainty and prior knowledge [22]. As a result, probabilistic and data-driven frameworks have become essential tools for managing supply chain risk and optimizing decision-making. Among these frameworks, Bayesian inference has emerged as a powerful methodology for integrating prior information with real-time data to update beliefs and enhance predictive accuracy [4-6]. Bayesian inference provides a systematic approach to uncertainty quantification by treating unknown parameters as random variables and updating their probability distributions as new information becomes available [12]. This flexibility makes it particularly suitable for supply chain contexts characterized by incomplete data, stochastic lead times, and dynamic market behavior [3]. For instance, Bayesian updating can be employed to refine demand forecasts, assess supplier reliability, and adjust inventory policies as fresh data are observed. Moreover, hierarchical Bayesian models enable multi-level inference across supply chain echelons, improving coordination between manufacturers, distributors, and retailers [20].

Recent advances in computational statistics and artificial intelligence have further expanded the applicability of Bayesian methods in large-scale and real-time supply chain systems. Techniques such as Markov Chain Monte Carlo (MCMC) and Variational Inference (VI) allow for efficient posterior estimation in high-dimensional settings, while Bayesian networks facilitate causal reasoning and probabilistic dependency modeling across supply chain components [7]. These developments have enabled the integration of Bayesian inference with emerging paradigms like digital twins, Industry 4.0, and Internet of Things (IoT)-based supply chain monitoring [11]. In addition to improving operational efficiency, Bayesian inference supports strategic decision-making under uncertainty by quantifying the likelihood of various scenarios and outcomes. It allows decision-makers to evaluate risks, allocate resources, and plan contingencies using probabilistic forecasts rather than point estimates. For example, Bayesian decision theory has been used to balance the trade-off between cost minimization and service-level reliability [5]. Furthermore, Bayesian updating mechanisms are particularly beneficial for resilient and adaptive supply chain design, where the system must continuously learn and adjust to unforeseen disruptions [9].

Despite its promise, the adoption of Bayesian inference in supply chain management remains limited by computational challenges, data availability, and the need for interdisciplinary expertise. Many existing models rely on simplifying
assumptions or static data sources, limiting their practical utility. Therefore, there
is a growing need for comprehensive Bayesian frameworks that leverage modern
computational tools and real-time data integration to enhance supply chain
visibility, resilience, and decision support [19].

The objective of this paper is to explore the application of Bayesian
inference in supply chain management, emphasizing methodological
developments, modeling strategies, and real-world applications. Specifically, the
study investigates how Bayesian approaches can improve demand forecasting,
risk assessment, and network optimization under uncertainty. By synthesizing
recent advances and proposing a unified Bayesian framework, this work aims to
contribute to both academic understanding and industrial implementation of
probabilistic decision-making in supply chain systems.

## 2. Literature review

The increasing exposure of global supply chains to disruptions has driven
extensive research into modeling uncertainty and developing quantitative risk
mitigation strategies. Among the diverse methodological approaches, stochastic
modeling has emerged as one of the most robust and widely applied tools for
analyzing and optimizing supply chain performance under uncertainty [15, 23].
Recent research has focused on integrating stochastic optimization and risk
management. Approaches such as stochastic programming [2], robust
optimization [1], and chance-constrained formulations [14] allow decision-makers
to model risk explicitly and derive policies that hedge against adverse outcomes.
Applications span network design [16], supplier selection [13], inventory control
[10], and transportation planning [18].

Modeling disruption risks, such as supplier failures and transport interruptions, has also been a focus of recent studies. Stochastic network models and simulation frameworks estimate the impact of rare but severe disruptions [9, 17]. Hybrid approaches combining stochastic modeling with agent-based simulation, system dynamics, or machine learning enable adaptive risk management informed by real-time data [8, 21].

Despite progress, gaps remain. Many models assume independent uncertainties or
static distributions, and risk mitigation is often reactive. Integrated stochastic
frameworks that unify uncertainty representation, resilience quantification, and
decision optimization across multiple temporal and spatial scales are needed. This
study addresses these gaps by developing a framework that balances cost
efficiency, robustness, and adaptability.
# 3. Methodology

## 3.1 Overview of the Stochastic Modeling

Supply chain management involves complex, uncertain environments where parameters such as demand, lead time, and supplier reliability are inherently stochastic [17]. To handle these uncertainties systematically, Bayesian inference offers a coherent probabilistic framework that updates parameter estimates as new information becomes available [6]. According to Bayes' theorem, the posterior distribution of parameters given the data is expressed as:

$$P(\theta|D) = \frac{P(D|\theta)P(\theta)}{P(D)} \qquad (1)$$

where $\theta$ represents the vector of model parameters (e.g., demand mean, lead time, and reliability), ($D$) denotes the observed data (e.g., historical demand and lead times), $P(\theta)$ is the prior, $P(D|\theta)$ the likelihood, and $P(\theta|D)$ the posterior distribution. This probabilistic updating allows for continuous learning and adaptive decision-making as supply chain data evolve over time [19].

## 3.2 Model Structure and Parameter Definition

The Bayesian model defines key stochastic processes underlying the supply chain. Let

$$\theta = \{\mu_d, \sigma_d^2, \lambda_s, \tau_l\} \qquad (2)$$

represent the parameters of interest, where $\mu_dA$ and $\sigma_d^2$ denote the mean and variance of customer demand, $\lambda_s$ represents supplier reliability, and $\tau_l$ indicates the average lead time. Following previous studies [3, 11], customer demand is modeled as a Normal process, and lead time as an Exponential process:

$$D_t \sim \text{Normal}(\mu_d, \sigma_d^2) \qquad (3)$$

$$L_t \sim \text{Exponential}(\tau_l^{-1}) \qquad (4)$$

The joint likelihood of the data $D = \{D_t\}_{t=1}^n$ and $L = \{L_t\}_{t=1}^n$ is expressed as:
$$P(D, L|\theta) = \prod_{t=1}^{n} f(D_t|\mu_d, \sigma_d^2) \times g(L_t|\tau_l) \quad (5)$$

This joint formulation enables capturing interdependencies between demand and logistics delays, reflecting the stochastic nature of modern supply chain systems [19].

## 3.2 Prior Distribution Specification

Prior distributions represent the analyst's knowledge before observing current data. In line with previous studies [6], informative priors are used when historical data are available, while weakly informative priors ensure model flexibility when uncertainty about prior beliefs exists.

For the parameters defined above, the priors are set as:

$$\mu_d \sim \text{Normal}(\mu_0, \sigma_0^2) \quad (6)$$

$$\sigma_d^2 \sim \text{Inverse-Gamma}(\alpha_0, \beta_0) \quad (7)$$

$$\lambda_s \sim \text{Beta}(\alpha_0, \beta_0) \quad (8)$$

$$\tau_l \sim \text{Gamma}(c_0, d_0) \quad (9)$$

These prior forms are consistent with the probabilistic nature of each parameter and have been applied in Bayesian modeling of supply chain variables [3]. Hyperparameters are estimated from historical operational data, expert elicitation, or simulation-based calibration.

## 3.2 Posterior Estimation via Markov Chain Monte Carlo (MCMC)

Since analytical solutions for the posterior distribution are rarely obtainable, Markov Chain Monte Carlo (MCMC) techniques are employed to approximate the posterior distribution [6]. The Metropolis-Hastings (MH) and Gibbs sampling algorithms are adopted to iteratively draw samples from the posterior. At iteration (k), a new parameter vector $\theta^*$ is proposed from a distribution $q(\theta^*|\theta^{(k-1)})$, and the acceptance probability is given by:
$$ \alpha = \min \left( 1, \frac{P(D|\theta^*) P(\theta^*) q(\theta^{(k-1)}|\theta^*)}{P(D|\theta^{(k-1)}) P(\theta^{(k-1)}) q(\theta^*|\theta^{(k-1)})} \right) \quad (10) $$

If the proposal is accepted, $\theta^{(k)} = \theta^*$; otherwise, the chain retains the previous state. After convergence, posterior means and credible intervals are estimated as:

$$ E(\theta|D) \approx \frac{1}{N} \sum_{j=1}^{N} \theta^{(j)} \quad (11) $$

The MCMC-based estimation provides a full probabilistic characterization of uncertainty around each parameter, which is crucial for robust decision-making in supply chains [19].

## 3.2 Convergence Diagnostics and Model Validation

Convergence of MCMC chains is assessed using Gelman–Rubin diagnostics($\bar{R}$), trace plots, and autocorrelation checks [6]. Multiple chains are run with different initial values to ensure stability of the posterior estimates. For model validation, posterior predictive checks are performed. New simulated data $\bar{D}$ are drawn from the posterior predictive distribution:

$$ P(\bar{D}|D) = \int P(\bar{D}|\theta)P(\theta|D)d\theta \quad (12) $$

The similarity between simulated and observed data distributions serves as a diagnostic measure for model adequacy. This process ensures that the Bayesian model faithfully represents real-world supply chain behavior before integrating results into operational decision systems.

## 3.2 Computational Implementation

The computational implementation is carried out using Matlab. Simulations are run for 20,000 iterations with a 5,000-sample burn-in period. The methodology is designed for scalability, allowing integration of multiple supply chain echelons (e.g., supplier, manufacturer, and distributor). The Bayesian updating mechanism enables real-time learning, where posterior distributions are continually revised as new demand or supply data become available [19].
## 3.2 Integration with Decision Models

Posterior estimates are used to support inventory optimization, supplier selection, and demand forecasting under uncertainty. For instance, the posterior mean of demand $E(D_t|D)$ feeds into reorder-point calculations, while the posterior of supplier reliability $P(\lambda_s|D)$ is incorporated into multi-sourcing models [3]. By integrating Bayesian inference with operational decision tools, the framework enhances adaptability and robustness in uncertain and dynamic supply chain environments [17].

## 4. Results

Bayesian inference provides a systematic framework for estimating the mean demand in a supply chain by combining prior knowledge with observed demand data. Unlike traditional frequentist methods that rely solely on historical observations, Bayesian inference treats the demand rate as a random variable with an associated probability distribution that updates as new data becomes available.

### 4.1 Model Formulation

Let $D = \{d_1, d_2, ..., d_n\}$ represent the observed demand over n periods. The demand is assumed to follow a stochastic process such as the Poisson distribution, where the mean demand per period is denoted by $\lambda$. Mathematically

$$d_i A = \text{Poisson}(\lambda) \text{ for } i = 1, 2, ..., n \qquad (13)$$

<figure><img src="image_1.png" /><figcaption>Figure 1. Bayesian inference for Poisson demand</figcaption></figure>
## 4. 2 Prior Distribution

Before observing data, prior beliefs about the mean demand $\lambda$ are represented by a prior distribution, commonly chosen as a Gamma distribution because it is the conjugate prior for the Poisson likelihood:

$$ \lambda \sim \text{Gamma}(\alpha_0, \beta_0) \qquad (14) $$

where $\alpha_0$ and $\beta_0$ represent prior knowledge about the expected demand level and uncertainty. The prior and post distributions are shown in Figure 1.

## 4. 3 Likelihood Function

The likelihood function expresses the probability of observing the data given a specific value of $\lambda$ is obtained as

$$ P(D|\lambda) = \prod_{i=1}^{n} \frac{e^{-\lambda} \lambda^{d_i}}{d_i!} \qquad (15) $$

This likelihood summarizes the information that the observed data provides about the unknown mean demand. Figures 1 and 2 show the density distributions for prior, posterior and likelihood.

Figure 2 shows the density distributions of the prior, likelihood, and posterior for the mean daily demand rate of a key product in the supply chain. The prior distribution was modeled as a normal distribution with mean $\mu_0 = 100$ units/day and standard deviation $\sigma_0 = 15$ units/day, representing initial uncertainty about demand based on historical experience. The wide spread of the prior indicates that, before observing current data, the demand could reasonably vary across a broad range. The likelihood function, derived from observed daily demand over a two-week period, peaks around 105 units/day, suggesting that the most probable demand value based on the data is higher than the prior expectation. The relatively narrow width of the likelihood indicates that the observed data provides a precise signal about the true demand rate. The posterior distribution, resulting from the Bayesian update of the prior with the likelihood, is more concentrated than the prior and centered around 103 units/day. This shift toward the data-driven likelihood peak reflects the strong influence of the observed demand on updating
prior beliefs. The posterior standard deviation decreased to approximately 2 units/day, demonstrating that incorporating data significantly reduced uncertainty about the demand rate. These density distributions quantitatively illustrate the Bayesian updating process. The prior provided a baseline expectation, the likelihood summarized evidence from recent observations, and the posterior combined both sources to yield a refined probabilistic estimate. This approach allows supply chain managers to make informed inventory and replenishment decisions while explicitly accounting for uncertainty in demand.

<figure><img src="image_2.png" /><figcaption>Figure 2. Bayesian inference for mean demand</figcaption></figure>

A second analysis was performed as well. The prior distribution was modeled as a normal distribution with mean $\mu_0 = 50$ units/day and standard deviation $\sigma_0 = 15$ units/day, reflecting initial uncertainty about demand based on historical data. The wide spread of the prior indicates substantial initial uncertainty. The likelihood function, derived from observed daily demand over a two-week period, peaks around 60 units/day, suggesting that the most probable demand value based on the data is higher than the prior expectation. The relatively narrow width of the likelihood reflects precise information provided by the observations. The posterior distribution, obtained by updating the prior with the likelihood, is more concentrated than the prior and centered around 58 units/day. The posterior
standard deviation decreased to approximately 8 units/day, indicating a significant reduction in uncertainty after incorporating the observed data.

Table 1 summarizes the key statistics for the distributions:

<table><caption>**Table 1.** Summary of key statistics</caption><thead><tr><td>Distribution</td><td>Mean (units/day)</td><td>Standard Deviation (units/day)</td><td>Notes</td></tr></thead><tbody><tr><td>Prior</td><td>50</td><td>15</td><td>Initial belief before data</td></tr><tr><td>Likelihood</td><td>60</td><td>6</td><td>Derived from observed demand</td></tr><tr><td>Posterior</td><td>58</td><td>8</td><td>Updated belief combining prior and data</td></tr></tbody></table>

These results demonstrate the Bayesian updating process: the posterior reflects a compromise between prior knowledge and empirical evidence, providing a refined estimate of the demand rate with reduced uncertainty. Such probabilistic information is critical for informed inventory and replenishment decisions in supply chain management.

<figure><img src="image_3.png" /><figcaption>a. Retail demand
Figure 3. Bayesian inference for Poisson demand</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>b. Supplier lead time</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>a. Retail demand
Figure 4. Bayesian inference for Poisson demand</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>b. Reorder point</figcaption></figure>

The analysis of the retail supply chain focused on three key parameters: customer demand, supplier lead time, and the reorder point policy. The results are summarized below. Historical sales data indicated that demand follows a stochastic pattern with notable variability across periods. Using probabilistic modeling, the mean daily demand was estimated at 120 units/day, with a standard deviation of 15 units/day, reflecting the uncertainty inherent in customer purchasing behavior. The demand distribution was found to be approximately as shown in Figure 4a, which supports the use of inventory policies that account for variability and risk of stockouts.

## 4.4 Customer Demand

In the following the analysis of the customer demand is presented and some of its elements are defined. Thus,

$D_t$ – average demand over time t
$$D_{t+1} = \frac{D_t + D_{t-1} + \cdots + D_{t-n+1}}{n} \qquad (16)$$

n- number of periods for averaging

Demand with safety stock is defined as

$$SS = Z \cdot \sigma_L \qquad (17)$$

SS-safety stock

Z-service level factor (from normal distribution)

$\sigma_L$ – standard deviation of demand during lead time

The Reorder Point (R) is defined by

$$R = d \cdot L + SS \qquad (18)$$

d- average demand per period

L-lead time

Backorder or Stockout Probability is defined in the following.

If demand is normally distributed

$$P(\text{stockout}) = 1 - \Phi\left(\frac{R - dL}{\sigma_L}\right) \qquad (19)$$

where $\Phi$ is the cumulative normal distribution

Demand over lead time

$$D_L = \sum_{i=1}^{L} d_i \qquad (20)$$

$d_i$ – is the demand in each period $i$ during the lead time
The hierarchical Bayesian model was applied to estimate customer demand across five SKUs over a 30-day observation period. Demand for each product was simulated from a Poisson process with distinct underlying rates, representing realistic variability in product popularity. Using a Gamma-Poisson (conjugate) framework with hyperpriors $\alpha_0 = 2$ and $\beta_0 = 1$, posterior distributions of the demand rate parameter $\lambda$ were computed for each SKU.

The posterior shape ($\alpha_{post}$) and rate $\beta_{post}$ parameters are summarized below

<table><caption>**Table 2.** Posterior shape ($\alpha_{post}$) and rate $\beta_{post}$ parameters</caption><thead><tr><td>SKU</td><td>a<sub>post</sub></td><td>β<sub>post</sub></td></tr></thead><tbody><tr><td>1</td><td>302</td><td>31</td></tr><tr><td>2</td><td>361</td><td>31</td></tr><tr><td>3</td><td>241</td><td>31</td></tr><tr><td>4</td><td>453</td><td>31</td></tr><tr><td>5</td><td>271</td><td>31</td></tr></tbody></table>

From these parameters, the posterior means ($E[\lambda_i] = \alpha_{post,i}/\beta_{post,i}$) and posterior standard deviations ($SD[\lambda_i] = \sqrt{\alpha_{post,i}/\beta_{post,i}}$) were obtained as:

<table><caption>**Table 3.** Posterior mean and standard deviation</caption><thead><tr><td>SKU</td><td>Posterior Mean λ</td><td>Posterior SD</td></tr></thead><tbody><tr><td>1</td><td>9.74</td><td>0.56</td></tr><tr><td>2</td><td>11.65</td><td>0.61</td></tr><tr><td>3</td><td>7.77</td><td>0.50</td></tr><tr><td>4</td><td>14.61</td><td>0.69</td></tr><tr><td>5</td><td>8.74</td><td>0.53</td></tr></tbody></table>

These results align closely with the true underlying demand rates ([10, 12, 8, 15, 9]), confirming that the Bayesian updating effectively recovered the true parameters given only 30 daily observations per product. The posterior density plots (Figure 1) reveal narrow, unimodal distributions for all SKUs, reflecting low parameter uncertainty after observing sufficient data. Higher-demand SKUs (e.g., SKU 4) exhibited slightly broader posteriors due to increased stochasticity at higher Poisson rates, though the posterior modes remained close to their true
means. Predictive distributions for the next-period demand (Figure 2) show that each SKU’s demand follows a negative binomial distribution, capturing both intrinsic Poisson variability and parameter uncertainty. These predictive distributions highlight a right-skewed shape, implying a nonzero probability of unusually high demand realizations — a critical consideration for inventory planning and safety stock policies.

Overall, the hierarchical Bayesian approach provided a robust probabilistic characterization of customer demand across products, efficiently pooling information while retaining SKU-level heterogeneity. This framework enables data-driven decisions in reorder point optimization, safety stock setting, and demand forecasting under uncertainty.

<figure><img src="image_7.png" /><figcaption>Figure 5. Posterior distribution of demand rate</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>Figure 6. Predictive distribution for the next period demand</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Figure 7. Posterior distribution of demand for multiple SKUs</figcaption></figure>
<figure><img src="image_10.png" /><figcaption>Figure 8. Predictive distribution for SKUs</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Figure 9. Bayesian posterior predictive demand distribution</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>Figure 10. Bayesian posterior predictive demand distribution during lead time</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Figure 11. Predictive demand with reorder points</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>Figure 12. Predictive demand with reorder points</figcaption></figure>

The hierarchical Bayesian framework offers several important insights and practical benefits for managing customer demand uncertainty across multiple SKUs. Unlike classical estimation methods that produce single-point forecasts, the Bayesian approach provides full posterior and predictive distributions, quantifying both the expected demand level and the uncertainty surrounding it. This richer probabilistic output enables more informed inventory and replenishment decisions.

The close alignment between the posterior means and the true underlying demand rates demonstrates that the model effectively learns from limited data. Even with only 30 daily observations per SKU, the posterior variance was small, suggesting rapid Bayesian convergence. The use of hierarchical priors also allowed the model to share statistical strength among SKUs—particularly valuable for items with sparse or noisy data—thereby stabilizing estimates while preserving individual SKU differences.

From a managerial perspective, these results imply that Bayesian demand estimation can improve stock control and service-level decisions. The posterior predictive distributions reveal asymmetric risk: occasional high-demand spikes
that are not captured by deterministic models. Accounting for this uncertainty allows managers to allocate safety stock more efficiently, avoiding both stockouts and excess inventory.

In practical implementation, the predictive distributions derived here can feed directly into reorder point optimization, service-level analysis, and lead-time demand forecasting. Future extensions could incorporate covariates (such as price or promotion effects) or temporal structures (such as seasonality or trend) within a dynamic hierarchical framework, further enhancing forecast accuracy and decision quality.

## 4.5 Supplier Lead Time

Lead time from suppliers exhibited variability due to production schedules, transportation delays, and other logistical factors. The mean lead time was calculated as 6 days, with a standard deviation of 0.25 days. Analysis of the lead time distribution showed approximately normal, suggesting that occasional delays are likely and must be incorporated into inventory planning to maintain service levels.

<figure><img src="image_15.png" /><figcaption>Figure 13. Bayesian inference of supply chain lead time</figcaption></figure>
<figure><img src="image_16.png" /><figcaption>Figure 14. Bayesian inference predictive distribution</figcaption></figure>

## Posterior inference for demand rate (λ)

Using the conjugate Gamma posterior for the Poisson demand model, the posterior for the daily demand rate λ is

$$ \text{Gamma} (a_{\lambda}A + \sum y, b_{\lambda} + n_{\text{days}}) \qquad (21) $$

with $\Sigma y = 250$ observed units over 60 days, the posterior parameters are (a=252) and (b=61) (rate). Posterior draws give:

* Posterior mean $\hat{\lambda} = 4.130$ units/day.

* 95% credible interval: ([3.634, 4.668]) units/day.

The posterior is tightly centered near the true data-generating value (4.2) and reflects the amount of observed demand data (60 days).

## Posterior inference for lead-time (μ, σ)
We fit the Normal–Inverse–Gamma model for lead time ($L \sim \text{Normally}(\mu, \sigma^2)$) using Gibbs sampling for $(\mu, \sigma^2)$. After discarding a burn-in of 3,000 iterations, posterior summaries are:

* Posterior mean of lead-time mean: $\hat{\mu} = 5.785$ days.

* 95% credible interval for $\mu$: ([5.242, 6.323]) days.

* Posterior mean of lead-time standard deviation: $\hat{\sigma} = 1.375$ days.

* 95% credible interval for $\sigma$: ([1.065, 1.805]) days.

These estimates show moderately tight posterior uncertainty around the true-generating mean (6.0 days) and a posterior SD slightly below the true value (1.5), consistent with the finite lead-time sample ($n = 25$) and the chosen priors.

### Posterior predictive distribution: demand during lead time

We constructed the posterior predictive distribution of demand during lead time by pairing posterior draws of $\lambda$ and $L$, sampling $L \sim \text{Normal}(\mu, \sigma^2)$ and then $D_{LT} \sim \text{Poisson}(\lambda \cdot L)$. Summaries:

* Posterior predictive mean demand during lead time: $E[D_{LT}] \approx 23.96$ units.

* 95% posterior predictive interval for $D_{LT}$: [10, 40] units.

The predictive distribution is right-skewed (Poisson mixing with a continuous $L$) and reflects joint uncertainty in both demand rate and lead time.

### Reorder points for target service levels

We recommended reorder points (R) as the empirical quantiles of the posterior predictive demand during lead time (i.e., the minimal R such that $P(D_{LT} \le R) \ge \text{target service level}$). Using the posterior predictive sample, the round-up reorder points are:

* Cycle service level 90%: $R_{90\%} = 34$ units

* Cycle service level 90%: $R_{95\%} = 37$ units

* Cycle service level 90%: $R_{99\%} = 44$ units
These R values incorporate both parameter uncertainty and natural stochasticity of demand during lead time, so they are larger than what a point-estimate approach using $\bar{\lambda}$ and $\hat{\mu}$ alone would typically produce for the same nominal service levels.

## Model fit and operational implications

* Posterior predictive checking (histogram and quantiles of $D_{LT}$) indicates the model reproduces the observed variability in lead-time demand without obvious systematic misfit.

* Operationally, using the full posterior predictive distribution to choose reorder points reduces the risk of underestimating safety stock that arises from ignoring parameter uncertainty. In this example, the predictive mean demand during lead time (~24 units) and the 95% upper bound (~40 units) show the potential gap between an average-based policy and a risk-averse service-level policy.

<figure><img src="image_17.png" /><figcaption>Figure 15. Bayesian inference predictive distribution</figcaption></figure>
<figure><img src="image_18.png" /><figcaption>Figure 16. Bayesian inference predictive distribution</figcaption></figure>

<figure><img src="image_19.png" /><figcaption>Figure 17. Bayesian inference posterior of mean lead time</figcaption></figure>
<figure><img src="image_20.png" /><figcaption>Figure 18. Bayesian inference posterior of lead time</figcaption></figure>

## 4.6 Reorder Point Analysis

The reorder point (ROP) in supply chain management is the inventory level at which a new order should be placed to replenish stock before it runs out. Essentially, it's a trigger point that balances the risk of stockouts with the cost of holding inventory.

Reorder point (ROP) = Average Demand during Lead Time + Safety Stock where:

* Average Demand during Lead Time = demand per day × lead time in days

* Safety Stock = extra inventory to protect against demand or lead time variability

* Lead Time Demand: The expected consumption while waiting for the new order.

* Safety Stock: Buffer to prevent stockouts if demand or lead time is unpredictable.

* Goal: Avoid stockouts while minimizing holding costs.
The reorder point (ROP) was computed considering both demand variability and lead time uncertainty. Simulation of inventory dynamics using this ROP demonstrated that stockouts were minimized while avoiding excessive inventory holding costs. Sensitivity analysis further showed that increases in demand variability or lead time require proportional adjustments to the reorder point to sustain service reliability.

<figure><img src="image_21.png" /><figcaption>Figure 19. Bayesian reorder point vs lead time</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>Figure 20. Posterior predictive $D_L$; product 1</figcaption></figure>
Product 2: Posterior predictive D<sub>L</sub>

<figure><img src="image_23.png" /><figcaption>Figure 21. Posterior predictive D<sub>L</sub>; product 2</figcaption></figure>

Product 3: Posterior predictive D<sub>L</sub>

<figure><img src="image_24.png" /><figcaption>Figure 22. Posterior predictive D<sub>L</sub>; product 3</figcaption></figure>

Product 4: Posterior predictive D<sub>L</sub>

<figure><img src="image_25.png" /><figcaption>Figure 23. Posterior predictive D<sub>L</sub>; product 4</figcaption></figure>
<figure><img src="image_26.png" /><figcaption>Figure 23. Expected cost vs. R; product 1</figcaption></figure>

<figure><img src="image_27.png" /><figcaption>Figure 24. Expected cost vs. R; product 2</figcaption></figure>

<figure><img src="image_28.png" /><figcaption>Figure 25. Expected cost vs. R; product 3</figcaption></figure>
<figure><img src="image_29.png" /><figcaption>Figure 26. Expected cost vs. R; product 4</figcaption></figure>

The hierarchical Bayesian reorder-point analysis was implemented for four products with unequal-length demand and lead time observations. Gibbs sampling was performed for 8,000 iterations with 3,000 burn-in and thinning every two iterations, yielding 2,500 posterior draws. The model successfully estimated both demand and lead-time distributions while accounting for cross-product variability through hierarchical priors.

Posterior results indicate clear differences in product demand and replenishment behavior. The estimated posterior mean daily demand ($E[μ_j]$) and mean lead time ($E[λ_j]$) for each product are summarized below, along with their corresponding optimal reorder points ($R^*$).

<table><caption>**Table 4.** Posterior mean daily demand and mean lead time</caption><thead><tr><td>Product</td><td>Posterior Mean Daily Demand (units/day)</td><td>Posterior Mean Lead Time (days)</td><td>Optimal Reorder Point (R*) (units)</td></tr></thead><tbody><tr><td>1</td><td>106.1</td><td>5.0</td><td><strong>540.2</strong></td></tr><tr><td>2</td><td>45.3</td><td>4.0</td><td><strong>180.4</strong></td></tr><tr><td>3</td><td>157.6</td><td>6.0</td><td><strong>960.8</strong></td></tr><tr><td>4</td><td>72.1</td><td>4.3</td><td><strong>310.5</strong></td></tr></tbody></table>

The posterior predictive distributions of demand during lead time $D_L$ revealed distinct uncertainty levels across products. Product 3 exhibited the highest
variability due to its larger demand scale and longer lead times, while Product 2 showed the tightest posterior spread. Expected cost functions were evaluated across a grid of reorder points for each product using the loss function:

$$C(R) = hE[\max(0, R - D_L)] + pE[\max(0, D_L - R)] \quad (21)$$

where h=1 and p=10. The cost curves were convex and well-behaved, with clearly defined minima at $R^*$. The optimal reorder points balanced the trade-off between holding and shortage costs, increasing proportionally with both the mean demand and the variability of $D_L$. Visual inspection of posterior predictive histograms confirmed that the Bayesian model adequately captured uncertainty in demand and lead time. Products with more limited data (e.g., Product 2) benefited from hierarchical pooling, producing stabilized posterior estimates and realistic reorder thresholds. The hierarchical Bayesian reorder-point model provided meaningful insights into the demand and inventory behavior of the four analyzed products. Posterior estimates revealed that products with higher average demand and longer lead times required substantially larger reorder points to mitigate the risk of stockouts. For example, Product 3—characterized by both high mean demand and longer replenishment time—showed the highest optimal reorder point, reflecting the system's need for greater safety stock. In contrast, Product 2, with low and stable demand, exhibited the smallest reorder threshold and narrowest uncertainty range. These findings illustrate the balance between inventory holding costs and shortage penalties in the reorder-point decision. The convex cost functions derived from posterior predictive simulations showed clear minima, confirming that the Bayesian optimization effectively identified cost-efficient thresholds. The results also demonstrated the advantage of hierarchical modeling: products with limited or noisy data benefited from shared information across the product hierarchy, resulting in smoother posterior distributions and more realistic reorder policies. The hierarchical Bayesian approach provided a robust probabilistic foundation for inventory control. It integrated uncertainty in both demand and lead time while sharing information across products, leading to more reliable and data-driven reorder-point decisions compared with deterministic or non-hierarchical models.

Overall, the model captures the full uncertainty in both demand and lead time, producing actionable probabilistic reorder points rather than fixed, deterministic values. This probabilistic insight is particularly useful for supply chain managers facing variable demand or unreliable supplier performance.
# 5. Conclusions

This study applied a hierarchical Bayesian model to estimate and forecast customer demand across multiple SKUs, demonstrating the effectiveness of Bayesian inference in capturing both expected demand levels and the uncertainty surrounding them. The results showed that posterior estimates closely matched the true underlying demand rates, confirming the model's ability to learn efficiently from limited data. By modeling demand probabilistically rather than deterministically, the Bayesian approach provides decision-makers with credible intervals and predictive distributions that better represent real-world variability. This enables more accurate and risk-aware inventory management, including the setting of reorder points and safety stocks. The hierarchical structure further enhances robustness by allowing information sharing among products, improving estimation for SKUs with sparse or volatile data. In summary, Bayesian demand estimation offers a comprehensive, data-driven foundation for supply chain planning, supporting more resilient and adaptive operations in uncertain market environments. Future work could extend this framework to dynamic Bayesian models incorporating seasonality, promotions, or external demand drivers, enabling continuous learning and improved forecast accuracy over time.

The Bayesian joint inference framework effectively captured the uncertainty in both daily demand and supplier lead time, yielding realistic and data-consistent estimates. Posterior inference for the Poisson demand rate demonstrated that the posterior distribution was sharply concentrated around the true demand level (≈4.2 units/day), confirming strong learning from 60 days of data. Similarly, the Normal-Inverse-Gamma model for lead time accurately recovered the true mean (≈6 days) and variability, with moderately tight credible intervals reflecting the smaller sample size (n = 25).

By combining posterior draws of demand rate and lead time, the posterior predictive distribution of demand during lead time provided a comprehensive characterization of uncertainty. The resulting distribution was right-skewed and wider than a simple deterministic estimate, illustrating how both parameter and process variability contribute to the total uncertainty in inventory needs. Reorder points derived from the posterior predictive quantiles provided service-level-specific inventory thresholds that are more conservative and robust than point-estimate policies. These Bayesian reorder points account for both stochastic and parameter uncertainty, ensuring higher service reliability without unnecessary overstocking.

Overall, the Bayesian approach offered a coherent and interpretable framework for integrating demand and lead-time uncertainty. It improved decision quality by quantifying the full predictive risk in lead-time demand and enabling data-driven selection of reorder points aligned with desired service levels.
REFERENCES

[1]Ben-Tal, A., El Ghaoui, L., & Nemirovski, A. (2009). Robust optimization. Princeton University Press.

[2]Birge, J. R., & Louveaux, F. (2011). Introduction to stochastic programming (2nd ed.). Springer.

[3]Chakraborty, S., Banerjee, A., & Mitra, D. (2021). Bayesian modeling for demand uncertainty in supply chain networks. International Journal of Production Economics, 234, 108033

[4]Ben-Tal, A., El Ghaoui, L., & Nemirovski, A. (2009). Robust optimization. Princeton University Press.

[5]Fahimnia, B., & Jabbarzadeh, A. (2016). Marrying supply chain sustainability and resilience: A match made in heaven. *Transportation Research Part E: Logistics and Transportation Review, 91, 306–324

[6]Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2020). Bayesian data analysis (3rd ed.)

[7]Ghosh, S., & Chatterjee, R. (2022). Bayesian networks for risk and reliability modeling in complex supply chains. Computers & Industrial Engineering, 165, 107939.

[8]Hosseini, S., Ivanov, D., & Dolgui, A. (2019). Review of quantitative methods for supply chain resilience analysis. Transportation Research Part E: Logistics and Transportation Review, 125, 285–307. https://doi.org/10.1016/j.tre.2019.03.001

[9]Ivanov, D., & Dolgui, A. (2020). A digital supply chain twin for managing the disruption risks and resilience in the era of Industry 4.0. Transportation Research Part E: Logistics and Transportation Review, 142, 102190

[10]Kouvelis, P., & Yu, G. (1997). Robust discrete optimization and its applications. Springer.

[11]Li, X., Zhang, Y., & Liu, H. (2023). Integrating Bayesian inference and IoT technologies for real-time supply chain monitoring. Journal of Manufacturing Systems, 68, 133–147.

[12]Murphy, K. P. (2023). *Probabilistic machine learning: Advanced topics. MIT Press.

[13]Sawik, T. (2013). Integrated selection of suppliers and scheduling of customer orders in the presence of supply chain disruption risks. International Journal of Production Research, 51(23–24), 7006–7022.

[14]Shapiro, A., Dentcheva, D., & Ruszczyński, A. (2009). Lectures on stochastic programming: Modeling and theory (2nd ed.). SIAM and MPS.

[15]Simchi-Levi, D., Kaminsky, P., & Simchi-Levi, E. (2008). Designing and managing the supply chain: Concepts, strategies and case studies (3rd ed.). McGraw-Hill/Irwin.

[16]Snyder, L. V., & Shen, Z.-J. M. (2019). Fundamentals of supply chain theory (2nd ed.). Wiley.

[17]Snyder, L. V., Atan, Z., Peng, P., Rong, Y., Schmitt, A. J., & Sinsoysal, B. (2016). OR/MS models for supply chain disruptions: A review. IIE Transactions, 48(2), 89–109.
[18]Tordecilla, R. D., Lamghari, A., & Frayret, J. M. (2019). A stochastic programming approach for sustainable transportation planning under uncertainty. *Computers & Industrial Engineering*, *127*, 687–699

[19]Wang, T., Xu, L., & Zhou, J. (2024). A comprehensive Bayesian framework for real-time supply chain risk assessment. *Decision Support Systems*, *174*, 114052.

[20]Xiao, Y., & Chen, J. (2018). Hierarchical Bayesian modeling for multi-echelon inventory systems. *European Journal of Operational Research*, *267*(2), 537–550.

[21]Xu, X., Lu, Y., Vogel-Heuser, B., & Wang, L. (2021). Industry 4.0 and Industry 5.0—Inception, conception and perception. *Journal of Manufacturing Systems*, *61*, 530–535

[22]Zhang, Y., & Zhao, X. (2019). Uncertainty modeling and risk mitigation in global supply chains: A review of stochastic and robust optimization approaches. *Omega*, *83*, 143–157.

[23]Zipkin, P. H. (2000). *Foundations of inventory management*. McGraw-Hill.