Introduction to Time Series

Welcome to the world of Time Series! In this chapter, we are going to learn how to look at data that changes over time. Whether it’s the price of chocolate bars over ten years, the number of umbrellas sold each month, or your height as you grow up, time series help us spot patterns and even guess what might happen in the future. Don't worry if it sounds a bit technical; it’s really just about spotting rhythms in numbers!

1. What is a Time Series?

A time series is simply a set of data points collected at regular intervals over time. When we graph this data, we always put Time on the horizontal \(x\)-axis and the Variable we are measuring on the vertical \(y\)-axis.

Analogy: Think of a time series graph like a "heartbeat" for a business or the weather. It goes up and down, but we want to see the "big picture" behind those small jumps.

There are three main patterns we look for:

1. Trend: The general long-term direction of the data (Is it going up, down, or staying flat?).
2. Seasonal Variation: Patterns that repeat over a set period, like every week or every year (e.g., more ice cream sold in summer).
3. Cyclic Trends: Long-term "waves" that aren't as regular as seasons, like economic booms and busts that happen over many years.

Quick Takeaway: Time series graphs show us how something changes as time passes. We look for a trend (the big picture) and seasonal patterns (the regular ups and downs).

2. Moving Averages: "Smoothing out the Bumps"

Sometimes, raw data is very "noisy" or "jumpy," making it hard to see the underlying trend. We use moving averages to smooth out these jumps.

What is a Moving Average?

A moving average is the mean of a fixed number of consecutive data points. For example, a 4-point moving average is the average of four time periods in a row.

Step-by-Step: Calculating a 4-point Moving Average

Let’s say you have sales data for four quarters (Spring, Summer, Autumn, Winter):

1. Add the first 4 values together.
2. Divide by 4 to find the mean.
3. Record this value (usually plotted in the middle of the time period used).
4. Move forward one time slot, drop the first value, add the next new value, and repeat.

Why 4 points? We often use 4 points because there are 4 quarters in a year. This helps cancel out the "seasonal" effects of the different quarters so we can see the real trend.

Quick Review: Moving averages help us find the trend line by getting rid of the "noise" in the data.

3. Drawing and Interpreting Trend Lines

Once you have your moving averages, you can plot them on your graph and draw a line through them. This is called a Trend Line.

Gradient: The steepness of the trend line tells us how fast the change is happening.
- A steep line going up means a rapid increase.
- A shallow line going down means a slow decrease.

Common Mistake to Avoid: When plotting moving averages, make sure you plot the point at the mid-point of the time interval. For a 4-point moving average, the first point would be plotted between the 2nd and 3rd time periods.

4. Seasonal and Cyclic Trends in Context

Statistical data often follows a "beat." Identifying this beat helps businesses plan ahead.

Seasonal Variation: This is the difference between the actual value and the trend value at a specific time.
Example: A toy shop might have a trend line showing steady growth, but their actual sales in December will always be much higher than the trend line. That’s a seasonal peak.

Did you know? Data doesn't just have "seasons" in terms of weather. "Seasonal" can mean daily patterns (like traffic jams every morning) or weekly patterns (like busy restaurants on Friday nights).

Key Takeaway: Trends show the long-term direction, while seasonal variations show the regular, predictable rhythms.

5. Higher Tier: Making Predictions

Note: This section is specifically for the Higher Tier, but it's useful for everyone to understand how we "guess" the future!

If we know the trend and the average seasonal effect, we can predict future values. This is called extrapolation.

How to calculate a prediction:

1. Find the Seasonal Variation: \( \text{Variation} = \text{Actual Value} - \text{Trend Value} \)
2. Find the Average Seasonal Variation: Take the mean of all the variations for that specific "season" (e.g., all the "Quarter 1" variations from previous years).
3. Predict: Extend your trend line to the future time period to get a Predicted Trend Value. Then use the formula:
\( \text{Predicted Value} = \text{Predicted Trend Value} + \text{Average Seasonal Variation} \)

The Danger of Extrapolation

Don't worry if your predictions aren't perfect! Extrapolation (predicting the future) is risky. The further into the future you try to predict, the less reliable your answer becomes because things in the real world can change unexpectedly.

Quick Takeaway: To predict the future, start with the trend line and then adjust it by adding the average seasonal effect.

Summary Checklist

Check your understanding:
- Can I identify if a trend is increasing or decreasing? (Trend)
- Do I know that time is always on the \(x\)-axis?
- Can I calculate a 4-point moving average? (Mean of 4 values)
- Do I understand that "seasonal" can mean any regular repeating pattern?
- (Higher Tier) Do I know how to use the trend line and seasonal effect to make a prediction?

Don't worry if this seems tricky at first—the more you practice calculating the averages and drawing the lines, the easier it becomes to see the patterns!