Chapter 02

Stochastic Processes

The language of uncertain signals: stochastic processes, their mean and autocovariance, weak vs strong stationarity, the Toeplitz condition that makes a covariance valid, white noise, and Wold's decomposition — everything the exam's first problem is built on.

Reading: ~32 min Interactive: 1 widgets Source: Polimi MIDA1 2025/26 — Lecture 3 (Stochastic processes) · Polimi MIDA1 2025/26 — Appendix A (Probability reminders)

01 · Definitions

Processes and their first two moments

A stochastic process is an infinite sequence of random variables — one signal per outcome of a single random experiment. We never know it exactly, only its statistics, and two of them carry almost everything we need.

Formally a discrete-time process is v(t)=ϕ(s,t)v(t) = \phi(s, t), where ss is the outcome of a random experiment and tt the time index. Fix the outcome ss and you get one ordinary signal — a realization. Fix the time tt and you get a random variable. A full probabilistic description would assign a joint distribution to every finite collection of samples — infinitely many functions. We almost always work instead with the first- and second-order characteristics:

Mean & covariance

μ(t)=E[v(t)],γ(t1,t2)=E[(v(t1)μ(t1))(v(t2)μ(t2))].\mu(t) = \mathbb{E}[v(t)], \qquad \gamma(t_1,t_2) = \mathbb{E}\big[(v(t_1)-\mu(t_1))(v(t_2)-\mu(t_2))\big].

The mean is the value the signal fluctuates around; the autocovariance measures how the process at two different times moves together. Setting t1=t2=tt_1=t_2=t recovers the variance γ(t,t)=Var[v(t)]0\gamma(t,t)=\mathrm{Var}[v(t)]\ge 0. Two normalised cousins appear constantly: the autocorrelation γ~(t1,t2)=E[v(t1)v(t2)]=γ(t1,t2)+μ(t1)μ(t2)\tilde\gamma(t_1,t_2)=\mathbb{E}[v(t_1)v(t_2)]=\gamma(t_1,t_2)+\mu(t_1)\mu(t_2) (equal to γ\gamma when the mean is zero), and the Pearson correlation coefficient ρ=γ(t1,t2)/γ(t1,t1)γ(t2,t2)\rho = \gamma(t_1,t_2)/\sqrt{\gamma(t_1,t_1)\gamma(t_2,t_2)}, which lives in [1,1][-1,1] by Cauchy–Schwarz.

Q

This is the exam's first problem

On every recent structured MIDA1 paper, Problem 1 is “Mean, covariance and spectrum”: you are handed a system that filters white noise and asked — is the output stationary? compute μ\mu, γ(0)\gamma(0), a lag-covariance γ(τ)\gamma(\tau), and the spectrum at one frequency. It is pure, boxed-answer computation. Graders want the number and a one-line justification of stationarity. Master the mechanics in this chapter and the spectrum piece in Chapter 4, and you own eight points.

02 · Core

Stationarity: weak vs strong

Almost everything simplifies if the process’s statistics do not drift over time. A process is strongly stationary if all its joint distributions are invariant to a time shift — a complete but unusable description. The workable version keeps only the first two moments:

Weak (wide-sense) stationarity

A process is weakly stationary if (i) the mean is constant, μ(t)=μ\mu(t)=\mu; (ii) the variance is constant; and (iii) the autocovariance depends only on the lag τ=t2t1\tau = t_2 - t_1, so we write γ(τ)\gamma(\tau). A Gaussian weakly-stationary process is automatically strongly stationary.

A weakly stationary process is completely characterised by a number (its mean) and a function of one variable (its covariance γ(τ)\gamma(\tau)) — two processes with the same pair are “equivalent”. And if the process is ergodic, its statistics can be recovered from a single realization: the sample average converges to the expected value, 1Nt=1Nv(t)E[v]\frac1N\sum_{t=1}^N v(t) \to \mathbb{E}[v]. That is what lets us estimate anything from one recorded signal.

Exam-format worked example Is y(t) stationary, and what are its statistics?

The setup

Let x(t)=ax(t1)+e(t)x(t) = a\,x(t-1) + e(t) with e()WN(me,λe2)e(\cdot)\sim\mathrm{WN}(m_e,\lambda_e^2) and a<1|a|<1, and let y(t)=x(t)+η(t)y(t) = x(t) + \eta(t) with η()WN(0,λη2)\eta(\cdot)\sim\mathrm{WN}(0,\lambda_\eta^2) independent of ee. This is the shape of every Problem-1 process. Take a=12a=\tfrac12, me=0m_e=0, λe2=1\lambda_e^2=1, λη2=3\lambda_\eta^2=3.

