# Service Level Agreement Violations in Cloud Storage: Insurance and Compensation Sustainability
## 4 Loss Statistics
### Number of Long Outages  
By long outages, we mean outages whose duration exceeds a given threshold \(w\). If the economic loss \(X_{u}\) for each long outage is \(k_{\text{lf}}\), the overall loss is proportional to the number \(N_{\text{lf}}\) of long outages:  
\[X_{\text{lf}}=k_{\text{lf}}N_{\text{lf}}=k_{\text{lf}}\sum_{i=1}^{N}I_{[D_{i}> w]}, \tag{11}\]  
where \(I_{[y]}\) is the indicator function, which takes the value \(1\) if the condition \(y\) is satisfied, and the value \(0\), otherwise. The indicator function is actually a random variable with a Bernoulli distribution, with its first two moments given by  
\[\begin{split}\mathbb{E}[I_{[D_{i}>w]}]&=\mathbb{P} \left[I_{[D_{i}>w]}=1\right]=1-\mathbb{P}[D_{i}<w]\\ &=1-\left[1-\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{\xi}} \right]=\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{\xi}},\end{split} \tag{12}\]\[\mathbb{V}[\mathrm{I}_{[D_{i}>w]}] =\mathbb{P}\left[\mathrm{I}_{[D_{i}>w]}=1\right]\left(1-\mathbb{P} \left[\mathrm{I}_{[D_{i}>w]}=1\right]\right) \tag{13}\] \[=\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}}\left[1-\left(1+ \frac{\xi w}{\beta}\right)^{-\frac{1}{5}}\right]\] \[=\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}}-\left(1+\frac{ \xi w}{\beta}\right)^{-\frac{5}{5}}.\]  
Since Equation (11) is a random sum of independent Bernoulli variables, we can obtain the probability distribution of the economic loss (which is now a discrete variable whose possible values are multiples of the unit loss per long outage \(k_{\mathrm{lf}}\)):  
\[\mathbb{P}[X_{\mathrm{lf}}=jk_{\mathrm{lf}}] =\sum_{n=1}^{\infty}\mathbb{P}\left[\sum_{i=0}^{n}\mathrm{I}_{[D _{i}>w]}=j\middle|N_{T}=n\right]\mathbb{P}[N_{T}=n] \tag{14}\] \[=\sum_{n=1}^{\infty}\binom{n}{j}\left(1+\frac{\xi w}{\beta} \right)^{-\frac{j}{5}}\] \[\times\left[1-\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}} \right]^{n-j}\times\frac{(\lambda T)^{n}}{n!}e^{-\lambda T}.\]  
We can now use [PERSON]'s identities to obtain a closed form expression. We assume that there is only a weak correlation among the number of summands in the sum (11) and each of the summands: the duration of an outage (e.g., its exceeding \(w\)) is independent of the number of outages, while the number of outages is very weakly correlated with the outage duration, as long as we consider services with high availability.  
By resorting to [PERSON]'s identities (see, e.g., Section 34.14.2.11 of [20] or Section 1.7.3 of [21]), we can therefore compute the mean and the variance of the economic loss  
\[\mathbb{E}[X_{\mathrm{lf}}] =k_{\mathrm{lf}}\mathbb{E}[N_{T}]\mathbb{E}\left[\mathrm{I}_{[D_{i }>w]}\right]=k_{\mathrm{lf}}\lambda T\left(1+\frac{\xi w}{\beta}\right)^{- \frac{1}{5}}, \tag{15}\] \[\mathbb{V}[X_{\mathrm{lf}}] =k_{\mathrm{lf}}^{2}\left\{\mathbb{E}^{2}\left[\mathrm{I}_{[D_{i }>w]}\right]\mathbb{V}[N_{T}]+\mathbb{V}\left[\mathrm{I}_{[D_{i}>w]}\right] \mathbb{E}[N_{T}]\right\}\] \[=k_{\mathrm{lf}}^{2}\left(1+\frac{\xi w}{\beta}\right)^{-\frac{2} {5}}\lambda T+k_{\mathrm{lf}}^{2}\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1 }{5}}\left[1-\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}}\right]\lambda T\] \[=k_{\mathrm{lf}}^{2}\lambda T\left(1+\frac{\xi w}{\beta}\right)^ {-\frac{1}{5}}\left\{\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}}+\left[ 1-\left(1+\frac{\xi w}{\beta}\right)^{-\frac{1}{5}}\right]\right\}\] \[=k_{\mathrm{lf}}^{2}\lambda T\left(1+\frac{\xi w}{\beta}\right)^ {-\frac{1}{5}}.\]