What even is this?
A time series is any data collected at regular time intervals, weekly sales, quarterly visitors, monthly rainfall. The raw data bounces around because of seasons, random events, and underlying trends all happening at once.
A moving average smooths that bouncing by replacing each point with an average of the nearby values. What's left is the trend, the real story.
The 10-minute version
Low energy? Do just this and you have still won the day. Zero is the only fail.
The one move: read the first formula box and the first worked example above, then do Practice Question 1. Screenshot the win for Nat and stop there.
Four short ways in. The 🎬 cards are waiting on Nat's videos, and each has a ready-to-read film script tucked underneath. 🖨️ Prefer printable notes? 4 styles here.
Any time series can be broken into three overlapping components:
Trend
The long-term direction, is it generally going up, down, or staying flat? The trend ignores short-term bumps.
Seasonal Variation
A repeating pattern linked to the calendar, e.g. ice cream sales always spike in summer and dip in winter, every year.
Irregular Fluctuation
Random noise, one-off events like a storm, a viral post, or a competitor closing that can't be predicted.
A time series graph puts time on the x-axis and the measured value on the y-axis. Points are plotted and joined with a line. Here's what the two lines mean:
An n-point moving average replaces each data point with the mean of n consecutive values centred on that point. The window of n values "moves" along the dataset one step at a time.
🔵 Odd-numbered (3-pt, 5-pt)
A 3-point MA at time t = average of values at t−1, t, and t+1.
The result sits directly at time t, no centering needed.
Common in monthly data.
🟣 Even-numbered (4-pt)
A 4-point MA sits between two time points, it needs an extra step called centering to align with the original data.
Common in quarterly data (4 seasons).
Monthly visitors to a café (in hundreds): Jan=100, Feb=110, Mar=108, Apr=118, May=116, Jun=126
| Month | Visitors | Calculation | 3-pt MA |
|---|---|---|---|
| Jan | 100 | , | , |
| Feb | 110 | (100 + 110 + 108) ÷ 3 | 106.0 |
| Mar | 108 | (110 + 108 + 118) ÷ 3 | 112.0 |
| Apr | 118 | (108 + 118 + 116) ÷ 3 | 114.0 |
| May | 116 | (118 + 116 + 126) ÷ 3 | 120.0 |
| Jun | 126 | , | , |
The MAs (106 → 112 → 114 → 120) clearly show an increasing trend, even though the raw data bounces up and down.
Quarterly data has 4 seasons, so a 4-point MA is used. The issue: a 4-point average of Q1, Q4 sits between Q2 and Q3, not at any actual time point. We fix this by centering, averaging pairs of consecutive 4-pt MAs so they line up with the original quarters.
Step 2: Center them, average each consecutive pair of 4-pt MAs. This gives centred moving averages (CMA) that align with actual quarters.
Example dataset · quarterly café visitors (hundreds): Q1=12, Q2=8, Q3=6, Q4=10, Q5=14, Q6=10, Q7=8, Q8=12
| Quarter | Visitors | 4-pt MA | Centred MA |
|---|---|---|---|
| Q1 | 12 | , | , |
| Q2 | 8 | , | , |
| Q3 | 6 | 9.0 & 9.5* | 9.25 |
| Q4 | 10 | 9.5 & 10.0* | 9.75 |
| Q5 | 14 | 10.0 & 10.5* | 10.25 |
| Q6 | 10 | 10.5 & 11.0* | 10.75 |
| Q7 | 8 | , | , |
| Q8 | 12 | , | , |
* The two 4-pt MA values used to centre at each quarter. e.g. at Q3: MA(Q1, Q4)=9.0 and MA(Q2, Q5)=9.5, so CMA = (9.0+9.5)÷2 = 9.25.
Data: Q1=80, Q2=60, Q3=50, Q4=70, Q5=90, Q6=70, Q7=60, Q8=80 (all $thousands)
Calculate the 4-point moving averages
MA(Q1, Q4) = (80+60+50+70)÷4 = 260÷4 = 65.0
MA(Q2, Q5) = (60+50+70+90)÷4 = 270÷4 = 67.5
MA(Q3, Q6) = (50+70+90+70)÷4 = 280÷4 = 70.0
MA(Q4, Q7) = (70+90+70+60)÷4 = 290÷4 = 72.5
MA(Q5, Q8) = (90+70+60+80)÷4 = 300÷4 = 75.0
Centre the moving averages (average consecutive pairs)
CMA at Q3 = (65.0 + 67.5) ÷ 2 = 66.25
CMA at Q4 = (67.5 + 70.0) ÷ 2 = 68.75
CMA at Q5 = (70.0 + 72.5) ÷ 2 = 71.25
CMA at Q6 = (72.5 + 75.0) ÷ 2 = 73.75
Describe the trend
The centred MAs increase from 66.25 to 73.75 over 4 quarters, an increase of about 2.5 per quarter.
Describe the seasonal pattern
Looking at the raw data: sales peak in Q1 & Q5 (summer), drop to lows in Q3 & Q7 (winter). A repeating seasonal pattern is visible with a period of 4 quarters.
Tap to reveal the answer. Try it yourself first!
The 3-pt MA at any middle point uses the value before it, itself, and the value after. Don't forget: there is no MA for January (first) or June (last), you need a value on each side.
MA(Q2, Q5) = (30+25+35+30) ÷ 4 = 120 ÷ 4 = 30.0
These two averages sit between the quarters they average, which is why we need to centre them in the next step.
MA(Q1, Q4) sits between Q2 and Q3. MA(Q2, Q5) sits between Q3 and Q4. Averaging them gives a value that aligns exactly at Q3. Centering always gives you a CMA that sits at the middle quarter of the two windows combined.
The centred moving averages increase by 3 each quarter (42, 45, 48, 51, an arithmetic sequence with common difference 3). After removing seasonal variation, the surf shop's sales are consistently rising by about 3 units per quarter. You could also say: "The underlying trend shows consistent growth of approximately 3 units per quarter."
This is a trap! The raw data might sometimes hit high values (due to seasonal peaks) but the underlying trend is clearly falling. The CMAs are what you use to identify the true trend, not the raw highs.