LU9 Lecture Notes

📚 LU9 Lecture Notes.pdf

Brief overview

This document introduces time series analysis, a method for understanding and predicting data collected over regular intervals. Mastering these concepts is essential for identifying patterns, modeling temporal influences, and forecasting future trends across various fields.

Key points

  • Overview of time series data and its four core components: trend, cycles, seasonality, and random effects.
  • Understanding the multiplicative time series decomposition model (Y = T × S × I).
  • Methods for isolating and estimating trend and seasonal components using moving averages.
  • Practical application of the decomposition model for forecasting future time series values (Ŷ = Ť × Ŝ).
  • Adjustments for moving averages with odd and even numbers of periods.

1. Introduction to time series analysis

1.1 What is a time series?

  • Time series: A collection of numerical data for a random variable observed over time at regular intervals.
  • Data is arranged in chronological order.
  • A trendline graph visualizes time series data. Time is on the x-axis, and variable values are on the y-axis.
  • The main goals of time series analysis are to:
  • Identify recurring patterns.
  • Model these patterns statistically.
  • Forecast future values 2.

1.2 Components of a time series

Time series data are influenced by four underlying forces acting together or separately.

  • Trend (T): The long-term upward or downward movement in the data over time.
  • Cycles (C): Changes related to economic activity. (Note: Not covered in this course).
  • Seasonal variations (S): Fluctuations that repeat at regular intervals, tied to the calendar (e.g., days, weeks, months).
  • Random effects (I): Unpredictable variations caused by random influences 3.

Table 1: Time series components

ComponentDescription
Trend (T)Long-term movement (increase/decrease)
Cycles (C)Economic activity changes
Seasonal (S)Calendar-related regular fluctuations
Irregular (I)Unpredictable, random influences

1.3 Identifying components in examples

Analyzing graphs helps identify which components are present in a time series.

  • Quarterly bicycle sales show an approximate constant trend and irregular variations. This line graph displays quarterly bicycle sales over 14 time periods, showing fluctuations and an approximate constant trend..

  • Weekly bread sales exhibit an increasing linear trend and irregular variations. This line chart shows the weekly bread sales at a grocery store over a period of 14 weeks, indicating an increasing linear trend and irregular variations..

  • Quarterly hot water bottle sales demonstrate a decreasing linear trend, irregular variations, and seasonal variations. This line graph shows the quarterly hot water bottle sales at a pharmacy over time, illustrating a decreasing linear trend and seasonal variations..

  • Quarterly car sales display an increasing linear trend, irregular variations, and seasonal variations. This line graph displays quarterly car sales at a dealership over time, illustrating an increasing linear trend, irregular variations, and seasonal variations..

Table 2: Component presence in sales data

Sales DataTrend (T)Seasonal (S)Irregular (I)
Bicycle salesApproximateNoYes
Bread salesIncreasingNoYes
Hot water bottle salesDecreasingYesYes
Car salesIncreasingYesYes

🔑 Important: Visual inspection of time series graphs is the first step to understanding its underlying structure. 4 5 6 7

2. Time series decomposition model

2.1 Overview of decomposition

The time series decomposition model aims to break down a time series into its constituent components. The classical approach uses a multiplicative model: Y=T×S×IY = T \times S \times I

Where:

  • YY is the observed value of the time series.
  • TT is the trend component, representing the long-term direction.
  • SS is the seasonal component, reflecting predictable, periodic patterns.
  • II is the irregular or residual component, representing random fluctuations.

This model assumes these components are multiplied together to form the observed data. Trend and seasonality are typically modeled, while irregular fluctuations are not.

A line graph displays a time series with data points plotted against time on the x-axis and a value Y on the y-axis. 10.

The goal of decomposition is to isolate and model these components separately. This allows for forecasting future values based on estimated trend and seasonal patterns: Y^=T^×S^\hat{Y} = \hat{T} \times \hat{S}

The steps involved in decomposition analysis are:

  1. Estimate the trend component.
  2. Estimate the seasonal component.
  3. Forecast future values.

2.2 Estimating the trend component

The trend component (T^\hat{T}) can be estimated using two primary methods: regression analysis or moving averages.

2.2.1 Trend estimation via regression analysis

Linear regression analysis can be used to find a straight-line trend. The observed time series data (YY) is the dependent variable, and time (XX) is the independent variable (X=1,2,3,…,nX = 1, 2, 3, \dots, n).

The estimated trend is given by the regression equation: T^=a+bX\hat{T} = a + bX

Where aa is the intercept and bb is the slope.

A line chart displays a time series with a superimposed linear regression line, indicating a trend estimate. 11. A line chart displays a time series of sales data with a superimposed linear regression line. 24.

2.2.2 Trend estimation via moving averages

Moving averages smooth out short-term fluctuations in a time series. They are calculated by averaging kk successive observations.

The value of kk usually matches the number of seasons in the data.

  • A moving average value is always centered on a middle time period.
  • If kk is odd, simple moving averages (MAV) are calculated.
  • If kk is even, moving averages are calculated first, then successive moving averages are averaged to get a centered moving average (CMAV).

A line graph shows a time series with a superimposed centered moving average line. 12.

