Course contentsShow
← Data Science
Lesson 753 of 2,14520. Time Series ModelsFree lesson

Centered vs Trailing Moving Averages

Differences between centered moving averages for analysis and trailing moving averages for forecasting.

Centered vs Trailing Moving Averages

You'll learn the critical distinction between centered and trailing moving averages and when to use each one.

The Core Difference

When we compute a moving average, we have a choice about which data points to include in our window. This choice fundamentally affects what the moving average can tell us:

Trailing moving averages (also called "backward-looking") use only past data points. For example, a 5-period trailing MA at time t uses observations from periods t-4, t-3, t-2, t-1, and t. The average sits at the current time point.

Centered moving averages use data points from both before and after the target time. A 5-period centered MA at time t uses t-2, t-1, t, t+1, and t+2. The average sits in the middle of the window.

Why It Matters

Centered moving averages are better for analysis and understanding patterns because they smooth the data symmetrically, giving you the clearest view of the underlying trend. Since they use future data, they reveal what's "really" happening at each point without lag.

Trailing moving averages are essential for forecasting because they only use information available at that moment. You can't use future data to predict the future! When you need to make real-time decisions or generate forecasts, trailing is your only option.

The Trade-Off

Think of it like driving: A centered MA is like reviewing dashcam footage after a trip—you can see what happened before and after each moment for perfect analysis. A trailing MA is like looking only at your rearview mirror while driving—you only know what's already happened, which is realistic for making decisions going forward.

Key Takeaway: Use centered moving averages for smoothing and analyzing historical patterns; use trailing moving averages when forecasting or making real-time predictions with only past data available.