Skip to content
tezvyn:
Menu

Stationarity: A Time Series's Stable Personality

Source: Wikipedia: Stationary processEasyHow cards are made

A time series is stationary if its statistical personality, like its average and spread, remains constant over time. Many forecasting models require this stability to work correctly.

The mental model

A stationary process is a time series whose fundamental statistical properties don't change over time. Imagine taking a snapshot of the data today and another a year from now. If the process is stationary, the average value (mean) and the typical spread of values (variance) in both snapshots should be roughly the same. The process has a stable, predictable character, not one that is constantly evolving.

How it works

Formally, stationarity means the joint probability distribution of the process is invariant to shifts in time. This is a very strict definition. In practice, analysts usually work with a looser definition called "weak-sense stationarity," which requires just three conditions. First, the mean of the series is constant. Second, the variance is constant. Third, the correlation between two data points depends only on the time lag between them, not on their absolute position in the series. Most statistical procedures aim to achieve this practical form of stationarity.

When to use it

Stationarity is a prerequisite, not a tool you choose to use. It's a property you must check for or induce before applying many classical time series forecasting models, such as ARIMA. These models learn patterns from the past and assume those patterns will continue. If the data has a trend (e.g., a constantly increasing mean), this core assumption is violated, and the model cannot produce a reliable forecast without first transforming the data to remove the trend.

When not to use it

You don't need to enforce stationarity for all models. For instance, some machine learning models like tree-based methods or certain neural networks can often handle non-stationary data directly by learning trends and seasonality as features. However, even with these advanced models, transforming the data to be stationary can sometimes improve performance and stability. The key is to know your model's underlying assumptions.

One canonical example

Consider the daily stock price of a growing company. The price series likely has an upward trend, so its mean is increasing over time. This is non-stationary. To analyze it with a classical model, you must transform it. A common technique is "differencing," where you replace each price with the difference between it and the previous day's price (the daily return). This new series of daily returns often has a constant mean (hovering near zero) and constant variance, making it stationary and suitable for analysis.

Interview question

Why is ensuring stationarity crucial before applying classical time series forecasting models like ARIMA?

  • a.It simplifies the model's internal calculations, leading to faster training times.
  • b.It guarantees that the time series will not contain any missing values or outliers.
  • c.Non-stationary data can only be analyzed using advanced machine learning techniques, not classical methods.
  • d.Classical models assume that the underlying statistical properties of the data, learned from the past, will persist into the future.Correct
Why?

The card states that classical models like ARIMA "learn patterns from the past and assume those patterns will continue." Stationarity ensures that the statistical properties (mean, variance, correlations) are stable, making this assumption valid. Option A is not the primary reason; the core issue is model validity and reliability, not just computational speed.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on time series — each one lists the topics its interview covers.

See open roles