Week 5:
Intro to Time Series
and Project 1 Overview

Agenda

Motivation for analyzing time series data

Time series analysis

Forecasting and prediction

Project 1 overview

Types of Datasets in This Course

1. Time Series Data

Time series data consists of observations collected at successive points in time, typically at regular intervals (e.g., daily, monthly, annually). This type of data is useful for identifying trends, seasonality, and making forecasts.

Example: Monthly sales revenue of a grocery store over five years.

2. Cross-Sectional Data

Cross-sectional data captures information at a single point in time across multiple entities. Unlike time series, this data does not track changes over time but rather compares differences between subjects at a given moment.

Example: Household income levels surveyed across different cities in a single year.

3. Panel Data (Longitudinal Data)

Panel data, or longitudinal data, combines elements of both time series and cross-sectional data. It follows the same entities (e.g., individuals, firms, regions) over multiple time periods, allowing for analysis of both individual differences and time-based changes.

Example: Annual employment records of the same group of workers over a 10-year period.

Plot Comparison

Intro to Time Series Analysis

The problem:
We don’t know what will
happen in the future

The solution:
We can use past data to
make a guess about the future*

What is time series data?

Time series data is a sequence of data points collected over time.

It typically consists of observations taken at regular intervals (e.g. every hour, every day, every week, etc.) and can be used to study trends and patterns over time.

Example: Store sales volume over time.

How is time series data used in business

Time Series Analysis

  • learn about trends

  • compare current period to past periods

Forecasting

  • make an educated guess about future values

  • develop business strategy around forecasts

Time Series Analysis

Time series decomposition

The statistical method often used with time series data is called time series decomposition.

This method breaks down time series data into several components, each representing an underlying pattern within the data.

Isolating these components and analyzing them separately is important for the following reasons:

  • to understand what contributes to the observed trends
  • to make better forecasts

Time series decomposition

Decomposition statistically deconstructs a time series into several components:

  1. seasonality

  2. trend

  3. cyclical

  4. residual or “noise”

Hyndman & Athanasopoulos (2021)

Example

Structural breaks

Synthetic time series with three data generating mechanisms

Sometimes, data doesn’t follow a smooth pattern—something big happens, and the trend changes suddenly.

These major shifts in the data are called structural breaks.

A structural break occurs when there is a sudden and lasting change in how the data behaves. This means the underlying factors driving the data (also called the data-generating process) have changed.

Why do structural breaks matter?

Identifying these changes helps analysts understand whether a trend is continuing as expected or if something important has altered the pattern.

Common Causes of Structural Breaks:

  • Economic policy changes (e.g., a new tax law affecting business profits)
  • Technological innovations (e.g., introduction of smartphones disrupting traditional media)
  • Natural disasters (e.g., a drought causing sudden drops in crop yields)
  • Shifts in consumer behavior (e.g., a global pandemic changing travel habits)

Exercise: Time Series Analysis

Example: Imagine you are analyzing restaurant sales over time. For years, sales followed a seasonal pattern, with higher sales in summer and lower in winter. Suddenly, in 2020, there was a huge, lasting drop in sales. This was a structural break—caused by the COVID-19 pandemic, which led to lockdowns and changes in consumer habits.

On your own: Describe one example of a structural break in a time series.

Forecasting

Forecasting examples

We might want to forecast. . .

  • power demand to decide whether to build new power plant

  • call volumes to schedule staff in call center

  • inventory requirements to meet demands

Forecasting overview

Use historical data to develop a model, then use the model to predict the future

Model quality depends on past data and assumptions

Forecasts are uncertain; we can quantify some of that uncertainty

Forecasting steps

  1. Problem definition

  2. Gathering data and institutional knowledge

  3. Preliminary (exploratory) analysis

  4. Choosing and fitting models

  5. Using and evaluating a forecast model

Exercise: Forecasting

Example: A group of farmers in a drought-prone region wants to determine whether they will have enough water for irrigation in the upcoming growing season. They would analyze historical rainfall and reservoir level data from the past 20 years, and use forecasting models to predict water availability for the next six months to help make better decisions about crop selection, irrigation scheduling, and water conservation strategies.

On your own: How could you use forecasting to improve decision-making in ag business or environmental and natural resource management?

Summary

Time series data is a common structure of data

Certain techniques are designed to analyze time series data

Forecasting is a common need

Introductions in this course (see Hyndman & Athanasopoulos (2021))

Project 1

Project 1 overview

Form groups of 2.

  • Choose an agribusiness or environmental resource management question to answer using time series data.
  • Collect relevant time series data.
  • Analyze trends and patterns.
  • Generate a forecast.
  • Present results in a recorded video.

Example: Corn and Combines

Context: Equipment dealers tend to sell more machinery when agricultural prices rise. Most farmers near Dealer X grow corn.

Decision: Dealer X needs to decide whether to increase inventory of new tractors and combines for next year.

Question: Will corn prices rise or fall in the next year, and by how much?

Hypotheses:

  • If corn prices are expected to rise, Dealer X may increase inventory and prepare for higher demand.
  • If prices are expected to fall, they may delay purchases or focus on used equipment sales to reduce risk.

Approach:

  • Analyze historical time series data of corn prices (including decomposition).
  • Forecast the corn Producer Price Index (PPI) one year into the future.

Presentation:

  • Provide context by plotting raw data.
  • Describe decision-making implications.
  • Explain key insights.
  • Use effective graphics and storytelling techniques.

Example: Corn and Combines

Story: Corn prices have historically risen in stepwise jumps rather than gradual increases, with structural breaks around 1940, 1970, and 2006. Each break led to a new, higher average price level.

Result: If corn prices continue following this pattern, Dealer X should consider increasing equipment inventory to meet anticipated higher demand from farmers who will have greater revenues to invest in new machinery.

Finding data

  • Many sources of public data are available, including:
  • Choose datasets appropriate for answering your research question.
  • Instructors and TAs are available to assist.

Analysis Requirements

Your project must include:

  • Time series analysis (covered in Unit 1, Week 2)
  • Forecasting techniques (covered in Unit 1, Week 3)

Project Steps

  1. Identify an interesting and relevant question.
  2. Collect and clean your data.
  3. Develop an analysis strategy, explore, and refine your approach.
  4. Develop a compelling presentation.

Integration with the D3M Framework

  • Align your project with the guidelines covered in the Data-Driven Decision Making (D3M) framework.
  • Use structured analysis and interpretation to drive insights and decision-making.

References

Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. https://otexts.com/fpp3/. Accessed on 02-14-2023.