Lesson 4: Time Series Analysis
September 16, 2026
Review:
- DataCamp scores
- New Google Sheets Add-In
- Exam 1 next week
- Bring a laptop and be sure it’s charged
Presentation:
What Is Time Series Data?
- Define a time series as observations recorded over time.
- Introduce notation:
- Emphasize that order matters in time series data.
- Examples:
- Monthly sales
- Weekly customer traffic
- Quarterly profits
- Daily stock prices
- Annual population
Plot the Time Series Values on a Chart
- Put time on the horizontal axis.
- Put the observed variable on the vertical axis.
- Look for important patterns:
- Trend — long-term upward or downward movement
- Seasonality — repeating patterns over regular intervals
- Random variation — unpredictable fluctuations
Trend Models
- Review the idea of using regression to model change over time.
- Linear trend:
- Consider polynomial trend models when the relationship isn’t a straight line (curve fitting).
- Use trend models to generate forecasts for future periods.
Naive Forecasting
- Simplest forecasting approach:
- The forecast for the next period is simply the most recent observation.
- Use as a baseline for comparison with other forecasting methods.
Moving Average (MA) Forecasting
- Use an average of the most recent observations.
- Example: 3-period moving average
- Moving averages smooth random fluctuations.
- More time periods averaged = more smoothing.
- More smoothing means slower reaction to changes.
Measuring Forecast Error
- Compare forecasts with what actually occurred.
- Forecast error:
- Absolute error:
- Measure overall forecasting accuracy:
- Lower MAE indicates a more accurate forecasting method.
- Note: MAE is also commonly called MAD in forecasting.
Compare Forecasting Methods
- Naive forecast
- Moving average
- Trend model
- Which method has the lowest MAE?
Time Series Forecasting Process
- Time series forecasting uses past observations to estimate future values.
- The basic forecasting process is:
- Plot the data → identify patterns → choose a forecasting method → calculate forecasts → measure forecast error → compare models.
Demonstrate with fictional oil price data in Sheets
Activity:
- Recreate the forecasting and error measurement approach.
- Use the “Activity” data tab.
- Look in the same fictional oil price data in Sheets file.
- This is your practice exam.