Random walk

Authors
Affiliation

Ellen L. Hamaker

Methodology & Statistics Department, Utrecht University

Ria H. A. Hoekstra

Methodology & Statistics Department, Utrecht University

Published

2026-01-02

This article has not been peer-reviewed yet and may be subject to change.
Want to cite this article? See citation info.

This article is about processes that are referred to as a random walk. Random walk processes are a key concept in the N=1 time series literature, and form an important stepping stone towards understanding the general autoregressive integrated moving-average (ARIMA) model.

A random walk process can be characterized by an increasing or decreasing trend over time, but also by a trend that changes direction. The trend in a random walk is referred to as a stochastic to indicate that it emerges ``by accident’’, as opposed to a deterministic trend that can be expressed as a direct function of time. A random walk can also include a deterministic trend; such a process is known in the literature as a random walk with drift. It is important to know about the difference between stochastic versus deterministic trends, as they each require a specific approach in your analysis: Failing to account for a stochastic trend or accounting for it in the wrong way will distort subsequent results in your analysis, leading to incorrect conclusions about your process (Hamilton, 1994; Ryan et al., 2025).

Below you can read more about: 1) a random walk; 2) a random walk with drift; 3) how to determine whether a process is a random walk; and 4) the relation between a random walk and other unit root processes from the ARIMA family.

1 A random walk

A random walk can be expressed as

\[ y_t = y_{t-1} + \epsilon_t,\] where \(\epsilon_t\) is a random shock that comes from a white noise process, with mean zero and variance \(\sigma_{\epsilon}^2\). In Figure 1 you can see a representation of a random walk, which shows how each score is based on the preciding score plys a random shock. Those random shocks do not contain any relations over time, making it a white noise series.

Figure 1: Path diagram of random walk showing how each score is based on retaining the previous score, and adding a random shock to this, where the latter form a white noise series.

A defining feature of a random walk is that it is impossible to predict whether it will go up or down over time. Because every new value builds on all previous random shocks, the uncertainty about future values increases the further you try to look ahead (Hyndman & Athanasopoulos, 2021). To better understand the characteristic behavior of a random walk, it helps to plug in the expression for \(y_{t-1}=y_{t-2} + \epsilon_{t-1}\) into the right-hand side of the equation presented above, and to keep repeating this (i.e., \(y_{t-2}=y_{t-3} + \epsilon_{t-2}\), etc.). When you do this, you end up with

\[ y_t = \epsilon_t + \epsilon_{t-1} + \epsilon_{t-2} + \epsilon_{t-3} + \dots .\]

This shows that a random walk can be thought of as an infinite sum of current and past random shocks, where the effect of past shocks never dissipates regardless of how long ago they occurred.

Figure 2 contains an example of a random walk over 200 occasions. The top panel contains the time series plotted against time, which shows you that a random walk may go up and down in a random way. The autocorrelation function (ACF) and partial autocorrelation function (PACF) in the bottom panels show that there are large autocorrelations that only slowly become smaller as the lag increases, while the partial autocorrelation beyond lag 1 are all (about) zero.

Figure 2: Example of a random walk: Top panel contains the time series plotted against time; bottom left shows the autocorrelation function plot; and bottom right shows the partial autocorrelation function plot.

While the ACF and PACF are quite typical of a random walk, the time series itself can be characterized by quite different patterns over time. This becomes clear when comparing the random walk in Figure 2 with the one in Figure 3. The latter is characterized by much more variability, and a large drop during the first 50 occasions followed by an upward trend afterwards.

Figure 3: Example of a random walk: Top panel contains the time series plotted against time; bottom left is the autocorrelation function plot; and bottom right contains the partial autocorrelation function plot.

Figure 4 contains five realizations of the same random walk process. It clearly shows that, as the processes unfold over time, they start to diverge more and more, resulting in an ever-increasing variance across the different series over time.

Figure 4: Examples of five random walk processes plotted against time.

These examples show that, especially in the short run, a random walk may be characterized by an increasing or decreasing trend that may appear to be deterministic. However, whether a random walk process will go up or down, and whether the direction will change, is entirely random. As a result, a random walk process is inherently unpredictable (Hyndman & Athanasopoulos, 2021). This is reflected by the increasing variance across the different realizations shown in Figure 4: The further into the future you try to predict, the more uncertainty there will be about your prediction (Hyndman & Athanasopoulos, 2021).

2 A random walk with drift

The random walk that was presented above can be extended with a constant \(\delta\), giving

\[ y_t = \delta + y_{t-1} + \epsilon_t.\] The constant \(\delta\) is known as the drift parameter. Because it is added at every occasion while it is also retained from every past occasion through the additive component \(y_{t-1}\), drift results in an upward or downward tendency depending on whether \(\delta\) is larger or smaller than zero. In this way, drift introduces a deterministic trend, in addition to the stochastic trend that characterizes a random walk.

Whether the series \(y_t\) are dominated by the deterministic trend that results from the drift, or by the stochastic trend that results from the random walk, depends on the size of \(\delta\) in comparison to the variance of the random shocks \(\epsilon_t\). You can see this illustrated in Figure 5, which shows the same series of random shocks \(\epsilon_t\) combined with different drift parameters: The darkest blue sequence at the bottom has no drift (i.e., \(\delta=0\)); the middle sequence has some drift (i.e., \(\delta=0.2\)); and the lightest blue sequence at the top has the largest drift (i.e., \(\delta=0.4\)).

Figure 5: Example of three random walks; the seuence at the bottom has no drift, the one in the middle has a drift parameter of 0.2, and the one at the top has a drift parameter of 0.4.

