Skip to content
homeaboutworkprojectsthesiswritingresume
Loading
~/blog/second-order-processes-and-mean-square-calculus0%dark
  1. home/
  2. writing/
  3. Second-Order Processes and Mean-Square Calculus

07 June 2026 · 7 min read · updated 09 June 2026

Second-Order Processes and Mean-Square Calculus

A second-order process is a curve in the Hilbert space of square-integrable random variables, and its calculus is the geometry of that space. We treat the process through the L-squared inner product, prove mean-square continuity is equivalent to continuity of the covariance function, construct the mean-square integral and compute its mean and covariance, and identify the covariance operator of a process on a compact interval as the Mercer operator of its covariance kernel. The uncorrelatedness of the Karhunen-Loeve coefficients then falls out of the eigenstructure of that operator.

  • 5 equations
  • 9 results
  • 11 connections
  • probability
  • hilbert-space
  • stochastic-processes
On this page▾
  • Processes in L-squared
  • Mean-square continuity
  • The mean-square integral
  • The covariance operator
  • The Karhunen-Loeve coefficients

7 min left

  • Processes in L-squared1m
  • Mean-square continuity1m
  • The mean-square integral2m
  • The covariance operator2m
  • The Karhunen-Loeve coefficients2m

A process whose values are square-integrable is a curve in the Hilbert space L2L^2L2 of random variables, and the analytic operations on it (continuity, integration, expansion) are the geometric operations of that space read along the curve. This mean-square calculus is what makes the covariance function an operator and the Karhunen-Loeve expansion a spectral decomposition. This post develops it on the probability space of the track, treating the inner product ⟨X,Y⟩=E[XY]\ip XY=\E[XY]⟨X,Y⟩=E[XY] as the geometry [1]. Write L2=L2(Ω,F,P)L^2=L^2(\Omega,\mathcal F,\P)L2=L2(Ω,F,P).

#Processes in L-squared

Definition1

A second-order process (Xt)t∈T(X_t)_{t\in T}(Xt​)t∈T​ is a family of random variables with E[Xt2]<∞\E[X_t^2]<\inftyE[Xt2​]<∞ for every ttt, so each Xt∈L2X_t\in L^2Xt​∈L2. Its mean function is m(t)=E[Xt]m(t)=\E[X_t]m(t)=E[Xt​] and its covariance function is K(s,t)=Cov⁡(Xs,Xt)=⟨Xs−m(s),Xt−m(t)⟩K(s,t)=\Cov(X_s,X_t)=\ip{X_s-m(s)}{X_t-m(t)}K(s,t)=Cov(Xs​,Xt​)=⟨Xs​−m(s),Xt​−m(t)⟩.

The Cauchy-Schwarz inequality bounds ∣K(s,t)∣≤K(s,s)K(t,t)\abs{K(s,t)}\le\sqrt{K(s,s)K(t,t)}∣K(s,t)∣≤K(s,s)K(t,t)​, and the length of an increment is

E[(Xt−Xs)2]=K(t,t)+K(s,s)−2K(s,t)+(m(t)−m(s))2,(1)\E\big[(X_t-X_s)^2\big]=K(t,t)+K(s,s)-2K(s,t)+\big(m(t)-m(s)\big)^2, \tag{1}E[(Xt​−Xs​)2]=K(t,t)+K(s,s)−2K(s,t)+(m(t)−m(s))2,(1)

read off by expanding the square. Continuity, integrability, and differentiability of the process are all statements about this increment, hence about the covariance.

#Mean-square continuity

A process converges in mean square to XXX, written Xt→XX_t\to XXt​→X, when E[(Xt−X)2]→0\E[(X_t-X)^2]\to 0E[(Xt​−X)2]→0, that is when Xt→XX_t\to XXt​→X in the norm of L2L^2L2. It is mean-square continuous at t0t_0t0​ when Xt→Xt0X_t\to X_{t_0}Xt​→Xt0​​ as t→t0t\to t_0t→t0​.

Theorem2

