HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Time Series and Moving Averages
  1. 1Time series graphs and moving averages
  2. 2Centred moving averages and the trend line
  3. 3Seasonal components and forecasts
  1. Statistics & Data Science
  2. /Time Series and Moving Averages
  3. /Centred moving averages and the trend line

Course 7.3·Lesson 2 of 3

Centred moving averages and the trend line

Quarterly data have a cycle of four. A 4-point moving average lands between two quarters, so it cannot be compared with a real value. Centring fixes this. Then a trend line drawn by eye through the moving averages shows where the series is heading.

about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Time Series and Moving Averages
  1. 1Time series graphs and moving averages
  2. 2Centred moving averages and the trend line
  3. 3Seasonal components and forecasts

Try the code and the simulations beside the lesson.

What you will be able to do

  • calculate 4-point moving averages and centre them;
  • explain when centring is needed and when it is not;
  • plot moving averages and draw a trend line by eye through them.

Visitors each quarter

A made-up museum counts its visitors, in thousands, in each quarter of the year. Quarter 1 is January to March.

YearQuarters 1 and 2Quarters 3 and 4
138, 5664, 42
246, 6472, 50
350, 7680, 58

Number the quarters t=1t = 1t=1 to 121212. Quarter 3 is the busiest every year, and quarter 1 the quietest. The cycle has four quarters, so we use a 4-point moving average.

Where does a 4-point average go?

The first average uses quarters 1, 2, 3 and 4: 38+56+64+424=50\dfrac{38 + 56 + 64 + 42}{4} = 50438+56+64+42​=50.

The middle of quarters 1, 2, 3 and 4 is halfway between quarter 2 and quarter 3, at t=2.5t = 2.5t=2.5. The next average, 56+64+42+464=52\dfrac{56 + 64 + 42 + 46}{4} = 52456+64+42+46​=52, sits at t=3.5t = 3.5t=3.5.

The nine 4-point moving averages are 50, 52, 54, 56, 58, 59, 62, 64 and 66, at t=2.5,3.5,…,10.5t = 2.5, 3.5, \ldots, 10.5t=2.5,3.5,…,10.5.

Centring

None of these sits on a real quarter. To compare an average with a real value, we need one at a quarter. We take the mean of each pair of neighbours.

  • At t=3t = 3t=3: 50+522=51\dfrac{50 + 52}{2} = 51250+52​=51.
  • At t=4t = 4t=4: 52+542=53\dfrac{52 + 54}{2} = 53252+54​=53.

These are the centred moving averages. The eight of them, for quarters 3 to 10, are 51, 53, 55, 57, 58.5, 60.5, 63 and 65.

When is centring needed? When the number of points is even (4 quarters, 12 months, 6 days), the averages fall between times, so we centre them. When it is odd (3 terms, 7 days), each average already sits on a real time, so no centring is needed.

The trend line

Plot the centred moving averages on the time series graph. They lie close to a straight line. Draw the trend line by eye: a ruler line that follows the moving averages, with about as many points above it as below it. Do not join the averages point to point, and do not draw it through the data values.

Time series graph of museum visitors in thousands for twelve quarters: 38, 56, 64, 42, 46, 64, 72, 50, 50, 76, 80 and 58, joined by straight lines. Square markers show the centred moving averages 51, 53, 55, 57, 58.5, 60.5, 63 and 65 at quarters 3 to 10. A straight trend line passes through (3, 51) and (10, 65).

Here a good trend line passes through about (3,51)(3, 51)(3,51) and (10,65)(10, 65)(10,65). It rises 65−51=1465 - 51 = 1465−51=14 thousand over 7 quarters, which is 2 thousand visitors a quarter. Its equation is y=45+2ty = 45 + 2ty=45+2t.

Two people may draw slightly different lines by eye. In a question, you may be told two points that the line passes through, so that everyone gets the same answer.

Practise with new numbers

Try it in Python

The program works out the 4-point moving averages of the museum data, centres them, and prints the quarter of each centred value.

Predict first. There are 12 quarters. How many 4-point averages and how many centred averages will the program print? Then run it and check with Show the answer.

Your turn.

Now change the program.

1. Add a fourth year: 62, 82, 88, 64. How many centred averages are there now?

2. Print the rise of the centred averages from the first to the last, divided by the number of quarters between them.

The usual mistakes

  • Not centring an even-point average before comparing it with a data value.
  • Centring an odd-point average. A 3-point average already sits on a real term.
  • Plotting the first centred average at quarter 2.5. Centred averages sit on whole quarters, starting at quarter 3.
  • Drawing the trend line through the data instead of through the moving averages.

Remember these

  • A 4-point moving average sits between two quarters.
  • Centred moving average =one 4-point average+the next2= \dfrac{\text{one 4-point average} + \text{the next}}{2}=2one 4-point average+the next​.
  • Centre when the number of points is even. Do not centre when it is odd.
  • The trend line is a straight line drawn by eye through the moving averages.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Two neighbouring 4-point moving averages are 62.5 and 65. Find the centred moving average.
  1. A 4-point moving average uses quarters 5, 6, 7 and 8. At what time is it plotted?
  1. Monthly sales have a yearly cycle. Should their 12-point moving averages be centred?
  1. Five quarterly values are 30, 44, 52, 26 and 34. Find the centred moving average for the middle quarter.
  1. A trend line passes through (2,140)(2, 140)(2,140) and (10,180)(10, 180)(10,180). By how much does the trend rise each quarter?

Enroll free in Time Series and Moving Averages

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

The 4-point moving averages of a quarterly series are 62.5, 65 and 66.5, plotted at t = 4.5, t =…Easy · High School (9–10) · by StemPy Lab
A shop sells bicycles. Its sales in each quarter for two years are these…Medium · High School (9–10) · by StemPy Lab
For the bicycle sales of the last problem, a trend line is drawn by eye through the centred moving…Medium · High School (9–10) · by StemPy Lab
Next: lesson 3Seasonal components and forecasts
← Time Series and Moving Averages
← Time series graphs and moving averagesSeasonal components and forecasts →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
6 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Five quarterly values of a series are 30, 44, 52, 26 and 34…Hard · High School (9–10) · by StemPy Lab