How is the expected value of a function defined? Currently I am reading into functional data analysis. A common assumption is that the expected value of some random function is $0$, i.e. $\mathbb{E}(x) = 0$ where $x \in L^2$, the space of all squared integrable functions with inner product $\langle x,y \rangle = \int x(t)y(t) \text{d}t$. 
My question might appear a little trivial to many of you, but I just want to be certain that I don't get this basic concept of zero expectation wrong: Does $\mathbb{E}(x) = 0$ mean, that $\mathbb{E}\left[x(t)\right] = 0 ~\forall t$?
Thanks for your help!
 A: No. It just means that $\int x \, \mathrm{d}t = 0$.
A: Referring to Probability Essentials by Jacod and Protter;
$E[X]=\int_\Omega X(\omega)dP(\omega)$ whenever the expression makes sense. If your random variable $X\in L^2(\Omega)$ then this simply means that $X$ has finite variance, following by Holder's Inequality and $\sigma(X)=E[X^2]-E[X]^2$.
For your queistion; $E[X]=0$ means that the integral $\int_{\Omega} X(\omega)dP(\omega)=0$. Using the expectation rule, if $X$ has a density, we can write this in Lebesgue-sense as $E[X]=\int_\mathbb{R} xf(x)d x$.
When you write $X(t)$, it smells like a stochastic process over $t\in [0,T]$, and should be properly defined. An example is the Wiener-Process $W(t)$, which actually has the property that $E[W(t)]=0$ for all $t\in [0,T]$.
You have to, sort of, think a little carefully when dealing with these things, and notation here makes a big difference. This might not help you directly, but clearify a few things. Sorry in advance if it only puts fire to the heavy debate above. I might have made a few technical missteps as well.
