I am trying to get my head wrapped around this article in Wikipedia. The first definition given there is the covariance of a probability measure $\mathbf{P}$:

$$\mathrm{Cov}(x, y) = \int_{H} \langle x, z \rangle \langle y, z \rangle \, \mathrm{d} \mathbf{P} (z) \tag{$\ast$}$$

where $x, y \in H$ (a Hilbert space). I am used to the following definition of covariance:

$$\mathrm{Cov}(X, Y) = E((X - EX)(Y - EY))$$

where $X: \Omega \to \mathbb{R}$ and $Y: \Omega \to \mathbb{R}$ are two random variables defined on the corresponding probability space $(\Omega, \mathcal{F}, \mathbf{P})$, and

$$EX = \int_{\Omega} X(\omega) \, \mathrm{d} \mathbf{P} (\omega).$$

**Question 1**: Can anybody please translate my definition to the one in $(\ast)$? I would like to see it rewritten in the form of $(\ast)$, and I would really appreciate some discussion to get a better understanding of what is going on there.

At the end of the article, there is a definition of the covariance function of a random element $z$:

$$\mathrm{Cov}(x, y) = \int z(x) z(y) \, \mathrm{d} \mathbf{P} (z) = E(z(x) z(y)) \tag{$\ast\ast$}.$$

**Question 2**: First of all, why don't we subtract the expected values of $z$ at $x$ and $y$? Secondly, again, I do not really see a connection with my definition. Can anybody please give a clarification?

Thank you!

Regards, Ivan