I would like to be able to calculate Skewness and Kurtosis from a sliding window dataset in a computationally efficient manner. The dataset shall be a specified quantity with new elements replacing old (eg. FIFO queue).
The answer for a similar question regarding variance by mjqxxx appears to be the required approach where a sum of squares is incrementally maintained. The advantage is that old elements leaving the queue can easily decrement the sum of squares figure, thus allowing for the moving window.
The poster suggests that a similar approach can be used to derive Skewness and Kurtosis.
What is the formula for Skewness and Kurtosis using the suggested approach?