# How does the mean function work for a Gaussian Process?

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:

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:

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:

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?