A second-order process with continuous mean function is mean-square continuous at every point if and only if its covariance function KKK is continuous on T×TT\times TT×T.

Proof

Suppose KKK is continuous and mmm is continuous. By Equation (1), as t→t0t\to t_0t→t0​ the right side tends to K(t0,t0)+K(t0,t0)−2K(t0,t0)+0=0K(t_0,t_0)+K(t_0,t_0)-2K(t_0,t_0)+0=0K(t0​,t0​)+K(t0​,t0​)−2K(t0​,t0​)+0=0, so E[(Xt−Xt0)2]→0\E[(X_t-X_{t_0})^2]\to 0E[(Xt​−Xt0​​)2]→0 and the process is mean-square continuous. Conversely, suppose the process is mean-square continuous everywhere. Then the centred variables Yt=Xt−m(t)Y_t=X_t-m(t)Yt​=Xt​−m(t) form a mean-square continuous curve, since mmm is continuous, and the inner product is continuous on L2L^2L2, so (s,t)↦⟨Ys,Yt⟩=K(s,t)(s,t)\mapsto\ip{Y_s}{Y_t} =K(s,t)(s,t)↦⟨Ys​,Yt​⟩=K(s,t) is continuous as a composition of the continuous map (s,t)↦(Ys,Yt)(s,t)\mapsto(Y_s,Y_t)(s,t)↦(Ys​,Yt​) with the continuous inner product. Thus mean-square continuity forces KKK continuous.

So a process on an interval has a continuous covariance exactly when it is mean-square continuous, the hypothesis under which the covariance becomes a Mercer kernel.

#The mean-square integral

Integrating a process over time is taking the limit of Riemann sums in L2L^2L2. Completeness of L2L^2L2 makes the limit exist whenever the covariance is integrable.

Theorem3

Let (Xt)t∈[a,b](X_t)_{t\in[a,b]}(Xt​)t∈[a,b]​ be mean-square continuous. The Riemann sums ∑iXti(ti+1−ti)\sum_i X_{t_i}(t_{i+1}-t_i)∑i​Xti​​(ti+1​−ti​) converge in mean square as the mesh tends to 000 to a limit ∫abXt dt∈L2\int_a^b X_t\,dt\in L^2∫ab​Xt​dt∈L2, with

E[∫abXt dt]=∫abm(t) dt,Var⁡(∫abXt dt)=∫ab ⁣ ⁣∫abK(s,t) ds dt.(2)\E\Big[\int_a^b X_t\,dt\Big]=\int_a^b m(t)\,dt,\qquad \Var\Big(\int_a^b X_t\,dt\Big)=\int_a^b\!\!\int_a^b K(s,t)\,ds\,dt. \tag{2}E[∫ab​Xt​dt]=∫ab​m(t)dt,Var(∫ab​Xt​dt)=∫ab​∫ab​K(s,t)dsdt.(2)
Proof

