## 3 The Minimum Relative Regret of the wSAA Framework
### The Analysis of the SMP  
This section analyzes the SMP. A shipping company considers purchasing preventive maintenance services for a ship at a cost denoted by \(c\) (set to \(c=100\) for this discussion). For a ship, the generated income relies heavily on its operational condition and regular maintenance, as a well-kept vessel allows for uninterrupted service leading to consistent revenue, whereas a neglected ship might face service disruptions, reducing its earning potential. The ship's state is represented by its deficiency number, denoted by \(\tilde{y}\), which ranges from 0 to \(Q\). Specifically, the income, falling into the range of 0 to \(K\), is assumed to be Lipschitz continuous with respect to the number of deficiencies, regardless of the maintenance decision, as depicted in Figure 1 (with \(\mathcal{O}=20\) and \(K=1000\)). Figure 1 indicates that a ship's state significantly impacts its income. A pristine ship, with zero deficiencies, can generate a maximum income of \(K=1000\), irrespective of maintenance. As deficiencies rise to \(0.5Q=10\), a maintenance-less ship becomes inoperable and profitless. However, maintenance at this stage rectifies all issues, restoring maximum income generation. When deficiencies reach the peak \(Q=20\), the ship becomes irreparably inoperable, making maintenance futile and income unattainable. Importantly, the cost of preventive maintenance is less than the maximum potential income. Therefore, when deficiencies reach \(0.5Q=10\), maintenance becomes a financially prudent decision. We assume that a ship's deficiency number, \(\tilde{y}\), is a function of its age, denoted by \(x\), with the relationship defined as \(\tilde{y}=x\). As such, an ageing ship accumulates more deficiencies. A brand-new ship (\(x=0\)) is free of deficiencies and does not need maintenance, while a ship at the end of its lifespan (\(x=Q\)) is highly deficient, and failures may occur regardless of maintenance attempts. Assuming a ship has aged to \(x_{0}=0.5Q\), uncertainty arises regarding the relationship between age and deficiency number, that is, we do not know their underlying relationship. However, employing the wSAA framework to two known data points, (\(x_{1}=0,y_{1}=0\)) and (\(x_{2}=Q,y_{2}=Q\)), can guide the decision of maintenance purchasing. In this case, the new observation falls within the range of known data samples. Similarly, the wSAA framework assigns weight \(\pi\) to sample 1 and \(1-\pi\) to sample 2 (\(\pi\in[0,1]\)). We denote \(z\) as the decision variable, with 1 signifying the purchase of maintenance service and 0 the opposite. By reweighting \(y_{1}\) (\(\pi\)) and \(y_{2}\) (\(1-\pi\)) and fixing \(\pi\), we solve the following wSAA problem with the objective of maximizing profit (income minus maintenance cost):  
\[\max_{z\in\{0,1\}}\pi\big{(}\underbrace{(1-z)K+z(K-c)}_{\text{decision problem when }y_{1}=0}\big{)}+(1-\pi)\big{(}\underbrace{(1-z)0+z(0-c)}_{\text{decision problem when }y_{2}=Q}\big{)}, \tag{12}\]  
Figure 1: Income with respect to the deficiency number with and without maintenance. where the data-driven optimal decision is \(\hat{z}_{2,\text{SMP}}^{\text{wSAA}}(x_{0})=0\), which holds regardless of the value of \(\pi\). Given the underlying relationship \(\tilde{y}=x\), the expected number of deficiencies \(\mathbb{E}[\tilde{y}|x_{0}=0.5Q]=0.5Q\). Therefore, without maintenance (\(\hat{z}_{2,\text{SMP}}^{\text{wSAA}}(x_{0})=0\)) and referring to Figure 1, the expected profit from this data-driven decision is zero when the expected deficiency number is \(0.5Q\). However, with knowledge of the underlying relationship \(\tilde{y}=x\), the expected deficiency number \(\mathbb{E}[\tilde{y}|x_{0}=0.5Q]=0.5Q\). Examining Figure 1, in this case, the fully informed oracle would recommend \(z^{*}(x_{0})=1\), yielding an expected profit of \(K-c\).