Episode 22 — Understand temporal thinking: stationarity, seasonality, and lag relationships

In this episode, we shift from thinking about data as a pile of rows to thinking about data as a story that unfolds over time, because time changes what patterns mean and how we can trust them. When you measure something once, like a person’s height, time barely matters, but when you measure something repeatedly, like daily website visits or hourly temperature, time becomes part of the meaning. Beginners often assume that if you have enough data points, the model will simply figure it out, but time has a way of sneaking in extra structure and extra traps. Some patterns repeat because of calendars, some patterns drift because the world changes, and some patterns show up only after a delay. The big ideas in temporal thinking are stationarity, seasonality, and lag, and learning them gives you a mental framework for recognizing when a prediction problem is stable and when it is quietly moving under your feet.

Before we continue, a quick note: this audio course is a companion to our course companion books. The first book is about the exam and provides detailed information on how to pass it best. The second book is a Kindle-only eBook that contains 1,000 flashcards that can be used on your mobile device or Kindle. Check them both out at Cyber Author dot me, in the Bare Metal Study Guides Series.

A useful way to start is to define what it means for a process to be stable over time, because that is what stationarity is trying to describe. Stationarity is the idea that the basic behavior of a series does not change as time moves forward, so the average level, the typical spread, and the way values relate to recent past values remain consistent. That does not mean the line is flat, and it does not mean every day looks identical, but it does mean the rules of the game stay similar. If a series is stationary, yesterday and last year are governed by the same general pattern, which makes learning from history feel reasonable. If a series is not stationary, then data from long ago may reflect a world that no longer exists, and the model can learn the wrong lessons. Thinking in terms of stationarity is really thinking in terms of whether the past is a trustworthy teacher for the future.

Non-stationarity is common in real life because many systems trend, drift, or experience sudden shifts, and recognizing those changes early prevents confusion later. A trend is a gradual movement upward or downward over time, like a growing user base or declining battery capacity in a device population. A shift is a more abrupt change, like a new policy, a new product launch, or a sensor replacement that changes readings. When you look at a plot and see that early values cluster around one level but later values cluster around another, you are seeing evidence that the average is not stable. When the ups and downs get much larger over time, you are seeing evidence that the variability is changing. These changes matter because many modeling approaches quietly assume that the pattern you learn from yesterday will still be valid tomorrow, and that assumption breaks if the series is drifting.

Once you have the idea of stability in mind, seasonality becomes easier to understand as a different kind of pattern that is still compatible with predictability. Seasonality means a repeating cycle tied to a consistent time rhythm, such as hours in a day, days in a week, or months in a year. The key word is repeating, because seasonality implies that the pattern comes back in a recognizable way, even if it is not perfectly identical each cycle. Retail demand may rise each weekend, electricity usage may peak each afternoon, and help desk tickets may surge on Monday mornings, and those cycles are often stronger than any other signal in the data. For a beginner, it helps to treat seasonality as the data’s habit, because habits can be learned and used for prediction. Seasonality is not the same as trend, because a trend is a long-term drift, while seasonality is a loop that returns again and again.

Seasonality can also be layered, which means more than one rhythm can exist at the same time, and this is a common place where beginners misread what they are seeing. A daily cycle can sit inside a weekly cycle, and a weekly cycle can sit inside a yearly cycle, producing patterns that look complex even when they are made of simple repeating pieces. For example, a business system might have daily peaks during working hours, but those peaks might be larger on weekdays than weekends, and the overall volume might still climb during the holiday season. If you only look at a short window, you might mistake one cycle for a trend, or you might think the series is unstable when it is actually following a predictable calendar. This is why temporal thinking involves asking what time scale you are observing and what cycles might be present at that scale. When you learn to spot seasonality, you stop treating repetition as noise and start treating it as structure.

Lag relationships are the third cornerstone, and they capture the idea that time links causes and effects with delays rather than instant reactions. A lag relationship means that what happens at one time point helps predict what happens later, either because the series depends on its own past or because one series influences another after a delay. For example, customer signups might lead to increased support tickets a week later, or marketing spend might influence sales after several days. Even within a single series, today’s value might be related to yesterday’s value because systems often have momentum, like temperatures, inventories, or queue lengths. The concept of lag helps you think about memory in data, because a series with strong lag dependence carries information forward. If you ignore lag, you may treat each time point as independent when it is actually connected, and that leads to misunderstanding both prediction performance and model behavior.

To reason about lag in a more concrete way, it helps to introduce the idea of autocorrelation, which is a measure of how related a series is to itself at different delays. Autocorrelation Function (A C F) is a common term for describing how similarity changes as you compare the series to a shifted version of itself over many lags. When the A C F stays high for small lags, it means recent past values are informative, like a smooth river that changes gradually rather than a choppy sea that flips unpredictably. When the A C F has spikes at specific lags, it often points to seasonality, like a weekly pattern producing a strong relationship at a lag of seven days. You do not need to memorize formulas to use this idea; you only need to connect the concept of lag to the idea of repeated similarity. Thinking this way helps you decide whether the past provides useful signals and what time distances matter most.

