Biostatistics · Intermediate

Introduction to Time Series Analysis

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

Time series analysis involves examining numerical data points collected at specific time intervals to identify trends, seasonality, and noise. This lesson covers the fundamental definition, decomposition components, and basic forecasting methods such as the naïve approach and linear regression.

Intuition

Think of a time series as a story told by numbers over time, where the order matters and each point depends on what came before. Unlike a simple list of data, a time series captures the temporal dynamics of a phenomenon, allowing us to separate the long-term direction (trend) from regular repeating patterns (seasonality) and random fluctuations (noise). By understanding these components, we can build models to predict future values, though accuracy naturally decreases as we look further ahead.

Key equations

yt=Tt+St+Et
(1)

Additive decomposition where the time series value is the sum of trend, seasonal, and error components.

yt+1=yt
(2)

The naïve forecasting method, predicting the next value is equal to the current observed value.

y=365.5t−718,500
(3)

Linear regression model for S&P 500 where t is the calendar year.

Derivation

  1. Define a time series as a sequence of numerical data points yt recorded at equal time intervals t.
  2. Decompose the series into trend (Tt), seasonal (St), and error/noise (Et) components.
  3. Select a forecasting method based on data characteristics, such as the naïve method for baseline or linear regression for trend capture.
  4. Apply the chosen model to historical data to generate predictions for future time steps.

Worked example

Problem

Using the linear regression model y=365.5t−718,500 for the S&P 500, forecast the index value for the year 2024.

  1. Identify the regression equation: y=365.5t−718,500.
  2. Substitute the target year t=2024 into the equation.
  3. Calculate: y=365.5(2024)−718,500.
  4. Compute the result: 739,772−718,500=21,272.

Answer 21,272

Common mistakes

  • Assuming any ordered list of data is a time series; it must be numerical and measured at specific time intervals.
  • Ignoring that forecasting accuracy diminishes as the prediction horizon extends further into the future.
  • Using the naïve method when significant trends or seasonality are present, as it ignores underlying structural elements.
  • Forgetting that residuals should resemble white noise; if they show patterns, the model may be missing key components.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.