Stationarity

xx is an AR(1) with pole a=12a=\tfrac12 inside the unit circle, hence a stable filter driven by white noise — stationary. yy is the sum of two stationary, independent processes, so yy is stationary. Always argue it this way: stable-filter-of-white-noise + independent-stationary = stationary.

Mean

Take expectations of the state equation: μx=aμx+meμx=me/(1a)=0\mu_x = a\,\mu_x + m_e \Rightarrow \mu_x = m_e/(1-a) = 0. Then μy=μx+E[η]=0\mu_y = \mu_x + \mathbb{E}[\eta] = 0.

Variance of x

Square the AR(1) equation and use E[x(t1)e(t)]=0\mathbb{E}[x(t-1)e(t)]=0: γx(0)=a2γx(0)+λe2\gamma_x(0)=a^2\gamma_x(0)+\lambda_e^2, so γx(0)=λe21a2=111/4=43\gamma_x(0)=\dfrac{\lambda_e^2}{1-a^2}=\dfrac{1}{1-1/4}=\dfrac43. (This is the Yule–Walker variance of Chapter 3.)

Lag-1 covariance of y

For τ0\tau\ne 0 the independent white η\eta drops out, so γy(1)=γx(1)=aγx(0)=1243=23\gamma_y(1)=\gamma_x(1)=a\,\gamma_x(0) =\tfrac12\cdot\tfrac43=\dfrac23. The measurement noise η\eta only ever touches γy(0)\gamma_y(0).

Now do one yourself — the July 2026 Problem 1, with an AR(1) that has a non-zero-mean noise (watch the mean feed μ\mu while the variance feeds γx(0)\gamma_x(0)):

2026-07-q12026Q01Mean, covariance & spectrummedium8 pts
Consider the stochastic process generated by the system $S$: $$x(t)=\tfrac13 x(t-1)+e(t),\qquad y(t)=x(t)+x(t-1)+\eta(t)$$ with $e(\cdot)\sim\mathrm{WN}(2,2)$, $\eta(\cdot)\sim\mathrm{WN}(-1,1)$, and $e\perp\eta$. (a) Is $y(t)$ stationary? (b) Compute $E[y(t)]$. (c) Compute $\gamma_x(0)$. (d) Compute $\gamma_y(1)$. (e) Compute the power spectral density $\Gamma_y(\omega)$ at $\omega=\pi$.

03 · Property

What makes a valid covariance

The autocovariance of a stationary process is not an arbitrary function. Three properties hold, and the third is deeper than it looks:

Non-negative variance

γ(0)=Var[v(t)]0\gamma(0)=\mathrm{Var}[v(t)]\ge 0 — the covariance at lag zero is the variance.

Bounded & even

γ(τ)γ(0)\lvert\gamma(\tau)\rvert \le \gamma(0) (Cauchy–Schwarz — a signal is most correlated with itself) and γ(τ)=γ(τ)\gamma(\tau)=\gamma(-\tau) (an even function).

Toeplitz PSD

The Toeplitz matrix built from γ(0),γ(1),\gamma(0),\gamma(1),\dots must be positive semi-definite for every size NN.

×

A plausible-looking γ(τ) can still be illegal

The first two properties are necessary but not sufficient. An even, bounded sequence is a genuine covariance function iff its Toeplitz matrix is positive semi-definite for all NN. Exam traps ask “can this be the covariance of a stationary process?” — a sequence can pass the eyeball test and still fail because a 3×33\times3 (or larger) Toeplitz minor goes negative.

Proof Why the Toeplitz matrix must be PSD

Stack NN centred samples into a vector V=[v(0)μ, , v(N1)μ]V = [\,v(0)-\mu,\ \dots,\ v(N-1)-\mu\,]^\top. Its covariance matrix is E[VV]\mathbb{E}[VV^\top], whose (i,j)(i,j) entry is γ(ij)\gamma(i-j) — exactly the Toeplitz matrix of the covariance sequence. Any covariance matrix is positive semi-definite (for any vector cc, cE[VV]c=E[(cV)2]0c^\top \mathbb{E}[VV^\top] c = \mathbb{E}[(c^\top V)^2]\ge 0 — it is the variance of a scalar random variable). Since this must hold for every window length NN, the whole family of Toeplitz matrices is PSD. That is why “is this a valid γ\gamma?” reduces to a definiteness check.

