Moving average
A moving average (also called a running average) for a numeric time series is another time series whose values are averages of progressive sections of values from the original series. It is a smoothing mechanism to provide a more general view of the trends of the original series.
For example, the three-element moving average of the series (20, 25, 21, 26, 28, 27, 29, 31) is the series (22, 24, 25, 27, 28, 29). This is because 22 is the average of (20, 25, 21), 24 is the average of (25, 21, 26), 25 is the average of (21, 26, 28), and so on. Notice that the moving average series is smoother than the original, and yet still shows the same general trend. Also note that the moving average series has six elements, while the original series ...
Get Java Data Analysis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.