Unit 4: Discrete and Decision Mathematics – Time Series

Welcome to your study notes on Time Series! In business, economics, science, and everyday life, people constantly want to know: "What happened in the past, and what is going to happen next?" Whether it is predicting ice cream sales in summer or electricity usage in winter, time series analysis gives you the mathematical tools to spot patterns and make reliable predictions about the future. Don't worry if this seems new at first — we will break every concept down into clear, manageable steps!

1. What is a Time Series?

A time series is simply a set of numerical data recorded at regular, successive intervals of time (for example: hourly, daily, monthly, quarterly, or yearly).

When you plot a time series on a graph, the time is always plotted on the horizontal axis (\(x\)-axis), and the measured variable (such as sales, temperature, or website visits) is plotted on the vertical axis (\(y\)-axis). When you join the points with straight line segments, you often see a zigzag pattern.

The Three Key Components of a Time Series

A time series graph usually contains three main patterns combined together:

1. The Trend (General Movement): This is the long-term underlying direction of the data over time. Is it generally increasing, decreasing, or staying level? For example, a smartphone company might see its sales trend upwards over a 5-year period despite smaller ups and downs along the way.

2. Seasonal Variation (Regular Fluctuations): These are predictable, repeating rises and falls that occur within a fixed cycle (like a year, a week, or a day). For example, sunglasses sales peak every summer and drop every winter. This regular cycle is called the seasonal effect.

3. Random (Irregular) Variations: These are unpredictable, one-off events that cause unexpected spikes or dips. Think of a sudden snowstorm closing shops for two days, or an unexpected viral post causing a temporary spike in orders.

Analogy to remember: Think of walking a dog up a hill. The overall path up the hill is the Trend. The dog running back and forth from left to right on its lead is the Seasonal Variation. If the dog suddenly jumps to chase a squirrel, that is a Random Variation!

Key Takeaway: An actual observed value is made up of:
\(\text{Actual Value} = \text{Trend} + \text{Seasonal Variation} + \text{Random Variation}\)

2. Moving Averages

Because real data zigzags up and down due to seasonal and random fluctuations, it can be hard to see the true underlying trend. To solve this, we calculate moving averages. Moving averages smooth out the short-term bumps so the underlying trend becomes crystal clear.

Choosing the Number of Periods (\(n\))

The number of values you average together must match the length of the repeating cycle:

• For quarterly data (4 quarters in a year), we use a 4-point moving average.
• For daily data over a working week (5 days), we use a 5-point moving average.
• For monthly data over a full year (12 months), we use a 12-point moving average.
• For data recorded 3 times a year (e.g. 3 school terms), we use a 3-point moving average.

Calculating Odd-Point Moving Averages (e.g. 3-Point or 5-Point)

Odd-point moving averages are straightforward because there is an exact middle time period where the average can be placed.

Step-by-Step for a 3-point moving average:
1. Add the first 3 values together and divide by \(3\). Write this value in line with the 2nd time period (the middle).
2. Drop the first value, add the 4th value, and find the mean of values 2, 3, and 4. Place this in line with the 3rd time period.
3. Continue this process until you run out of complete groups of 3.

Example: If sales for Terms 1, 2, and 3 are \(120\), \(150\), and \(180\):
\(\text{First 3-point moving average} = \frac{120 + 150 + 180}{3} = \frac{450}{3} = 150\)
This value of \(150\) is plotted directly at Term 2.

Calculating Even-Point Moving Averages and Centring (e.g. 4-Point)

With an even number of points (like 4 quarters), the middle of the first 4 values falls between Quarter 2 and Quarter 3. Because there is no actual quarter there, we must centre the moving averages by taking the average of two successive moving averages!

Step-by-Step for Centred 4-Point Moving Averages:
Step 1: Calculate the 4-point moving total for the first four values (e.g., \(Q_1 + Q_2 + Q_3 + Q_4\)). This sits between \(Q_2\) and \(Q_3\).
Step 2: Move down one space and calculate the next 4-point moving total (\(Q_2 + Q_3 + Q_4 + Q_1\text{ of next year}\)). This sits between \(Q_3\) and \(Q_4\).
Step 3: Add these two consecutive 4-point moving totals together to get an 8-point total, and divide by \(8\) (or take the average of the two 4-point means). This result is your centred moving average, and it lines up perfectly with Quarter 3!

Worked Example:
Suppose quarterly sales for Year 1 are: \(Q_1 = 20\), \(Q_2 = 36\), \(Q_3 = 44\), \(Q_4 = 28\), and for Year 2: \(Q_1 = 24\).
• First 4-point total \(= 20 + 36 + 44 + 28 = 128\) (falls between \(Q_2\) and \(Q_3\))
• Second 4-point total \(= 36 + 44 + 28 + 24 = 132\) (falls between \(Q_3\) and \(Q_4\))
• Centred 4-point moving average for Year 1 \(Q_3\) \(= \frac{128 + 132}{8} = \frac{260}{8} = 32.5\)

