∫ Mathematical Derivations
Complete mathematical theory behind ARIMA forecasting and inventory optimization - formatted for BSc Mathematics viva presentation.
1. Time Series
A time series is a sequence of observations $\{Y_t\}_{t=1}^n$ indexed by time $t$. In inventory management, $Y_t$ represents demand in period $t$.
Formally, a time series is a collection of random variables ordered by time. The goal is to model the data-generating process and use it for forecasting.
• Trend (T): Long-term increase or decrease
• Seasonality (S): Periodic fluctuations
• Cyclical (C): Non-periodic fluctuations
• Irregular (I): Random noise
Classical decomposition: $Y_t = T_t + S_t + C_t + I_t$ (additive)
2. Stationarity
A time series $\{Y_t\}$ is weakly (covariance) stationary if its statistical properties are invariant to shifts in time.
3. Augmented Dickey-Fuller (ADF) Test
The ADF test tests for a unit root in an autoregressive model. A series with a unit root is non-stationary.
H₁ (Alternative): $\gamma < 0$ - no unit root → stationary
Test Statistic: $\tau = \hat{\gamma} / SE(\hat{\gamma})$ (follows Dickey-Fuller distribution, not standard normal)
Decision Rule: Reject H₀ if $\tau <$ critical value or $p$-value $< \alpha = 0.05$
The augmented terms $\sum \delta_i \Delta Y_{t-i}$ account for higher-order autocorrelation (lags selected by AIC).
4. Differencing
Differencing is a transformation applied to a non-stationary series to induce stationarity. It removes deterministic trends.
d is the "I" (Integrated) in ARIMA(p, d, q)
Example: Random walk $Y_t = Y_{t-1} + \varepsilon_t$ → $\Delta Y_t = \varepsilon_t$ (white noise - stationary!)
5. Autoregressive Model - AR(p)
An AR(p) model expresses $Y_t$ as a linear combination of its p previous values plus a white noise term.
$\varepsilon_t$ = white noise: $\varepsilon_t \sim WN(0, \sigma^2)$
Stationarity condition: All roots of $\phi(z) = 0$ must lie outside the unit circle $|z| > 1$
Identification: PACF cuts off sharply at lag $p$ for AR(p) processes
AR(1) Yule-Walker: $\phi_1 = \rho(1)$, AR(2): solve $\begin{pmatrix} 1 & \rho(1) \\ \rho(1) & 1 \end{pmatrix}\begin{pmatrix}\phi_1\\\phi_2\end{pmatrix} = \begin{pmatrix}\rho(1)\\\rho(2)\end{pmatrix}$
6. Moving Average Model - MA(q)
An MA(q) model expresses $Y_t$ as a linear combination of the current and past q white noise (shock) terms.
Invertibility condition: All roots of $\theta(z) = 0$ must lie outside the unit circle
Autocorrelation: $\text{Cov}(Y_t, Y_{t-k}) = 0$ for $k > q$ → ACF cuts off at lag $q$
This makes MA(q) always stationary (finite variance regardless of coefficients)
Identification: ACF cuts off sharply at lag $q$ for MA(q) processes
7. ARIMA(p, d, q) Model
ARIMA combines the AR and MA components with differencing to handle non-stationary series. It is the Box-Jenkins methodology.
d = degree of differencing (makes series stationary)
q = order of moving average part (number of MA lags)
Parameter Estimation: Maximum Likelihood Estimation (MLE)
$$\hat{\Theta} = \arg\max_\Theta \ln L(\Theta | Y_1, \ldots, Y_n)$$ where $\Theta = (\phi_1,\ldots,\phi_p, \theta_1,\ldots,\theta_q, \sigma^2)$
Model Selection:
$\text{AIC} = -2\ln\hat{L} + 2k$ $\text{BIC} = -2\ln\hat{L} + k\ln n$
where $k$ = number of parameters, $n$ = sample size. Minimise AIC/BIC.
8. Autocorrelation Function (ACF)
The ACF measures the linear dependence between $Y_t$ and $Y_{t-k}$ for lag $k$. It is the primary tool for identifying MA order.
Lags where $|\hat{\rho}(k)| > 1.96/\sqrt{n}$ are statistically significant at the 5% level.
Patterns:
• AR(p): ACF decays exponentially or with damped oscillations
• MA(q): ACF has sharp cutoff after lag $q$ (spikes only for $k \leq q$)
• ARMA(p,q): ACF decays exponentially after lag $q$
9. Partial Autocorrelation Function (PACF)
PACF measures the correlation between $Y_t$ and $Y_{t-k}$ after removing the linear effects of all intermediate lags $Y_{t-1}, \ldots, Y_{t-k+1}$.
Yule-Walker Equations give the PACF via:
$\begin{pmatrix}\gamma(0) & \gamma(1) & \cdots & \gamma(k-1)\\ \vdots & & & \vdots \\ \gamma(k-1) & \cdots & & \gamma(0)\end{pmatrix} \begin{pmatrix}\phi_{k1}\\ \vdots\\ \phi_{kk}\end{pmatrix} = \begin{pmatrix}\gamma(1)\\ \vdots\\ \gamma(k)\end{pmatrix}$
Patterns:
• AR(p): PACF has sharp cutoff after lag $p$
• MA(q): PACF decays exponentially
• ARMA(p,q): PACF decays after lag $p-q$
10. Mean Absolute Error (MAE)
• Unit: same as $Y_t$ (demand units)
• Robust to outliers (linear loss function)
• Minimised by the median forecast
• All errors receive equal weight regardless of magnitude
11. Root Mean Squared Error (RMSE)
• Unit: same as $Y_t$ (demand units)
• Sensitive to outliers (quadratic loss function)
• Minimised by the mean forecast
• Always: $\text{RMSE} \geq \text{MAE}$ (by Cauchy-Schwarz inequality)
• $\text{RMSE} = \text{MAE}$ only when all forecast errors are equal in magnitude
12. Mean Absolute Percentage Error (MAPE)
MAPE < 10%: Highly Accurate | 10-20%: Good | 20-50%: Reasonable | >50%: Inaccurate
Limitation: Undefined when $Y_t = 0$; asymmetric (penalises positive errors more)
Advantage: Scale-free - allows comparison across different demand series
13. Economic Order Quantity (EOQ)
The EOQ model minimises total annual inventory cost by finding the optimal order quantity $Q^*$.
$D$ = Annual demand (units/year) $S$ = Ordering cost per order (₹)
$H$ = Holding cost per unit per year (₹) $Q^*$ = Optimal order quantity
Second-order condition: $\frac{d^2(\text{TC})}{dQ^2} = \frac{2DS}{Q^3} > 0$ → confirms this is a minimum
Minimum Total Cost: $\text{TC}^* = \sqrt{2DSH}$
14. Safety Stock
Safety stock is a buffer maintained to protect against demand variability during the lead time.
Total lead time demand: $D_{LT} = \sum_{i=1}^{LT} D_i \sim \mathcal{N}(LT \cdot \mu_d,\; LT \cdot \sigma_d^2)$
We set safety stock so that: $P(D_{LT} \leq \text{ROP}) = \text{Service Level}$
$\Rightarrow$ SS = $Z_\alpha \cdot \sigma_{LT}$ where $Z_\alpha = \Phi^{-1}(\text{SL})$
Z-score table: SL 90% → Z=1.282 | SL 95% → Z=1.645 | SL 99% → Z=2.326
15. Reorder Point (ROP)
The ROP is the inventory level at which a replenishment order should be triggered to avoid stockout.
$\bar{d} \cdot LT$ = Expected demand during lead time (cycle stock component)
$Z_\alpha \cdot \sigma_d \cdot \sqrt{LT}$ = Buffer for demand uncertainty (safety stock component)
Decision Rule: When $\text{Inventory} \leq \text{ROP}$, immediately place an order of size $Q^*$ (EOQ).
Complete Policy: $(Q^*, \text{ROP})$ policy - orders of fixed size $Q^*$ placed when inventory hits $\text{ROP}$.