Mean-square continuity makes mmm continuous, since ∣m(t)−m(t0)∣=∣E[Xt−Xt0]∣≤∥Xt−Xt0∥L2→0\abs{m(t)-m(t_0)}=\abs{\E[X_t-X_{t_0}]}\le\norm{X_t-X_{t_0}}_{L^2}\to 0∣m(t)−m(t0​)∣=∣E[Xt​−Xt0​​]∣≤∥Xt​−Xt0​​∥L2​→0 as the expectation is a bounded linear functional of norm one, and then KKK is continuous by the converse half of Theorem 2, so g(s,t)=⟨Xs,Xt⟩=K(s,t)+m(s)m(t)g(s,t)=\ip{X_s}{X_t}=K(s,t)+m(s)m(t)g(s,t)=⟨Xs​,Xt​⟩=K(s,t)+m(s)m(t) is continuous. For two partitions, the inner product of their Riemann sums is the double sum ∑i,j⟨Xsi,Xtj⟩ΔsiΔtj\sum_{i,j}\ip{X_{s_i}}{X_{t_j}}\Delta s_i\Delta t_j∑i,j​⟨Xsi​​,Xtj​​⟩Δsi​Δtj​, a Riemann sum for ∫ ⁣ ⁣∫g(s,t) ds dt=∫ ⁣ ⁣∫(K(s,t)+m(s)m(t)) ds dt=:I\int\!\!\int g(s,t)\,ds\,dt =\int\!\!\int(K(s,t)+m(s)m(t))\,ds\,dt=:I∫∫g(s,t)dsdt=∫∫(K(s,t)+m(s)m(t))dsdt=:I. Since ggg is continuous on the compact square [a,b]2[a,b]^2[a,b]2 it is uniformly continuous there, so any tagged Riemann sums of ggg with mesh tending to 000, including those with the mixed tags (si,tj)(s_i,t_j)(si​,tj​), converge to III. The polarisation ∥Sπ−Sπ′∥2=⟨Sπ,Sπ⟩−2⟨Sπ,Sπ′⟩+⟨Sπ′,Sπ′⟩→I−2I+I=0\norm{S_\pi-S_{\pi'}}^2=\ip{S_\pi}{S_\pi}-2\ip{S_\pi}{S_{\pi'}}+\ip{S_{\pi'}}{S_{\pi'}}\to I-2I+I=0∥Sπ​−Sπ′​∥2=⟨Sπ​,Sπ​⟩−2⟨Sπ​,Sπ′​⟩+⟨Sπ′​,Sπ′​⟩→I−2I+I=0 then shows every two sequences of Riemann sums with mesh tending to 000 are Cauchy and share a limit, by completeness of L2L^2L2. The mean identity is continuity of the expectation, a bounded linear functional on L2L^2L2. The inner product of the limit with itself is the second moment ⟨I,I⟩=∫ ⁣ ⁣∫(K+mm)\ip II=\int\!\!\int(K+m m)⟨I,I⟩=∫∫(K+mm); subtracting the squared mean (∫m)2=∫ ⁣ ⁣∫m(s)m(t) ds dt\big(\int m\big)^2=\int\!\!\int m(s)m(t)\,ds\,dt(∫m)2=∫∫m(s)m(t)dsdt leaves the variance identity Var⁡(∫X)=∫ ⁣ ⁣∫K(s,t) ds dt\Var\big(\int X\big)=\int\!\!\int K(s,t)\,ds\,dtVar(∫X)=∫∫K(s,t)dsdt.

#The covariance operator

On a compact interval the covariance function acts as an integral operator, and that operator is exactly the Mercer operator of the previous track.

Theorem4

Let (Xt)t∈[a,b](X_t)_{t\in[a,b]}(Xt​)t∈[a,b]​ be mean-square continuous with continuous covariance KKK. The covariance operator

(TKf)(s)=∫abK(s,t)f(t) dt,f∈L2([a,b]),(3)(T_K f)(s)=\int_a^b K(s,t)f(t)\,dt,\qquad f\in L^2([a,b]), \tag{3}(TK​f)(s)=∫ab​K(s,t)f(t)dt,f∈L2([a,b]),(3)

is compact, self-adjoint, and positive, with ⟨TKf,f⟩=Var⁡(∫abf(t)Yt dt)≥0\ip{T_K f}{f}=\Var\big(\int_a^b f(t)Y_t\,dt\big)\ge 0⟨TK​f,f⟩=Var(∫ab​f(t)Yt​dt)≥0 where Yt=Xt−m(t)Y_t=X_t-m(t)Yt​=Xt​−m(t).

Proof

The kernel KKK is continuous and symmetric on the compact square, so by the Mercer setup TKT_KTK​ is compact and self-adjoint. For positivity, take first a continuous fff. Then t↦f(t)Ytt\mapsto f(t)Y_tt↦f(t)Yt​ is mean-square continuous, so the integral Zf=∫abf(t)Yt dtZ_f=\int_a^b f(t)Y_t\,dtZf​=∫ab​f(t)Yt​dt exists by Theorem 3, and its variance is, by Equation (2) applied to that process with covariance f(s)K(s,t)f(t)f(s)K(s,t)f(t)f(s)K(s,t)f(t),