Common Mistake to Avoid: Notice that you cannot calculate a centred 4-point moving average for the first two quarters (\(\text{Year 1 } Q_1\) and \(Q_2\)) or the last two quarters of your data set. Always leave those table rows blank!

Key Takeaway: Moving averages smooth out fluctuations. Odd moving averages sit directly at the middle data point; even moving averages must be centred so that they line up with an actual time period.

3. The Trend Line

Once you have calculated all the moving averages, you plot them on your time series graph.

• Plot each moving average at its corresponding time value.
• Use a ruler to draw a single line of best fit through these moving average points. This line is called the Trend Line.
• The trend line represents the general direction of the data, ignoring all seasonal highs and lows.

Exam Tip: When drawing the line of best fit, try to have an equal balance of moving average points above and below the line. Do not connect the moving average points dot-to-dot; draw one straight line!

4. Seasonal Variation (Seasonal Effects)

Once we have the trend line, we can measure the seasonal variation (how far each season typically deviates above or below the trend line).

Calculating Seasonal Variation for Individual Points

For any specific point in time where both the actual value and the trend value are known:
\(\text{Seasonal Variation} = \text{Actual Value} - \text{Trend Value}\)

• If the actual value is above the trend line, the variation is positive (\(+\)).
• If the actual value is below the trend line, the variation is negative (\(-\)).

Calculating the Average Seasonal Variation

Because random noise can affect a single season, we calculate the average seasonal variation for each season (e.g. Quarter 1, Quarter 2, Quarter 3, Quarter 4) across all available years.

Method:
1. Find the individual seasonal variations (\(\text{Actual} - \text{Trend}\)) for all the Quarter 1s in your table.
2. Calculate their mean: \(\text{Average Seasonal Variation for } Q_1 = \frac{\text{Sum of variations for } Q_1}{\text{Number of } Q_1\text{ values}}\).
3. Repeat this process for \(Q_2\), \(Q_3\), and \(Q_4\).

Did you know? In theory, across a complete cycle of 4 quarters, the sum of all 4 average seasonal variations should equal approximately \(0\) (because the positive peaks and negative troughs cancel each other out over the course of a year).

Key Takeaway: Seasonal variation measures how much higher or lower a specific season is compared to the trend line: \(\text{Variation} = \text{Actual} - \text{Trend}\).

5. Forecasting and Making Predictions

One of the main goals of time series analysis in Further Mathematics is to predict (forecast) values for future time periods.

The Forecasting Formula

To predict a future value, we combine the projected trend with the average seasonal effect for that specific season:
\(\text{Predicted Value (Forecast)} = \text{Trend Value (from line)} + \text{Average Seasonal Variation}\)

Step-by-Step Guide to Forecasting

Step 1: Extend your straight trend line on your graph into the future time period you are asked about.
Step 2: Read off the Trend Value at that future time period from the vertical axis.
Step 3: Identify which season it is (e.g., Quarter 1, Quarter 2, etc.) and find the corresponding Average Seasonal Variation.
Step 4: Add the average seasonal variation to the trend value (remember: if the seasonal variation is negative, adding a negative number means you subtract it!).

Worked Example

A toy shop's sales have a trend line equation that gives a trend value of \(£54\,000\) for Quarter 4 of Year 3.
The average seasonal variation for Quarter 4 is \(+£12\,500\).

Find the forecasted sales for Year 3 Quarter 4:
\(\text{Forecast} = \text{Trend Value} + \text{Average Seasonal Variation}\)
\(\text{Forecast} = 54\,000 + 12\,500 = £66\,500\)

Another Example (Negative Variation):
For Quarter 1 of Year 4, the trend line gives a value of \(£56\,000\). The average seasonal variation for Quarter 1 is \(-£8\,000\).
\(\text{Forecast} = 56\,000 + (-8\,000) = 56\,000 - 8\,000 = £48\,000\)

Reliability of Forecasts

In exam questions, you may be asked to comment on the reliability of your forecast:

Short-term predictions (e.g. predicting the next quarter) are generally reliable because the current trend is likely to continue in the near future.
Long-term predictions (e.g. predicting 5 years ahead) are unreliable because market conditions, tastes, and external factors can change significantly over time.

6. Quick Summary & Exam Checklist

Before sitting your exam, make sure you can confidently do each of the following:

Identify components: Clearly state whether a feature is part of the Trend, Seasonal Variation, or Random Variation.
Compute moving averages: Calculate 3-point, 4-point centred, or 5-point moving averages accurately.
Plot correctly: Plot centred moving averages at the correct quarter/time coordinate and draw a straight trend line with a ruler.
Work out variation: Use \(\text{Seasonal Variation} = \text{Actual} - \text{Trend}\).
Make a forecast: Extrapolate the trend line and use \(\text{Forecast} = \text{Trend} + \text{Average Seasonal Variation}\).
Comment on reliability: Mention whether the prediction is near (reliable) or far into the future (less reliable).