Another important lag idea is the difference between a direct dependency and a dependency that passes through intermediate steps, because not every relationship means immediate causation. A time series can look related at lag one simply because both are part of a longer trend, or because an underlying factor is influencing both. This is why temporal thinking requires patience and careful interpretation, especially when you see a strong lag relationship and feel tempted to declare a cause-and-effect story. Sometimes lag relationships are mechanical, like a thermostat system where yesterday’s temperature influences today’s, but sometimes lag relationships are structural, like a business metric influenced by weekly scheduling. The point is not to become skeptical of every pattern, but to become precise about what the pattern actually tells you. Lag tells you that time-separated values carry information, but it does not automatically tell you why.

Stationarity, seasonality, and lag also interact with each other in ways that shape what modeling assumptions are reasonable. A series can be non-stationary because it has a trend, yet still have stable seasonality layered on top, which means some aspects repeat while others drift. A series can look non-stationary because the seasonal pattern changes strength over time, such as growing weekday peaks as a company scales up. Lag relationships can also change when the system changes, which means the “memory” of the series is not constant. When beginners feel overwhelmed by time series, it is often because they expect one label to describe everything, like stationary or not stationary, when real systems can be a mix of behaviors. Temporal thinking is the habit of separating these behaviors so you can describe what is stable, what repeats, and what drifts. Once you can describe those parts clearly, choosing a modeling approach becomes more grounded.

A practical mental model is to treat stationarity as a question about whether you can reuse the same rules over time, and treat seasonality as a question about whether the calendar creates repeating contexts. If the rules change, you should be cautious about training on distant history without accounting for that change. If the calendar creates repeating contexts, you should be cautious about mixing together points that belong to different parts of the cycle as if they are interchangeable. Lag adds a third question, which is whether recent history contains information that is more valuable than older history, and whether that information arrives with a delay. These questions are not about advanced math; they are about making your thinking match the structure of time. When you practice asking them, you start to see why random shuffling of time points can be misleading, and why evaluation can look great on paper but fail when deployed.

One common mistake beginners make is to think that a time series is just another dataset with an extra column called date, which leads to treating time like a simple feature rather than a structural constraint. If you feed time stamps as raw numbers into a model, the model can latch onto them in strange ways, especially if the data has trend, because it can learn a shortcut that does not reflect causal structure. Another mistake is to overlook that time order creates a strict notion of what information is available at prediction time. When a model uses future information accidentally, it can look brilliant during testing and then collapse in the real world, because it was never learning the real problem. Temporal thinking helps you avoid these traps by keeping the timeline in your head and asking whether each piece of information would truly be known at the moment you want the model to make a decision. That discipline is a core skill for trustworthy predictive systems.

Seasonality also introduces a subtle issue that shows up when you compare performance across time windows, because the difficulty of prediction can vary across the cycle. Predicting demand on a calm weekday might be easier than predicting demand during a holiday surge, and if your test window happens to land on easy weeks, you can overestimate how well your approach works. This is why it matters to recognize seasonal regimes, meaning parts of the cycle that behave differently. A model might handle normal days well but underperform during seasonal peaks because the variance and the lag structure change. If you have daily and weekly seasonality, you might also find that errors cluster at certain times of day or certain days of the week, even if the average error looks acceptable. When you understand seasonality, you stop focusing only on overall accuracy and start paying attention to where the model struggles in time.

Lag relationships can also mislead you if you assume that longer memory is always better, because sometimes the past can distract rather than help. If a process changes, then very old history may reflect outdated behavior, and relying on it can slow adaptation. If a process is heavily seasonal, then the most relevant history may be the same point in the previous cycle rather than the most recent points, such as last Monday rather than yesterday. This is where temporal thinking becomes a balancing act between recency and repetition, and you learn to ask what kind of memory the system has. Some systems are like a slowly turning ship, where yesterday matters a lot, while others are like a weekly routine, where the same day last week matters more. Recognizing which pattern you have is more important than memorizing a specific method name, because it guides how you interpret signals and how you judge whether a model’s behavior makes sense.

There is also a reason many time-focused methods emphasize transforming the data to remove trend or stabilize variance, because that pushes the series closer to a stationary form where relationships are easier to learn. Differencing is one classic idea, where you look at changes between consecutive time points rather than raw levels, and that can remove a trend and highlight short-term dynamics. Another common approach is using logs to manage growth and make variability more even across time, especially when the series grows in a multiplicative way. When a series is closer to stationary, lag relationships can be more consistent, and the model’s learning problem becomes clearer. This is also where you might hear about AutoRegressive Integrated Moving Average (A R I M A) as a family of methods designed around these stationarity-oriented ideas, even if you do not plan to use it directly. The key beginner takeaway is that transforming a series is often about making time behavior more stable so that patterns are easier to learn and easier to trust.

By the time you finish this topic, you should be able to look at a time-based dataset and ask smarter questions before you ever worry about algorithms, because those questions shape everything that follows. Stationarity is your check on whether the past behaves like the present, and it tells you whether learning from history is straightforward or risky. Seasonality is your clue that the calendar creates repeating contexts, and it tells you to respect cycles rather than treating them as random wiggles. Lag relationships are your way of describing memory and delayed influence, and they tell you which parts of history are actually informative for prediction. When you hold these three ideas together, temporal data stops feeling like a special case and starts feeling like a structured story with rules you can learn. That shift in thinking is what makes time-aware modeling and evaluation feel logical instead of mysterious, and it sets you up to avoid the most common errors that break real-world predictions.

Episode 22 — Understand temporal thinking: stationarity, seasonality, and lag relationships
Broadcast by