I was reading the notes on Gaussian Processes by Choung B. Do (stanford course CS229) however was unsure of how the mean function worked and what a random variable was on the Gaussian Process

So first it reminds us of what a stochastic process is:

enter image description here

Which I think makes sense to me. $x \in \mathcal{X}$ is an index set and we are indexing the random variables. So for example, if $\mathcal{X} = R$, then, $f(0)$ would be the random variable that takes some random value (maybe $f(0) = f = 6$) at time step 0. Similarly, $f(2.3)$ would be a random variable (with a distribution) at time step 2.3. I think that makes sense.

Then it goes on to define a Gaussian Process more carefully:

enter image description here

I think that also makes sense, as that is just saying how each of the random variables depend with respect to each other and $m(x_1)$, I suppose, is just the mean wrt to time step $x_1$.

Then it makes the remark that confuses me:

enter image description here

This is exactly the point that confuses me because, it says that the mean $m(x) = E[x]$. In my head, $x$ was just an element in the index set and therefore it is not random (intuitively, if we are taking samples from a stochastic processes, we get samples at a finite set of time intervals that we decide, x is not usually considered random). It is a constant. What is random is $f(x)$. So for me what would make sense is to say:

$$m(x_i) = E[ f(x_i) ]$$

that seems to be the correct statement to me. Am I wrong or is there something crucial I am misunderstanding since this discussion should be pretty basic?


1 Answer 1


Your understanding is correct. There is apparently mistake in the notes and the equations should be \begin{array} mm (x) &= E[ f(x) ], \\ k(x,x') &= E[(f(x)-m(x))(f(x')-m(x'))]. \end{array}

For reference, see Equation (2.13) in page 13 of C. E. Rasmussen & C. K. I. Williams, Gaussian Processes for Machine Learning, the MIT Press, 2006, available online.

  • $\begingroup$ I was about to point out the typo :P $\endgroup$ Commented May 6, 2015 at 15:14
  • $\begingroup$ this typo take a half hour from me!!thanks for OP and answerer. $\endgroup$ Commented Aug 13, 2015 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.