3 How to detect and handle a random walk

To investigate whether the process you observed is a random walk (with or without drift), you can make use of stationarity tests. Specifically, these tests can be used to determine whether the process has a unit root; you can read more about the broader class of unit root processes in the article about the class of autoregressive integrated moving-average (ARIMA) models.

If you have established with a stationarity test that your process is characterized by a unit root and you want to know whether it is a random walk or another unit root process, you should check whether the series of random shocks \(\epsilon_t\) behaves as a white noise sequence. To this end, you have to difference the data: This means that at each occasions you subtract the previous score from the current score. When you do this for a random walk with drift, you get

\[ \Delta y_t = y_t - y_{t-1} = \delta + \epsilon_t.\]

When the differenced series \(\Delta y_t\) forms a white noise sequence—meaning all its autocorrelations and partial autocorrelations are zero, and its mean and variance do not change over time—you can consider the original non-stationary series \(y_t\) a random walk (with or without drift, depending on whether \(\delta\) differs from zero or not respectively). In contrast, if the differences series \(\Delta y_t\) is not stationary yet, or if it is stationary but still characterized by non-zero autocorrelations, this implies the original series is not a random walk but another unit root process, and you may consider other members from the ARIMA family to model it.

4 Think more about

It is important to realize that there are various ways in which a series can be non-stationary. Random walks are non-stationary due to the presence of a unit root, and differencing the original series once results in a stationary series. But other forms of non-stationarity require multiple rounds of differencing, or detrending using a deterministic function of time.

The stochastic trend that characterizes a random walk is very different from that of a process containing a deterministic trend with random noise around it. While deterministic trends allow for predictions to remain similar precision also further into the future, whereas a stochastic trend implies that the undcertainty grows when trying to predict further into the future (Hyndman & Athanasopoulos, 2021; Ryan et al., 2025). The ever increasing uncertainty in forecasts from a random walk are also quite different than the uncertainty of predicitons from a stationary autoregressive moving-average (ARMA) model, which converge to the overall mean of the series with a fixed uncertainty when you predict further into the future (Hyndman & Athanasopoulos, 2021).

Accounting for a stochastic trend requires you to difference the data; it should not be handled by detrending the data; the latter is appropriate when you have a deterministic trend. You can read more about this difference, and the consequences of using the wrong approach in he article deterministic versus stochastic trends (see also Ryan et al., 2025).

While many psychological processes are characterized by some form of non-stationarity, it may not be so easy to think of a process that actually behaves like a random walk: The fact that many of our measurements are bounded by a lower and upper limit simply because of the scale that is used, is incompatible with the feature of a random walk that it can forever increase or decrease. Yet, one particular area within psychology in which the random walk with drift has been very successfully employed is in the context of two-choice decisions within the area of cognitive psychology: Specifically, the random walk with drift has been used to approximate the diffusion process in which a participant has to make a dichotomous decision, and the decision is based on the stochastic accumulation of evidence (see Ratcliff & McKoon, 2008). This use of the model is however mostly as part of a formal theory, rather than for analyzing empirical ILD that represent this process of evidence accumulation.

5 Takeaway

A random walk is fundamental example from the time series literature of a process with a stochastic trend. It implies that each observation equals the previous one plus a random shock, and that these shocks are uncorrelated over time. Because each past random shock is forever retained, a random walk process is non-stationary. When a constant is added at every occasion, the process becomes a random walk with drift. This drift introduced by the constant results in a deterministic trend, producing systematic upward or downward movements in the time series data.

A random walk, with or without drift, falls within the broader category of unit root processes, which in turn form the non-stationary part of the broader ARIMA model family. These can be characterized by more than one root, and additional dependencies in the random shocks.

If you want to study the dynamics in your data, you need to separate the long-term changes from the short-term dynamics. This implies you should determine whether there is a trend present in your data, and whether this is of a stochastic or deterministic nature, or whether both are at play. You can investigate whether there is a unit root in your process by using stationarity tests and—if necessary—differencing the data and investigating the features of the differenced series to see whether there are still signs of non-stationarity, or that there are additional short-term dynamics.

6 Further reading

We have collected various topics for you to read more about below.

Read more: When N>1
  • [Multilevel AR models]
  • [Dynamic structural equation modeling]
  • [Replicated time series analysis]
Read more: Estimation of N=1 models

References

Hamilton, J. D. (1994). Time series analysis. Princeton University Press. https://doi.org/10.2307/j.ctv14jx6sm
Hyndman, R. J., & Athanasopoulos, G. (2021). Forecasting: Principles and practice (3rd ed.). OTexts. OTexts.com/fpp3. Accessed on: October 1, 2024.
Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: Theory and data for two-choice decision tasks. Neural Computation, 20(4), 873–922. https://doi.org/10.1162/neco.2008.12-06-420
Ryan, O., Haslbeck, J. M. B., & Waldorp, L. J. (2025). Non-stationarity in time-series analysis: Modeling stochastic and deterministic trends. Multivariate Behavioral Research, 60(3), 556–588. https://doi.org/10.1080/00273171.2024.2436413

Citation

BibTeX citation:
@article{hamaker2026,
  author = {Hamaker, Ellen L. and Hoekstra, Ria H. A.},
  title = {Random Walk},
  journal = {MATILDA},
  number = {2026-01-02},
  date = {2026-01-02},
  url = {https://matilda.fss.uu.nl/articles/random-walk.html},
  langid = {en}
}
For attribution, please cite this work as:
Hamaker, E. L., & Hoekstra, R. H. A. (2026). Random walk. MATILDA, 2026-01-02. https://matilda.fss.uu.nl/articles/random-walk.html