# Service Level Agreement Violations in Cloud Storage: Insurance and Compensation Sustainability
## 4 Loss Statistics
### The Pareto-Lognormal Model
#### 4.4.1 Number of Outages  
In order to derive the expected value and the variance of the number of outages \(N_{\text{f}}\), we first derive its probability distribution. We describe the behaviour of the cloud during the observation interval \(T\) through the two sequence of alternating operating periods and outages:  
\[ \begin{split}\mathcal{S}&=\{S_{1},S_{2},\dots,S_{i},\dots\},\\ \mathcal{D}&=\{D_{1},D_{2},\dots,D_{i},\dots\},\end{split}  \tag{19}\]  
where all the \(S_{i}\)'s are i.i.d.random variables following a Pareto distribution, while the \(D_{i}\)'s are i.i.d. random variables following a lognormal distribution. The details of the two distribution are described in Section 2.2. We start by considering the probability that there are no outages during the observation interval, which is tantamount to saying that the first operating period \(S_{1}\) lasts more than the observation interval:  
\[\mathbb{P}[N_{\text{f}}=0]=\mathbb{P}(S_{1}>T)=\left(\frac{h}{T}\right)^{ \alpha}. \tag{20}\] \begin{table}
\begin{tabular}{l r} \hline \hline
**Company** & **Loss per Minute [USS]** \\ \hline EdiActivity & 1 \\ GXS & 913 \\ Salesforce & 7743 \\ eBay & 30,536 \\ Southwest Airlines & 35,407 \\ Google & 113,641 \\ Amazon & 141,647 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Unit loss. The probability that a single outage takes place over \(T\) is instead the probability that there is at least an outage minus the probability that there are at least two outages:  
\[ \begin{split}\mathbb{P}[N_{\text{f}}=1]&=\mathbb{P}[N _{\text{f}}\geq 1]-\mathbb{P}[N_{\text{f}}\geq 2]\\ &=1-\mathbb{P}(N_{\text{f}}=0)-\mathbb{P}[S_{1}+D_{1}+S_{2}<T]. \end{split}  \tag{21}\]  
Similarly, we have  
\[ \begin{split}\mathbb{P}[N_{\text{f}}=2]&=1-\mathbb{P} [N_{\text{f}}=0]-\mathbb{P}(N_{\text{f}}=1)\\ &-\mathbb{P}[S_{1}+D_{1}+S_{2}+D_{2}+S_{3}<T],\end{split}  \tag{22}\]  
so that we can write the general recursive expression  
\[ \begin{split}\mathbb{P}[N_{\text{f}}=i]&=1-\sum_{j =0}^{i-1}\mathbb{P}[N_{\text{f}}=j]-\mathbb{P}\left[\sum_{k=1}^{i+1}S_{k}+\sum_ {k=1}^{i}D_{k}<T\right]\\ i&=1,2,\ldots\end{split}  \tag{23}\]  
Unfortunately, Equation (23) involves the distribution of a sum of Pareto and lognormal random variables, for which no simple expression is known. However, since the third term in that equation involves a number of variables, we can define the sequence of variables  
\[Z_{i}=\sum_{k=1}^{i+1}S_{k}+\sum_{k=1}^{i}D_{k}\qquad i=1,2,\ldots \tag{24}\]  
and invoke the central limit theorem for it, so that we approximate the distribution of each \(Z_{i}\) by a normal distribution with moments  
\[ \begin{split}\mathbb{E}[Z_{i}]&=\sum_{k=1}^{i+1} \mathbb{E}[S_{k}]+\sum_{k=1}^{i}\mathbb{E}[D_{k}]=(i+1)\mathbb{E}[S_{1}]+i \mathbb{E}[D_{1}]\\ &=(i+1)\text{MTTF}+i\cdot\text{MTTR}\\ &=(i+1)\frac{\alpha}{\alpha-1}h+i\cdot e^{\mu+\frac{\sigma^{2}}{2 }},\end{split}  \tag{25}\]  
\[ \begin{split}\mathbb{V}[Z_{i}]&=\sum_{k=1}^{i+1} \mathbb{V}[S_{k}]+\sum_{k=1}^{i}\mathbb{V}[D_{k}]=(i+1)\mathbb{V}[S_{1}]+i \mathbb{V}[D_{1}]\\ &=(i+1)\frac{\alpha}{(\alpha-1)^{2}(\alpha-2)}h^{2}+i(e^{\sigma ^{2}}-1)e^{2\mu+\sigma^{2}},\end{split}  \tag{26}\]  
after recalling Equation (7).