18. Lesson 3(DOT)5(COLON) Time-series data(COLON) trend, seasonality and moving averages

Lesson Focus

Official syllabus section covering Lesson focus within Lesson 3.5: Time-series data: trend, seasonality and moving averages: Plotting and reading a time-series line graph, with time always on the horizontal axis.; Decomposing a series into trend, seasonal variation and irregular (random) movement..

Lesson 3.5: Time-series Data: Trend, Seasonality, and Moving Averages

Introduction

Welcome to Lesson 3.5 of Foundation Statistics, students! In this lesson, we will explore time-series data, focusing on trends, seasonal variations, and moving averages. Understanding these concepts will help you analyze data that changes over time, such as economic indicators, sales figures, and weather patterns.

Objectives

By the end of this lesson, you will be able to:

  • Plot and read a time-series line graph, with time always on the horizontal axis.
  • Decompose a series into trend, seasonal variation, and irregular (random) movement.
  • Smooth a series with a moving average to reveal the underlying trend, including centered moving averages for an even period.
  • Understand why social and economic data (like unemployment, sales, and prices) are usually reported as time series and the risks of interpreting changes based on a single period.
  • Explain the main ideas and terminology behind the lesson focus.

What is Time-series Data?

Time-series data consists of observations collected sequentially over time. It is crucial in various fields, including economics, finance, environmental science, and more. When you analyze time-series data, you look for patterns over time.

An example of time-series data is monthly sales data for a retail store. By plotting the sales figures on a graph, you can visually assess trends and understand how sales fluctuate throughout the year.

Reading a Time-series Line Graph

Let's say we have a time-series line graph showing the monthly temperature for a city over a year. The x-axis (horizontal axis) represents time (months), while the y-axis (vertical axis) represents the temperature in degrees.

To read this graph:

  1. Identify the months along the x-axis.
  2. Look for peaks and troughs in the y-axis values to spot trends.
  3. Check for seasonal changes — for example, warmer temperatures in summer and cooler temperatures in winter.

Using a line graph to display time-series data helps you visualize patterns effectively.

Decomposing Time-series Data

Decomposing a time-series involves breaking it down into its components: the trend, seasonal variation, and irregular movement.

1. Trend

The trend represents the overall direction in which the data is moving over time. It can increase, decrease, or remain constant. For instance, if a company’s sales have been increasing every year for the past five years, this indicates an upward trend.

2. Seasonal Variation

Seasonal variation refers to periodic fluctuations due to seasonal factors. For example, ice cream sales typically peak in summer and drop in winter. These consistent patterns help predict future sales for the same seasons.

3. Irregular Movement

Irregular movements are random fluctuations caused by unexpected events (like a pandemic or a natural disaster). These movements do not follow a pattern and can distort the trend and seasonal variations.

To visualize this, imagine a graph where you can draw a smooth line (trend) through jagged points (irregular variations). You can identify seasonal patterns as well by noting peaks and valleys that occur consistently.

Here’s a simple equation you can use to start interpreting trends in your data: $$T(t) = S(t) + I(t)$$

where:

  • $T(t)$ is the total time-series data at time $t$,
  • $S(t)$ is the seasonal component,
  • $I(t)$ is the irregular component.

Moving Averages

Moving averages are used to smooth out short-term fluctuations and highlight longer-term trends or cycles. A moving average calculates the average of a subset of the data, gradually updating as more data becomes available.

Simple Moving Average

For a simple moving average (SMA), you can calculate the average of the last $n$ observations:

$$SMA_n = \frac{X_1 + X_2 + ... + X_n}{n}$$

where $X_i$ are the data points being averaged.

For example, if you want a 3-month moving average of sales figures:

  • January: 200
  • February: 250
  • March: 300

The 3-month moving average for March would be:

$$SMA_3 = \frac{200 + 250 + 300}{3} = 250$$

Centered Moving Average

For an even period, like a 4-month moving average, you need a centered moving average to smooth data more effectively. This is calculated by averaging the data before and after the point of interest. It enhances clarity in understanding the trend over time.

The Importance of Time-series Data

Social and economic data, like unemployment rates and stock prices, are commonly reported as time series because these data sets reveal trends over time, helping policymakers, businesses, and researchers make informed decisions. However, be cautious: reading too much into a change in a single period can be misleading.

For example, a sudden spike in unemployment rates might seem alarming, but analysts must consider historical data and potential seasonal patterns to interpret this change accurately.

Conclusion

In this lesson, we covered essential aspects of time-series data, focusing on trends, seasonal variations, and moving averages. Understanding these elements will enhance your ability to analyze data over time effectively.

Study Notes

  • Time-series data: Observations collected over time to analyze patterns.
  • Trend: The overall movement direction of the data over time.
  • Seasonal variation: Fluctuations that occur at regular intervals.
  • Irregular movement: Random changes due to unforeseen events.
  • Moving averages: A statistical method used to smooth data by averaging a set number of data points.
  • Be careful interpreting single-period changes, always consider trends and historical contexts.

Practice Quiz

5 questions to test your understanding