Introduction to Time Series

In Statistics, we often want to see how things change over time. Whether it is the price of chocolate bars over ten years, the number of umbrellas sold each month, or the temperature throughout a week, we use a Time Series to track these changes. By the end of this chapter, you will know how to spot patterns in these graphs and use "moving averages" to see the "big picture" trend hidden behind the daily or monthly ups and downs.

What is a Time Series?

A time series is a set of data collected at regular intervals of time. On a graph, the time (e.g., years, months, days) is always plotted on the horizontal axis (x-axis), and the variable we are measuring (e.g., sales, temperature) is plotted on the vertical axis (y-axis).

When you look at a time series graph, you will often see three main types of patterns:

1. The Trend: The long-term "general direction" of the data. Is it generally going up, going down, or staying the same?
2. Seasonal Variations: Patterns that repeat at regular intervals, such as sales of ice cream peaking every summer or toy sales increasing every December.
3. Cyclic Trends: Long-term "waves" in the data that are not as regular as seasonal patterns (for example, economic "booms" and "busts" that happen over several years).

Quick Tip: Don't confuse "Seasonal" with just the four seasons of the year. In statistics, "seasonal" can mean any regular pattern, like "daily" peaks in traffic or "weekly" spikes in supermarket visits.

Moving Averages

Sometimes, time series data is very "bumpy" or "noisy" because of seasonal spikes. This makes it hard to see the underlying trend. We use moving averages to "smooth out" these bumps.

Calculating a Moving Average

To find a moving average, you calculate the mean of a specific number of consecutive data points. For the Foundation tier, you specifically need to know 4-point moving averages. Higher tier students should be able to calculate moving averages for any number of points (n-point moving averages).

Step-by-Step for a 4-point moving average:
1. Add up the first four values: \(x_1 + x_2 + x_3 + x_4\).
2. Divide the total by 4: \(\frac{x_1 + x_2 + x_3 + x_4}{4}\).
3. For the next moving average, "move" one step forward: drop the first value and add the fifth value: \(\frac{x_2 + x_3 + x_4 + x_5}{4}\).
4. Continue this process until you reach the end of the data.

General Formula:
\( \text{n-point moving average} = \frac{x_1 + x_2 + \dots + x_n}{n} \)

Key Takeaway: Moving averages are always plotted at the midpoint of the time period they cover. For example, a 4-point moving average for Jan, Feb, Mar, and Apr would be plotted between February and March.

Trend Lines

Once you have calculated your moving averages, you can plot them on your graph. These points usually form a much straighter path than the original data. You can then draw a trend line (a line of best fit) through these moving average points.

Interpreting the Trend Line

The gradient (steepness) of the trend line tells you the rate of change:
- A steep upward line means the value is increasing quickly.
- A shallow downward line means the value is decreasing slowly.
- A flat line means the trend is constant.

Did you know? We draw trend lines through moving averages rather than the raw data because the moving averages have already removed the "distractions" of seasonal variations, giving us a more accurate look at the long-term direction.

Predictions and Seasonal Effects (Higher Tier Only)

Higher tier students need to use these trends to make predictions.

Average Seasonal Effect

The seasonal variation for a specific point is the difference between the actual value and the trend value at that time:
\( \text{Seasonal Variation} = \text{Actual Value} - \text{Trend Value} \)

To find the average seasonal effect for a specific time (e.g., "Quarter 1"), you calculate the mean of all the seasonal variations for every "Quarter 1" in your data.

Making a Prediction

To predict a future value:
1. Extend your trend line to the future date to find the predicted trend value.
2. Add the average seasonal effect for that time of year.
\( \text{Predicted Value} = \text{Trend Value} + \text{Average Seasonal Effect} \)

The Danger of Extrapolation

Extrapolation means predicting values outside the range of your original data (predicting the future). You must be careful! Extrapolation is unreliable because we cannot be certain that the same trend will continue forever. For example, a company's sales might be trending up now, but a new competitor could enter the market next month and change everything.

Common Mistakes to Avoid

1. Plotting in the wrong place: Always ensure your moving average is plotted in the center of the time points used to calculate it.
2. Mixing up axes: Remember, time always goes on the bottom (x-axis).
3. Ignoring the context: Always look at the units. If the question asks for the "rate of change," look at the gradient of the trend line and use the units from the y-axis (e.g., "£ per month").
4. Over-confidence in predictions: If an exam question asks if a prediction is reliable, and the prediction is far into the future, the answer is usually "No" due to the dangers of extrapolation.

Quick Review Box

- Time Series: Data plotted over time.
- Trend: The long-term direction (up, down, or level).
- Seasonal Variation: Regular, repeating patterns.
- Moving Average: Used to smooth data and find the trend. Calculation: \( \frac{\text{sum of } n \text{ values}}{n} \).
- Trend Line: Drawn through moving average points to show the general direction.
- Extrapolation (Higher Tier): Predicting the future; use with caution!