Time Series • Statistics Background for Forecasting
Time Series / Plotting Smoothed Data

Plotting Smoothed Data

Notes 3 Statistics Background for Forecasting

Smoothing is a method of reducing short-term irregular ups and downs so that the underlying movement of a series is easier to see. A smoothed series is not a replacement for the original data; it is a clearer view of the general path.

Notes

Plotting Smoothed Data

Definition

Smoothing is a method of reducing short-term irregular ups and downs so that the underlying movement of a series is easier to see. A smoothed series is not a replacement for the original data; it is a clearer view of the general path.

Example

Daily sales jump up and down because of weekday effects. A three-day average produces a smoother line that shows whether sales are generally rising during the month.

Purpose of Smoothing

Real series mix a slower pattern with short-term noise. Plotting only the raw series can make the trend or seasonal wave hard to read. Smoothing reduces those short fluctuations. It does not invent a new theory of the data; it is a visual and descriptive tool.

Simple Moving Average

A simple moving average replaces each value by the average of a small number of neighbouring observations. For a 3-period moving average:

SMA at time t = (Yt + Yt−1 + Yt−2) / 3

  • Yt = observation at time t
  • Yt−1 = previous observation
  • Yt−2 = observation two periods earlier
  • The divisor 3 is the number of terms in the window

The first two periods have no 3-point average because three values are not yet available. A longer window (for example 5 or 7) is smoother but reacts more slowly to a genuine change.

Small Numerical Example

Five weeks of sales: 10, 20, 12, 18, 14.

Week Original 3-point moving average
1 10
2 20
3 12 (10 + 20 + 12) / 3 = 14
4 18 (20 + 12 + 18) / 3 = 16.67
5 14 (12 + 18 + 14) / 3 = 14.67

The original series jumps from 10 to 20 and back. The smoothed values stay in a narrower band around the middle of the data. A plot of both series would show a calmer line next to a jumpy line.

Advantages and Limitations

Point
Advantage Underlying trend or seasonal wave is easier to see.
Advantage Short-term noise is reduced for teaching and inspection.
Limitation Sudden genuine changes can be delayed or hidden.
Limitation The start (and sometimes the end) of the series has fewer smoothed points.
Limitation Smoothing is not by itself a complete forecasting model.
Key Point

Smoothing can make underlying patterns easier to see, but it can also hide short-term changes.

Small Educational Python Example

# Import libraries import pandas as pd import matplotlib.pyplot as plt sales = pd.Series([10, 20, 12, 18, 14], name="sales") # 3-period simple moving average smoothed = sales.rolling(window=3).mean() print(sales) print(smoothed) sales.plot(marker="o", label="original") smoothed.plot(marker="o", label="smoothed") plt.legend() plt.title("Original vs 3-period moving average") plt.tight_layout() plt.show()

The printed smoothed series should show missing values for the first two points, then averages near 14, 16.67 and 14.67. The plot should look calmer than the original line.

Exam-Oriented Key Points

  1. Smoothing reduces short-term fluctuations to reveal the general path.
  2. A simple moving average is the average of a small window of neighbouring values.
  3. Always compare the original series with the smoothed series.
  4. Smoothing is a display and description tool, not a full forecast method.