Moving averages are the simplest tool for seeing a series' direction through its day to day noise.
They appear everywhere, from sales dashboards to public health reports.
Each point is replaced by the average of a window of neighbouring points.
A trailing window uses the current value and the ones before it, such as the last 7 days.
A centred window uses values on both sides, which lines the average up with the middle of the window.
In pandas, the rolling method computes moving averages, such as a 7 day mean of daily sales.
A window equal to the seasonal period, such as 7 days for a weekly pattern, removes that pattern completely.
Trailing averages lag behind real changes by about half the window length.
A sudden drop therefore shows up in a 28 day average only gradually, over weeks.
Weighted moving averages give recent values more weight, reducing that lag.
The first values of a series have no full window, so they are blank or based on fewer points.
Moving medians resist outliers better than moving averages, since one extreme day barely moves them.
A trailing moving average can serve as a simple forecast, using the latest average as the next value.
In practice, 7 day averages are the standard way to report daily figures with a weekly rhythm.
The usual mistake is a centred average on a dashboard, which needs future values, so the latest days are blank or quietly wrong.