# On IoT-Friendly Skewness Monitoring for Skewness-Aware Online Edge Learning
## 3 Three Versions of Running Skewness and Efficient Calculation Methods
### Exponentially Weighted Sample Skewness (EWSS)  
This research derives the calculation method of EWSS by referring to the formula form of CSS, i.e., Equation System (4). In other words, different formula forms of CSS will result in different calculation methods of EWSS. Given the efficiency in the CSS calculation (cf. Section 3.1.3), we claim that the EWSS method in this research is also efficient. In particular, we argue for the relationship between exponentially weighted sample statistics and cumulative sample statistics by reusing the well-known derivation logic of exponentially weighted sample mean (EWSM) [36]. Thus, this paper also includes EWSM and exponentially weighted sample variance (EWSV) to facilitate explaining how we obtain the formula for calculating EWSS. 3.3.1. Calculation of Exponentially Weighted Sample Mean (EWSM)  
As specified in Appendix A.7, Equation (8) for calculating EWSM is essentially a formula transformation from CSM. \[\bar{x}_{w(n+1)}=(1-\alpha)\cdot\bar{x}_{w(n)}+\alpha\cdot x_{n+1},\ \ \ \ \ n>0,\ \alpha\in(0,1) \tag{8}\]  
where \(\bar{x}_{w(n)}\) represents the sample mean of a time series of \(n\) observation values \(x_{1},x_{2},\ldots,x_{n}\) with exponentially decreasing weights, while \(\bar{x}_{w(n+1)}\) indicates the updated EWSM after the new value \(x_{n+1}\) joins the observation time series. In particular, \(\alpha\) is a constant coefficient between 0 and 1, and a bigger \(\alpha\) discounts the contribution of older data faster in the EWSM calculation. 3.3.2. Calculation of Exponentially Weighted Sample Variance (EWSV)  
Benefiting from the CSV formula (3), we define Equation (9) to calculate EWSV. Despite different notations, this equation is also available in the open source community [17]. \[s^{2}_{w(n+1)}=(1-\beta)\cdot s^{2}_{w(n)}+\beta\cdot(x_{n+1}-\bar{x}_{w(n+1) })(x_{n+1}-\bar{x}_{w(n)}),\ \ \ \ \ \ \ n>0,\beta\in(0,1) \tag{9}\]  
where \(s^{2}_{w(n)}\) denotes the EWSV of a time series of \(n\) observations; \(s^{2}_{w(n+1)}\) represents the updated EWSV after a new observation \(x_{n+1}\) joins the time series, and \(\beta\) is also defined as a constant coefficients between 0 and 1, for discounting the contribution of older data in the EWSV calculation. In addition, we further constrain the relation between \(\alpha\) and \(\beta\), as shown in Equation System (10) and explained in Appendices A.8 and A.9. 3.3.3. Calculation of Exponentially Weighted Sample Skewness (EWSS)  
Following the same derivation strategy as specified in Appendix A.9, we obtain the equation system (10) for calculating EWSS. \[ \begin{split}\frac{1}{\alpha}-\frac{1}{\beta}=1,\ \ \ \ \ \ \ \ \alpha,\beta\in(0,1),\ \ n>0\\ (1-2\alpha)\cdot s^{3}_{w(n+1)}\cdot S_{w(n+1)}=(1-\beta)(1-2 \beta)\cdot s^{3}_{w(n)}\cdot S_{w(n)}-3\cdot(\bar{x}_{w(n+1)}-\bar{x}_{w(n)} )(1-\beta)\cdot s^{2}_{w(n)}+\\ \beta\cdot(x_{n+1}-\bar{x}_{w(n+1)})(x_{n+1}-\bar{x}_{w(n)}) \cdot[x_{n+1}-\bar{x}_{w(n+1)}-(\bar{x}_{w(n+1)}-\bar{x}_{w(n)})]\end{split}  \tag{10}\]  
where \(\alpha\) and \(\beta\) are constant coefficients directly reused from Equations (8) and (9), respectively; \(S_{w(n)}\) denotes the EWSS of a time series of \(n\) observations; and \(S_{w(n+1)}\) is the updated EWSS after a new observation \(x_{n+1}\) joins the time series. Note that we intentionally deliver the current form of the EWSS formula in order to highlight the reusable intermediate results for algorithm design, e.g., \((1-\beta)\cdot s^{2}_{w(n)}\) from Equation (9). 4. Algorithm Performance Evaluation  
To verify the effectiveness and efficiency of our developed running skewness methods, we decided to compare them against the third-party methods reported in the open source community. However, as mentioned previously, we only found comparable counterparts for the cumulative version of running skewness i.e., CSS. Therefore, we conducted performance evaluation and comparison for CSS only.