Course contentsShow
← Data Science
Lesson 715 of 2,14519. Time Series FoundationsFree lesson

Visual Tests for Stationarity

Learn to identify non-stationarity through time plots, rolling statistics plots, and visual inspection techniques.

Visual Tests for Stationarity

What you'll learn: You'll discover how to spot non-stationarity in time series data simply by looking at plots—no complex tests needed yet.

The Power of Your Eyes

Before running statistical tests, experienced data scientists often "eyeball" their time series. Visual inspection is surprisingly powerful for detecting stationarity issues. Think of it like a doctor looking at a patient before ordering tests—you can spot obvious problems immediately.

Time Plots: Your First Check

Plot your time series values against time. A stationary series should look like it's dancing around a constant mean with consistent variance—no wandering off, no growing wilder over time.

Red flags for non-stationarity:

  • Trend: The series consistently moves up or down (violates constant mean)
  • Changing spread: The fluctuations get wider or narrower over time (violates constant variance)
  • Level shifts: Sudden jumps to a new baseline that persists

Rolling Statistics Plots

A more sophisticated visual technique: calculate and plot rolling (moving) means and standard deviations over windows of your data.

For a stationary series, these rolling statistics should be relatively flat horizontal lines. If your rolling mean slopes upward or your rolling standard deviation climbs steadily, you've got non-stationarity.

This is like checking a patient's vital signs over time—stable vitals suggest health, erratic ones signal problems.

What to Look For

  • Flat rolling mean = constant average (good!)
  • Flat rolling std = constant variability (good!)
  • Trends in rolling stats = non-stationary (needs fixing!)

Key Takeaway: Visual tests—especially time plots and rolling statistics plots—provide quick, intuitive evidence of stationarity violations before you invest in formal statistical tests.