Var⁡(Zf)=∫ab ⁣ ⁣∫abf(s)K(s,t)f(t) ds dt=⟨TKf,f⟩.(4)\Var(Z_f)=\int_a^b\!\!\int_a^b f(s)K(s,t)f(t)\,ds\,dt=\ip{T_K f}{f}. \tag{4}Var(Zf​)=∫ab​∫ab​f(s)K(s,t)f(t)dsdt=⟨TK​f,f⟩.(4)

A variance is nonnegative, so ⟨TKf,f⟩≥0\ip{T_K f}{f}\ge 0⟨TK​f,f⟩≥0 for every continuous fff. The quadratic form f↦⟨TKf,f⟩f\mapsto \ip{T_K f}{f}f↦⟨TK​f,f⟩ is continuous on L2L^2L2, since ∣⟨TKf,f⟩−⟨TKg,g⟩∣≤∥TK∥(∥f∥+∥g∥)∥f−g∥\abs{\ip{T_K f}{f}-\ip{T_K g}{g}}\le\norm{T_K}(\norm f+\norm g)\norm{f-g}∣⟨TK​f,f⟩−⟨TK​g,g⟩∣≤∥TK​∥(∥f∥+∥g∥)∥f−g∥ by boundedness of TKT_KTK​, and the continuous functions are dense in L2([a,b])L^2([a,b])L2([a,b]), so nonnegativity passes to the closure and ⟨TKf,f⟩≥0\ip{T_K f}{f}\ge 0⟨TK​f,f⟩≥0 for all f∈L2f\in L^2f∈L2, making TKT_KTK​ positive.

The positivity that was an abstract hypothesis in Mercer's theorem is here a tautology, since the quadratic form of the covariance operator is the variance of a linear functional of the process. The spectral theorem therefore gives eigenvalues λn≥0\lambda_n\ge 0λn​≥0 tending to 000 and continuous orthonormal eigenfunctions φn\varphi_nφn​ with TKφn=λnφnT_K\varphi_n=\lambda_n\varphi_nTK​φn​=λn​φn​.

#The Karhunen-Loeve coefficients

The eigenfunctions of the covariance operator project the process onto uncorrelated coordinates, a one-line consequence of the eigenrelation and the content of the Karhunen-Loeve expansion.

Proposition5

For λn>0\lambda_n>0λn​>0 define the coefficient ξn=1λn∫abYtφn(t) dt\xi_n=\dfrac{1}{\sqrt{\lambda_n}}\displaystyle\int_a^b Y_t \varphi_n(t)\,dtξn​=λn​​1​∫ab​Yt​φn​(t)dt. Then E[ξn]=0\E[\xi_n]=0E[ξn​]=0 and E[ξnξm]=δnm\E[\xi_n\xi_m]=\delta_{nm}E[ξn​ξm​]=δnm​.

Proof

Each ξn\xi_nξn​ is a mean-square integral of the centred process, so E[ξn]=1λn∫E[Yt]φn(t) dt=0\E[\xi_n]=\frac{1}{\sqrt{\lambda_n}}\int \E[Y_t]\varphi_n(t)\,dt=0E[ξn​]=λn​​1​∫E[Yt​]φn​(t)dt=0. For the cross moment, write Zn=∫abYsφn(s) dsZ_n=\int_a^b Y_s\varphi_n(s)\,dsZn​=∫ab​Ys​φn​(s)ds as the L2L^2L2 limit of Riemann sums; joint continuity of the inner product gives the polarisation of Equation (2), E[ZnZm]=⟨Zn,Zm⟩=lim⁡∑i,jφn(si)φm(tj)⟨Ysi,Ytj⟩ΔsiΔtj=∫ ⁣ ⁣∫φn(s)K(s,t)φm(t) ds dt\E[Z_nZ_m]=\ip{Z_n}{Z_m}=\lim\sum_{i,j}\varphi_n(s_i)\varphi_m(t_j)\ip{Y_{s_i}}{Y_{t_j}}\Delta s_i\Delta t_j=\int\!\!\int\varphi_n(s)K(s,t)\varphi_m(t)\,ds\,dtE[Zn​Zm​]=⟨Zn​,Zm​⟩=lim∑i,j​φn​(si​)φm​(tj​)⟨Ysi​​,Ytj​​⟩Δsi​Δtj​=∫∫φn​(s)K(s,t)φm​(t)dsdt, the integrand being continuous. Hence

