## 4 Confidence Interval of Damage: Non-Stationary Case
### Confidence Interval of Damage for a Switching Loading with Two or More States
By following the procedure of Section 3.2, the values \(D_{B,ij}(T_{B,i})\) are used to compute the sample mean \(\overline{D}_{B,i}(T_{B,i})\) and sample variance \(\delta^{2}_{D_{B,i}}\) of block damage in state \(i\):  
\[\overline{D}_{B,i}(T_{B,i})=\frac{1}{N_{B}}\sum_{j=1}^{N_{B}}D_{B,ij}(T_{B,i} )\,\delta^{2}_{D_{B,i}}=\frac{1}{N_{B}-1}\ \sum_{j=1}^{N_{B}}\bigl{[}D_{B,ij}(T_{B,i})-\overline{D}_{B,i}(T_{B,i}) \bigr{]}^{2} \tag{15}\]  
which are computed for \(i\) from \(1\) to \(N_{S}\), so there are in total \(N_{S}\) values of \(\overline{D}_{B,i}(T_{B,i})\) and \(\delta^{2}_{D_{B,i}}\). There are also \(N_{S}\) values of \(E[D_{B,i}(T_{B,i})]\), \(i=1,2,\ldots N_{S}\). At this stage, the goal is to construct a confidence interval on the sum of expected block damages, namely \(\sum_{i=1}^{N_{S}}E[D_{B,i}(T_{B,i})]\). The similitude with the problem explained in Section 4.1 is now apparent, provided that the quantities \(\overline{x}_{i}\), \(s_{i}^{2}\) and \(\mu_{i}\) in Equation (13)  
Figure 1: Non-stationary switching stress-time history with 3 stationary states and 2 blocks in each state. are replaced by \(\overline{D}_{B,i}(T_{B,i})\), \(\hat{\sigma}^{2}_{D_{B,i}}\) and \(E[D_{B,i}(T_{B,i})]\), respectively. The number of random variables coincides with the number of states, \(N=N_{S}\); the sample size is the number of blocks, \(n=N_{B}\). The confidence interval on the sum of expected block damages then is  
\[\left(\sum_{i=1}^{N_{S}}\overline{D}_{B,i}(T_{B,i})\right)-t_{\alpha/2,\
u_{Z}} \sqrt{\sum_{i=1}^{N_{S}}\hat{\sigma}^{2}_{D_{B,i}}}\leq\sum_{i=1}^{N_{S}}E[D_{ B,i}(T_{B,i})]\leq\left(\sum_{i=1}^{N_{S}}\overline{D}_{B,i}(T_{B,i})\right)+t_{ \alpha/2,\
u_{Z}}\sqrt{\sum_{i=1}^{N_{S}}\hat{\sigma}^{2}_{D_{B,i}}} \tag{16}\]  
where \(t_{\alpha/2,\
u_{Z}}\) is the usual upper \(\alpha/2\) percentage point of a \(t\) distribution with degrees of freedom (case of common \(N_{B}\) for any \(i\)):  
\[v_{Z}\cong(N_{B}-1)\frac{\left(\sum_{i=1}^{N_{S}}\hat{\sigma}^{2}_{D_{B,i}} \right)^{2}}{\sum_{i=1}^{N_{S}}\left(\hat{\sigma}^{2}_{D_{B,i}}\right)^{2}} \tag{17}\]  
Equation (16) can be further elaborated to a simpler form for practical use. After substituting in Equation (16) the sample mean \(\overline{D}_{B,i}(T_{B,i})\) in Equation (15) and then multiplying by \(N_{B}\), the confidence interval expression becomes  
\[\sum_{i=1}^{N_{S}}\sum_{j=1}^{N_{B}}D_{B,ij}(T_{B,i})-t_{\alpha/2,\
u_{Z}} \sqrt{\sum_{i=1}^{N_{S}}N_{B}.\hat{\sigma}^{2}_{D_{B,i}}}\leq\sum_{i=1}^{N_{S} }N_{B}.E[D_{B,i}(T_{B,i})]\leq\sum_{i=1}^{N_{S}}\sum_{j=1}^{N_{B}}D_{B,ij}(T_{ B,i})+t_{\alpha/2,\
u_{Z}}\sqrt{\sum_{i=1}^{N_{S}}N_{B}.\hat{\sigma}^{2}_{D_{B,i}}} \tag{18}\]  
If Equation (7) is now considered, it is easy to recognize that \(N_{B}.E[D_{B,i}(T_{B,i})]=E[D_{S,i}(T_{S,i})]\) represents the expected damage for the \(i\)-th state. Furthermore, the single summation \(\sum_{i=1}^{N_{S}}N_{B}.E[D_{B,i}(T_{B,i})]=\sum_{i=1}^{N_{S}}E[D_{S,i}(T_{S,i})]=E[D(T)]\) gives the expected damage of the entire non-stationary record \(z(t)\). The double summation \(D(T)\cong\sum_{i=1}^{N_{S}}\sum_{j=1}^{N_{B}}D_{B,ij}(T_{B})\) corresponds to the total damage of \(z(t)\)--the approximation in the equal sign lies in the small amount of cycles lost after block subdivision, already discussed in previous sections. Upon substituting the quantities obtained so far, \(D(T)\) and \(E[D(T)]\), it is possible to rewrite Equation (18) into the final expression of the confidence interval on \(E[D(T)]\) for a single non-stationary switching stress-time history \(z(t)\):  
\[D(T)-t_{\alpha/2,\
u_{Z}}\sqrt{\sum_{i=1}^{N_{S}}N_{B}.\hat{\sigma}^{2}_{D_{B, i}}}\leq E[D(T)]\leq D(T)+t_{\alpha/2,\
u_{Z}}\sqrt{\sum_{i=1}^{N_{S}}N_{B}. \hat{\sigma}^{2}_{D_{B,i}}} \tag{19}\]  
In this formula, the quantities \(D(T)\) and \(\hat{\sigma}^{2}_{D_{B,i}}\) are known appears only once in its full length. An illustrative example is shown in Figure 2. It shows three states split into sectors of different length.