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. /Seasonal components and forecasts

Course 7.3·Lesson 3 of 3

Seasonal components and forecasts

The museum is busiest in quarter 3, but by how much? The seasonal component of a quarter measures how far its values usually sit above or below the trend. Add it to the trend line, extended into the future, and you have a forecast. This lesson calculates both, and says how far to trust the forecast.

about 25 min1 simulation1 practice question
Lesson 3 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 seasonal variations and seasonal components from a table of values and moving averages;
  • find them from a time series graph and its trend line;
  • forecast a future value from the trend line and a seasonal component, and state the assumptions and limits.

Seasonal variation

The seasonal variation at a time is how far the real value sits above or below the trend there:

seasonal variation=actual value−centred moving average\displaystyle \text{seasonal variation} = \text{actual value} - \text{centred moving average}seasonal variation=actual value−centred moving average

For the museum at quarter 3 of year 1: 64−51=1364 - 51 = 1364−51=13. The value is 13 thousand above the trend. At quarter 4 of year 1: 42−53=−1142 - 53 = -1142−53=−11, so 11 thousand below.

Quarter tttActualCentred MA
36451
44253
54655
66457
77258.5
85060.5
95063
107665

The seasonal variations are 13, −11-11−11, −9-9−9, 7, 13.5, −10.5-10.5−10.5, −13-13−13 and 11.

The seasonal component

Each season appears twice. The seasonal component of a season is the mean of its seasonal variations. It is also called the average seasonal variation.

  • Quarter 1: −9+(−13)2=−11\dfrac{-9 + (-13)}{2} = -112−9+(−13)​=−11.
  • Quarter 2: 7+112=9\dfrac{7 + 11}{2} = 927+11​=9.
  • Quarter 3: 13+13.52=13.25\dfrac{13 + 13.5}{2} = 13.25213+13.5​=13.25.
  • Quarter 4: −11+(−10.5)2=−10.75\dfrac{-11 + (-10.5)}{2} = -10.752−11+(−10.5)​=−10.75.

The four components add up to 0.5, close to zero. That is a good check: over a whole year, the seasons above the trend balance those below it.

From a graph and its trend line

Sometimes you have a graph with a trend line instead of a table. Then read the trend value from the line at a time, and use it in place of the moving average.

The museum's trend line is y=45+2ty = 45 + 2ty=45+2t. At quarter 7 it gives 45+14=5945 + 14 = 5945+14=59. The actual value is 72, so the seasonal variation is 72−59=1372 - 59 = 1372−59=13. A value read from a graph is never exact, so components found this way are a little rougher.

Forecasting

To forecast a future value:

  1. Extend the trend line to the future time and read off the trend value.
  2. Add the seasonal component of that season, with its sign.

Quarter 1 of year 4 is t=13t = 13t=13. The trend value is 45+2×13=7145 + 2 \times 13 = 7145+2×13=71. The quarter 1 component is −11-11−11. The forecast is 71+(−11)=6071 + (-11) = 6071+(−11)=60 thousand visitors.

For quarter 3 of year 4, t=15t = 15t=15: 45+30+13.25=88.2545 + 30 + 13.25 = 88.2545+30+13.25=88.25 thousand.

The museum's trend line y = 45 + 2t drawn solid over quarters 1 to 12 and dashed over quarters 12 to 16, with the twelve data values as circles. Four star markers show the forecasts for year 4: 60 at quarter 13, 82 at quarter 14, 88.25 at quarter 15 and 66.25 at quarter 16. A short vertical arrow at each forecast runs from the trend line to the forecast.

How far can we trust a forecast?

A forecast rests on assumptions.

  • The trend carries on in the same straight line.
  • The seasonal pattern repeats in the same way.
  • Random variation is small. A forecast cannot predict a strike, a storm or a new exhibition.

And it has limits.

  • The further ahead, the less reliable. Extending the line far beyond the data is extrapolation, as with a line of best fit.
  • A line drawn by eye differs a little from person to person, so the forecasts differ too.
  • Few years of data give components that rest on only two or three values each.

Practise with new numbers

Try it in Python

The program finds the seasonal variations of the museum data, averages them into components, and forecasts all four quarters of year 4.

Predict first. Which quarter of year 4 will have the highest forecast? Then run it and check with Show the answer.

Your turn.

Now change the program.

1. Change the trend line to 48 + 2 * t. By how much does each forecast change?

2. Add a line that prints the sum of the four components. Is it close to zero?

The usual mistakes

  • Subtracting the wrong way. Seasonal variation is actual minus trend, so a busy season gives a positive value.
  • Forgetting the sign of a component. A component of −11-11−11 lowers the forecast.
  • Using one season's variation as its component. Average all the variations of that season.
  • Forecasting from the last data value. Start from the trend line, not from the last point.

Remember these

  • Seasonal variation === actual −-− trend (a centred moving average, or a value read from the trend line).
  • Seasonal component === the mean of the seasonal variations of one season.
  • Forecast === trend value +++ seasonal component.
  • A forecast assumes that the trend and the pattern carry on. It is less reliable further ahead.

Check yourself

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

  1. The actual value in a quarter is 82, and the centred moving average there is 70. Find the seasonal variation.
  1. The seasonal variations of quarter 2 are 12, 11 and 12. Find the seasonal component.
  1. A trend line gives 200 at quarter 14. That season's component is −18-18−18. Forecast the value.
  1. Three seasonal components are 6, −4-4−4 and 9. Roughly what should the fourth be?
  1. Give two reasons why a forecast for three years ahead is less reliable than one for next 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 (3)

A gym's members in quarter 2 and the centred moving averages at those quarters are these…Easy · High School (9–10) · by StemPy Lab
A trend line drawn by eye on a time series graph passes through (2, 140) and (10, 180), where t is…Medium · High School (9–10) · by StemPy Lab
Use the bicycle sales of problems 5 and 6…Hard · High School (9–10) · by StemPy Lab
That was the last lessonBack to the course: take the test
← Time Series and Moving Averages
← Centred moving averages and the trend lineNext →

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.

Python Labs (1)

From quarterly data to a forecastPython Lab · by StemPy Lab

Question Sets (1)

Time Series: Test Yourself10 questions · by StemPy Lab

Notes (1)

Time Series and Moving Averages: Quick RevisionNote · by StemPy Lab