AI Glossary / Time series and signal processing / Intermediate
Nonstationarity
Definition
Nonstationarity occurs when the statistical behavior of a process changes with time or another relevant index. In time series, this can involve changing means, variances, dependence patterns, or broader distributions. The precise meaning depends on the definition of stationarity being used. Individual observations changing value is not, by itself, evidence of nonstationarity.
What it means
A stationary process can fluctuate constantly while retaining stable statistical rules. Nonstationarity concerns changes in those rules or properties, such as a shifting level, recurring calendar-dependent mean, or a variance that grows over time.
In machine learning, distribution changes can make historical training data less representative of deployment. However, a change in feature distribution and a change in the feature-to-outcome relationship are different issues, and they need not occur together.
How it works
Weak stationarity requires a constant finite mean, constant finite variance, and covariance that depends on time separation rather than absolute time. Strict stationarity requires joint distributions to be unchanged by time shifts and does not itself require finite moments. A process can fail one definition for reasons that need careful interpretation.
Inspect time plots, distributions, dependence, and known changes in measurement or operations. Tests can help investigate particular hypotheses, such as unit roots or stationarity, but no single short-sample diagnostic settles every form of change. Responses may include modeling trend or seasonality, differencing, transformations, change-point models, or updating procedures, chosen according to the source of nonstationarity.
Three practical examples
- A store's average daily demand changes after a permanent expansion, making an old level estimate inappropriate without adjustment.
- A sensor process maintains roughly the same mean but develops greater variance as operating conditions change.
- A machine-learning service encounters a new mix of customers, while separately checking whether the relationship between its inputs and outcomes has also changed.
Think of it this way
Think of rolling dice. Results change from roll to roll even when the dice remain the same. If the dice themselves change during the sequence, the probabilities may change too. The first situation can be stationary; the second can be nonstationary. The analogy distinguishes random fluctuation from changing statistical behavior.
Worked example
Consider an original random walk starting at X0 = 0. At every step, independently add +1 or −1 with equal probability. Each increment has mean zero and variance one. After t steps, Xt is the sum of t increments, so its mean remains zero but its variance is t.
At time one, the possible values are −1 and +1, each with probability one-half, giving variance one. At time two, values are −2, 0, and 2 with probabilities one-quarter, one-half, and one-quarter, giving variance two. At time four, direct enumeration of all sixteen equally likely increment sequences gives variance four.
Thus the level process is not weakly stationary despite having a constant mean: its variance changes with time. Its first differences, Xt − X(t−1), are exactly the independent ±1 increments and are stationary in this construction.
Contrast this with Yt = 10 + 2t + et, where et is independent mean-zero noise with constant variance. Here the mean changes deterministically. Removing the known trend leaves weakly stationary noise under the stipulated assumptions. The two examples illustrate different mechanisms; they do not justify automatically differencing every changing-looking series.
Illustrative case study
Illustrative fictional case: Birch Demand finds that forecast errors rise after a service expands into a new region. The team checks whether the change comes from customer mix, different operating hours, data-definition changes, or altered behavior within existing customer groups.
It evaluates a revised model on later periods and monitors performance separately across the affected groups. The fictional case illustrates diagnosis before adaptation: frequent retraining alone cannot resolve an incorrect target definition or missing information.
Common misconceptions and mistakes
Nonstationarity is not synonymous with noise, irregular appearance, or nonlinearity. A stationary process can be noisy and nonlinear, while a simple deterministic trend can create nonstationarity. Constant mean and variance alone are also insufficient for weak stationarity if covariance changes with absolute time.
Do not assume that a unit-root test diagnoses every distribution change. Structural breaks, seasonal patterns, and limited power complicate interpretation. Removing a visible trend does not guarantee that variance and dependence are stable. Nor does changing input frequency necessarily imply concept drift in the conditional outcome relationship.
Business use
Nonstationarity matters because forecasting and machine-learning systems often transfer patterns learned earlier into later decisions. A mismatch can affect accuracy, calibration, and the relevance of historical comparisons.
Record data definitions and operational changes, evaluate with time-respecting splits, and monitor errors and distributions. Decide whether older data remain informative rather than using a fixed history window automatically. Model updates should be assessed for actual improvement, including their behavior during transitions and their ability to retain useful recurring patterns.
People also ask
Can a process have a constant mean and still be nonstationary?
Yes. The random walk example has constant mean and increasing variance.
Does seasonality imply nonstationarity?
A deterministic calendar-dependent mean violates ordinary stationarity, though specialized seasonal or cyclostationary descriptions may be useful.
Is differencing always the solution?
No. The appropriate treatment depends on the mechanism and the forecasting task.
Check your understanding
What is the random walk's variance after four steps?
Answer: Four under the stated independent unit-variance increments.
Why do its first differences behave differently?
Answer: They recover the stationary increments instead of their accumulating sum.
Does an observation changing from ten to twelve prove nonstationarity?
Answer: No. Such variation can occur under stable statistical rules.
What additional property beyond mean and variance matters for weak stationarity?
Answer: Covariance must depend only on lag, not on the absolute observation time.
Related terms
- Stationarity
- Random walk
- Differencing
- Structural break
- Concept drift
- Seasonal adjustment
- weak stationarity
- strict stationarity
- unit root
- distribution shift
Learn next
compare a stationary noisy series, a deterministic trend with noise, and a random walk. Examine what detrending and differencing do to each, then relate the choice of treatment to the intended forecast horizon and evaluation design.
More in Time series and signal processing
- Multicollinearity - Multicollinearity is a strong linear relationship among two or more predictor variables in a model.
- Noise-to-signal ratio - Noise-to-signal ratio compares the magnitude of unwanted variation with the magnitude of a signal.
- Non-linear forecasting - Non-linear forecasting uses a model in which the predicted quantity has a nonlinear relationship with relevant inputs, such as past observations, past...
- Object-level state space - An object-level state space is the collection of possible states of the task an intelligent system is trying to solve.
- Order selection criteria - Order selection criteria are rules for choosing a model's structural complexity, such as how many autoregressive or moving-average terms a time-series model...
- Original time series - An original time series is a sequence of observations presented without seasonal adjustment.
Sources
Sources: Google Machine Learning Glossary, nonstationarity and concept drift: https://developers.google.com/machine-learning/glossary . NIST, Stationarity: https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm . Hyndman and Athanasopoulos, Forecasting: Principles and Practice, stationarity and differencing: https://otexts.com/fpp3/arima.html . Primary sources consulted. The random-walk enumeration and fictional case are original.
Previous: Nonserial dynamic programming Next: Nonstationary kernel