E[ξnξm]=1λnλm∫ab ⁣ ⁣∫abφn(s)K(s,t)φm(t) ds dt=1λnλm∫abφn(s)(TKφm)(s) ds.(5)\E[\xi_n\xi_m]=\frac{1}{\sqrt{\lambda_n\lambda_m}}\int_a^b\!\!\int_a^b\varphi_n(s)K(s,t)\varphi_m(t)\,ds\,dt =\frac{1}{\sqrt{\lambda_n\lambda_m}}\int_a^b\varphi_n(s)(T_K\varphi_m)(s)\,ds. \tag{5}E[ξn​ξm​]=λn​λm​​1​∫ab​∫ab​φn​(s)K(s,t)φm​(t)dsdt=λn​λm​​1​∫ab​φn​(s)(TK​φm​)(s)ds.(5)

Since TKφm=λmφmT_K\varphi_m=\lambda_m\varphi_mTK​φm​=λm​φm​ and the eigenfunctions are orthonormal, the right side is λmλnλm∫φnφm=λmλnλmδnm=δnm\frac{\lambda_m}{\sqrt{\lambda_n\lambda_m}}\int\varphi_n\varphi_m=\frac{\lambda_m}{\sqrt{\lambda_n\lambda_m}} \delta_{nm}=\delta_{nm}λn​λm​​λm​​∫φn​φm​=λn​λm​​λm​​δnm​=δnm​.

The expansion Xt=m(t)+∑nλn ξnφn(t)X_t=m(t)+\sum_n\sqrt{\lambda_n}\,\xi_n\varphi_n(t)Xt​=m(t)+∑n​λn​​ξn​φn​(t) now assembles from these pieces. By the uncorrelatedness of Proposition 5 a partial-sum increment ∑N<k≤Mλk ξkφk(t)\sum_{N<k\le M}\sqrt{\lambda_k}\,\xi_k\varphi_k(t)∑N<k≤M​λk​​ξk​φk​(t) has variance ∑N<k≤Mλkφk(t)2\sum_{N<k\le M}\lambda_k\varphi_k(t)^2∑N<k≤M​λk​φk​(t)2, so its partial sums are L2L^2L2-Cauchy and converge in mean square uniformly in ttt, the truncation error having variance ∑k>Nλkφk(t)2\sum_{k>N}\lambda_k\varphi_k(t)^2∑k>N​λk​φk​(t)2, which is the Mercer tail of K(t,t)K(t,t)K(t,t) and vanishes uniformly by Mercer's theorem. The result is the Karhunen-Loeve expansion, the representation of a second-order process as a series of deterministic modes φn\varphi_nφn​ with uncorrelated random amplitudes, the eigenvalues their variances. When the process is Gaussian the uncorrelated coefficients are independent by the Gaussian equivalence, so the expansion resolves a Gaussian process into independent one-dimensional Gaussians, the form in which Brownian motion is constructed in the next post.

[1]
O. Kallenberg, Foundations of Modern Probability, 3rd ed. Springer, 2021.

Part 7 of 9 in Probability

← previousConditional Expectationnext →The Karhunen-Loeve Expansion

Explore connections

see in the atlas →

related

  • Gaussian Vectors and Processes
  • The Construction of Brownian Motion
  • Independence
cite
@misc{second-order-processes-and-mean-square-calculus,
  author = {Zac Kienzle},
  title  = {Second-Order Processes and Mean-Square Calculus},
  year   = {2026},
  month  = {06},
  url    = {https://zackienzle.com/blog/second-order-processes-and-mean-square-calculus}
}