Moving averages calculation

  • Odd kk: For a time series of length nn and an odd kk, calculate the MAV for each period by averaging kk consecutive YY values. Example: For k=3k=3, MAVt=(Yt−1+Yt+Yt+1)/3MAV_t = (Y_{t-1} + Y_t + Y_{t+1}) / 3 17.

  • Even kk: For a time series of length nn and an even kk, first calculate MAVs. Then, center successive MAVs by averaging them. Example: For k=4k=4, calculate MAVt.5=(Yt+Yt+1+Yt+2+Yt+3)/4MAV_{t.5} = (Y_t + Y_{t+1} + Y_{t+2} + Y_{t+3}) / 4. Then, CMAVt=(MAVt−0.5+MAVt+0.5)/2CMAV_t = (MAV_{t-0.5} + MAV_{t+0.5}) / 2 18.

📝 Example: To find the MAV for Year 2, Term 1 (t=4t=4) with k=3k=3 (odd), average the YY values for periods 3, 4, and 5: MAV4=(Y3+Y4+Y5)/3MAV_4 = (Y_3 + Y_4 + Y_5) / 3 20.

📝 Example: To find the CMAV for Year 1, Quarter 3 (t=3t=3) with k=4k=4 (even), first calculate MAV2.5MAV_{2.5} and MAV3.5MAV_{3.5}. Then, CMAV3=(MAV2.5+MAV3.5)/2CMAV_3 = (MAV_{2.5} + MAV_{3.5}) / 2 21.

Moving averages provide a smoothed estimate of the trend, removing cyclical and irregular variations 16.

2.3 Estimating the seasonal component

The seasonal component is estimated using the ratio-to-moving average method. This involves isolating the seasonal and irregular components from the time series.

2.3.1 Calculate seasonal ratios

Seasonal ratios are calculated by dividing each observed time series value (YY) by its corresponding moving average (MAV or CMAV). This ratio, multiplied by 100, represents the seasonal and irregular components.

Seasonal Ratio =YMAV×100= \frac{Y}{MAV} \times 100

The formula Y=MAV×S×IY = MAV \times S \times I implies YMAV=S×I\frac{Y}{MAV} = S \times I.

This line chart displays two series: 'Seasonal ratio' (green solid line with circles) and 'Adjusted seasonal index' (black dashed line with circles) plotted against 'Time' on the x-axis and 'Y' on the y-axis.. A plot of the Seasonal ratios. 30.

2.3.2 Find median/unadjusted seasonal indices

To represent each season with a single value, the median of the seasonal ratios for each season is calculated. The median is preferred for its resistance to outliers.

  • Sort seasonal ratios by season.
  • For odd kk (number of seasonal ratios per season), the median is the middle value.
  • For even kk, the median is the average of the two middle values 31.

2.3.3 Calculate adjusted seasonal indices

The sum of the unadjusted seasonal indices should ideally equal k×100k \times 100 (where kk is the number of seasons). If it does not, an adjustment factor is used.

  1. Sum the median seasonal indices: Calculate the total sum of the unadjusted indices for all seasons 33.
  2. Calculate the adjustment factor: Adjustment Factor =k×100∑median seasonal indices= \frac{k \times 100}{\sum \text{median seasonal indices}} 34.
  3. Adjust the indices: Multiply each median seasonal index by the adjustment factor to obtain the final adjusted seasonal indices. Adjusted Seasonal Index = Median Seasonal Index ×\times Adjustment Factor 35.

These adjusted indices represent the typical seasonal effect for each period 14.

2.4 Forecasting

Forecasting future values involves combining the estimated trend and the estimated seasonal components. The forecasting model is: Y^=T^×S^\hat{Y} = \hat{T} \times \hat{S}

Where T^\hat{T} is the projected trend value for the future period, and S^\hat{S} is the adjusted seasonal index for that period.

A line graph shows a time series and its forecast, with the x-axis representing time and the y-axis representing values. 15.

🔑 Important: Decomposition helps in understanding the historical patterns of a time series by separating its trend and seasonal effects, which are then used to predict future values 9.

3. Forecasting future time series values

Forecasting future time series values uses the estimated trend and the adjusted seasonal index. The process involves identifying the future time point and its corresponding season.

3.1 The forecasting formula

The basic formula for forecasting a future time series value is:

Y^=T^×S^\hat{Y} = \hat{T} \times \hat{S}

Where:

  • Y^\hat{Y} is the forecasted value.
  • T^\hat{T} is the estimated trend value for the future time point.
  • S^\hat{S} is the adjusted seasonal index for the specific season.

This formula combines the long-term direction of the trend with the recurring seasonal patterns to predict future outcomes 37.

3.2 Example forecast calculations

To forecast ice-cream sales for the next four seasons, we use the identified time index (XX) and season. The calculations are performed to two decimal places.

📝 Example: For X=8X=8 and a "warmer" season, the forecast is calculated using the trend and the seasonal index for warmer periods.

The following table details the forecast for the next four seasons:

These calculations use the formula Y^=(a+bX)×adjusted_seasonal_index100\hat{Y} = (a + bX) \times \frac{adjusted\_seasonal\_index}{100}.

The visual representation of these forecasted values alongside historical data helps in understanding the projected future trends.

A line chart showing historical sales data and a forecasted trend for future time points.

🔑 Important: Time index (XX) and season are crucial inputs for forecasting future values.

🔑 Important: The forecast combines the trend (T^\hat{T}) and the seasonal index (S^\hat{S}).

🔑 Important: Currency amounts should be written in full letters, such as "dollars" or "euros", not using symbols like "USD" 38.

🔑 Important: Forecasts are estimations and should be interpreted with an understanding of their potential uncertainty.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also