04 · Building block

White noise: the atom

White noise is the simplest stationary process and the building block of every model to come. It is a sequence of independent, identically distributed variables:

White noise

E[v(t)]=0,γ(τ)={λ2τ=00τ0,v()WN(0,λ2).\mathbb{E}[v(t)] = 0, \qquad \gamma(\tau) = \begin{cases}\lambda^2 & \tau = 0\\ 0 & \tau \ne 0\end{cases}, \qquad v(\cdot)\sim\mathrm{WN}(0,\lambda^2).

Because γ(τ)=0\gamma(\tau)=0 for every τ0\tau\ne0, knowing the past tells you nothing about the future: white noise is completely unpredictable. If the distribution is Gaussian we write WGN(0,λ2)\mathrm{WGN}(0,\lambda^2). This is the same white noise as Chapter 1’s optimal residual — the two ideas are the same object seen from two directions.

05 · Structure

Wold’s decomposition

How can an arbitrary stationary process be built from white noise? Wold’s theorem says any stationary process splits into two uncorrelated pieces:

White noise no memory · flat spectrum e(t) ~ WN(0, λ²) ρ(1) = -0.01 · 20/39 sign flips Γ_e(ω) 0 π W(z) all the structure the only thing to identify a gain here reshapes the whole spectrum A stationary process memory · shaped spectrum v(t) = W(z)e(t) ρ(1) = 0.86 · 4/39 sign flips Γ_v(ω) = |W|²Γ_e(ω) 0 π
Wold

v(t)=v~(t)+v^(t),v(t) = \tilde v(t) + \hat v(t),

where v~\tilde v is purely deterministic — knowing its past predicts its entire future exactly (e.g. a constant, an alternating ±\pm sequence, or a sinusoid vˉcos(ω0t+θ)\bar v\cos(\omega_0 t + \theta)) — and v^\hat v is purely non-deterministic: everything you cannot pin down from the past. The crucial fact is that the non-deterministic part is a convolution of white noise,

v^(t)=k0w(k)η(tk)=W(z)η(t),W(z)=k0w(k)zk,\hat v(t) = \sum_{k\ge 0} w(k)\,\eta(t-k) = W(z)\,\eta(t),\qquad W(z) = \sum_{k\ge 0} w(k)z^{-k},

i.e. the output of a dynamical filter driven by white noise. That is precisely the object the next chapter parameterises as MA, AR and ARMA models. Because a non-zero mean is just a purely deterministic constant component (predicted exactly), we lose nothing by developing the theory for zero-mean processes, where autocovariance and autocorrelation coincide.

key

Why Wold matters

Wold turns “model a stationary signal” into “find the filter W(z)W(z) that colours white noise into it”. Prediction (Chapter 5) and identification (Chapters 6–7) are both about recovering that filter — and the residual left after the best filter is, once more, white noise.

A zero-mean stationary process has γ(0)=2, γ(1)=3. Can this be a valid autocovariance function?

Load-bearing ideas

  • A stochastic process is summarised by its mean μ\mu and autocovariance γ(τ)\gamma(\tau); the Pearson coefficient normalises correlation into [1,1][-1,1].
  • Weak stationarity = constant mean and variance + covariance depending only on the lag τ\tau. Ergodicity lets you estimate the statistics from one realization.
  • γ\gamma is even, bounded by γ(0)\gamma(0), and — the deep condition — has a positive semi-definite Toeplitz matrix; that is what makes a candidate γ\gamma a legal covariance.
  • White noise WN(0,λ2)\mathrm{WN}(0,\lambda^2) has γ(τ)=0\gamma(\tau)=0 for τ0\tau\ne0 and is completely unpredictable.
  • Wold: every stationary process = a purely deterministic part + white noise pushed through a filter W(z)W(z). Modelling and prediction are about recovering that filter.

Exam radar. Re-derive the StepThrough cold before the exam: given x=ax(t1)+ex=ax(t-1)+e, y=x+ηy=x+\eta, produce stationarity + μy\mu_y + γx(0)\gamma_x(0) + γy(1)\gamma_y(1). Keep the γ(τ)γ(0)\lvert\gamma(\tau)\rvert\le\gamma(0) validity trap in mind, and remember independent measurement noise touches only γy(0)\gamma_y(0).