# Can a Stochastic Process be Integrated?

Consider a Cox Process (https://faculty.washington.edu/jonno/SISMIDmaterial/4-LGCPs.pdf):

$$N(T) \mid \{Z(t) = z(t)\} \sim \text{Poisson} \left( \int_0^T z(t) \, dt \right)$$

Here:

• The rate function $$\lambda(t)$$ is a stochastic process that follows a Gaussian distribution
• $$z(t)$$ is a realization of the Gaussian process $$Z(t)$$
• $$N(T)$$ is the number of events that have occurred by time $$T$$
• The rate at which these events occur is given by $$z(t)$$.

Conceptually, I am trying to understand what this integral means and how to write it. That is, how do we integrate a Gaussian Process?

For example, I know that these are the main formulas for a Gaussian Process:

$$f(x) \sim GP(m(x), k(x, x'))$$

$$\begin{bmatrix} f(x_1) \\ \vdots \\ f(x_m) \end{bmatrix} \sim \mathcal{N}\left(\begin{bmatrix} m(x_1) \\ \vdots \\ m(x_m) \end{bmatrix}, \begin{bmatrix} k(x_1, x_1) & \cdots & k(x_1, x_m) \\ \vdots & \ddots & \vdots \\ k(x_m, x_1) & \cdots & k(x_m, x_m) \end{bmatrix}\right)$$

Therefore, would the integral

$$\int_0^T z(t) \ dt$$

refer to integrating a function of a Multivariate Normal Distribution

$$\mathcal{N}\left(\begin{bmatrix} m(x_1) \\ \vdots \\ m(x_m) \end{bmatrix}, \begin{bmatrix} k(x_1, x_1) & \cdots & k(x_1, x_m) \\ \vdots & \ddots & \vdots \\ k(x_m, x_1) & \cdots & k(x_m, x_m) \end{bmatrix}\right)$$

over the range ($$0$$,$$T$$)?

In equation form, can someone please show me how to correctly write the integral of a Gaussian Process in full equation form? I am not so much interested in understanding how to solve the integral of a Gaussian Process - but rather how to even write the integral of a Gaussian Process.

• $$Z(t)$$ at times $$t_1, t_2, ..., t_k$$ as $$\mathbf{Z} = [Z(t_1), Z(t_2), ..., Z(t_k)]^T$$.
• The mean vector is $$\boldsymbol\mu = [m(t_1), m(t_2), ..., m(t_k)]^T$$
• the covariance matrix is $$\boldsymbol\Sigma$$, where $$\Sigma_{ij} = k(t_i, t_j)$$.

So we re-write the Gaussian Process as a Gaussian Distribution:

$$f_{\mathbf Z}(z_1,\ldots,z_k) = \frac{\exp\left(-\frac 1 2 \left({\mathbf z} - {\boldsymbol\mu}\right)^\mathrm{T}{\boldsymbol\Sigma}^{-1}\left({\mathbf z}-{\boldsymbol\mu}\right)\right)}{\sqrt{(2\pi)^k |\boldsymbol\Sigma|}}$$

And then integrate this?

• OP here, I think I just realized something. I think a Gaussian Process does not have a deterministic form. technically, its impossible to write the complete formula/equation for a Gaussian Process. All we can do is simulate points from a Gaussian Process using the multivariate Gaussian Distribution . Is this correct? Commented May 23 at 5:15

You are mixing up with the notion of "distribution" and "random variable".

For example, in 1D, a gaussian distribution $$\mathcal{N}(\mu, \sigma^2)$$ is the information as to how each value is likely to occur, and it can be thought of as an "ideal histogram". On the other hand, when we sample values $$x_1, x_2, \ldots$$ from $$\mathcal{N}(\mu, \sigma^2)$$, then each $$x_i$$ is more or less a single real value.

Likewise, the distribution of a gaussian process $$\text{GP}(m(t), K(t, t'))$$ is simply a distribution over a space of paths that dictates how each path is likely to occur. And when we sample a path $$z(t)$$ from this distribution, what you have is merely a function of time $$t$$. If $$m(\cdot)$$ and $$K(\cdot, \cdot)$$ are sufficiently nice, then the resulting samples $$z(t)$$ will also gain enough reguarlity (such as continuity) so that the integral $$\int_{0}^{T} z(t) \, \mathrm{d}t$$ makes sense.

As a concrete example, consider the Ornstein-Uhlenbeck process. In it simplest form, this is a gaussian process with zero mean and exponentially decaying covaraince:

$$\text{GP}(m(t) = 0, K(t, t') = e^{-|t - t'|}).$$

(If you have some background in stochastic processes, this process can also be realized as the stationary solution the SDE of the form $$\mathrm{d}x(t) = -x(t) \, \mathrm{d}t + \sqrt{2}\,\mathrm{d}w(t)$$ for a standard Wiener process $$w(t)$$.) Hence, for each given time points $$t_1, t_2, \ldots, t_m$$, the random vector $$(x(t_1), x(t_2), \ldots, x(t_m))$$ is multivariate with

$$\begin{bmatrix} x(t_1) \\ x(t_2) \\ \vdots \\ x(t_m) \end{bmatrix} \sim \mathcal{N} \left( \mathbf{0}, \begin{bmatrix} 1 & e^{-|t_2 - t_1|} & \cdots & e^{-|t_m - t_1|} \\ e^{-|t_2 - t_1|} & 1 & \cdots & e^{-|t_m - t_2|} \\ \vdots & \vdots & \ddots & \vdots \\ e^{-|t_1 - t_m|} & e^{-|t_2 - t_m|} & \cdots & 1 \end{bmatrix} \right)$$

On the other hand, below demonstrates 5 sample paths $$x(t)$$ from this process:

Now, if we draw many such sample paths, each transparent enough so that the points where many path crosses are more densely colored, we get something likes

Its section at each time $$t$$ has the standard gaussian distribution, and its joint sections at times $$t_1, t_2, \ldots, t_m$$ will have the multivariate gaussian distribution described as above.

In this sense, you are mixing up the two notions, "distribution of sections" and "sample paths", which are kind of "orthogonal" ways to study a random process. (One concerns the "sample-space direction", whereas the other concerns the temporal direction.) To paint a complete picture, you have to look at both dimensions jointly.

• @ Sangchul Lee: Thank you for your answer! I just realized: I think a Gaussian Process does not have a deterministic form. technically (unlike Gaussian Distribtn), its impossible to write the complete formula/equation for a Gaussian Process. All we can do is simulate points from a Gaussian Process using the multivariate Gaussian Distribution . Therefore, the integral of a Gaussian Process can not be treated as a single integral .... but rather, as the averaged integral for the infinite set of all random paths from the corresponding Gaussian Distribution. Is this correct? Commented May 23 at 5:23
• @wulasa, It is true that we don't have a deterministic formula for sample paths of a gaussian process. However, despite the lack of a concrete formula, each sample path is merely a function of time $t$ (see the figure above, for example), so it can be integrated, resulting a single integral. Of course, different sample paths yield different integral values, so it is more appropriate to say that "we can integrate gaussian process in time to obtain a random variable". Since the integral is again a random quantity (a quantity depending on sampling), we can of course talk about its expectation. Commented May 23 at 5:55
• thank you! just some clarification questions: Commented May 23 at 13:33
• 1) In the answer you provided, [x(t1), x(t2), ...x(tn)] : This is a one dimensional Gaussian Process, correct? (i.e. a Gaussian Process made from a single random random variable) Commented May 23 at 13:34
• 2) Suppose I numerically integrated many simulated paths from a Gaussian Process and then took the average of these integrals: The integral of a Gaussian Process over the range (0,T) would represent the average displacement of the Gaussian Process over this range - is this interpretation correct? Commented May 23 at 13:36