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

What is a Moving Average?

Definition of moving averages as a smoothing technique that averages observations over a sliding window.

What is a Moving Average?

You'll learn: How moving averages smooth time series data by averaging values across a sliding window.

The Core Idea

A moving average is a simple yet powerful technique for smoothing time series data. Instead of looking at each individual data point (which can be noisy and erratic), you calculate the average of several consecutive observations within a "window" that slides through your data one step at a time.

Think of it like this: Imagine tracking daily temperatures that jump around wildly. A 7-day moving average would replace each day's temperature with the average of that day plus the 3 days before and 3 days after it. As you move forward in time, your window of 7 days slides along, producing a smoother curve that reveals the underlying trend without all the daily fluctuations.

Why Use Moving Averages?

Moving averages help you:

  • Reduce noise – Random variations get averaged out
  • Reveal trends – The underlying direction becomes clearer
  • Smooth seasonal patterns – Short-term irregularities fade away

The window size matters: a larger window produces smoother results but may hide important short-term changes, while a smaller window keeps more detail but less smoothing.

Connection to Time Series

You've already learned about decomposing time series into trend, seasonal, and irregular components. Moving averages are one of the fundamental tools for isolating trends and removing noise from the irregular component. They're the building blocks for more sophisticated forecasting methods.

Key Takeaway: A moving average smooths time series data by calculating the average of observations within a sliding window, helping reveal underlying patterns by reducing short-term noise.