Preliminaries

Let $$\mathcal{H}$$ be a separable infinite-dimensional Hilbert space and consider the bounded linear operators from $$\mathcal{H}$$ to $$\mathcal{H}$$: $$\mathfrak{B}(\mathcal{H})$$. Recall the definition of the Hilbert-Schmidt norm of an operator $$\mathscr{A}$$:

$$\lVert \mathscr{A} \rVert_{HS}^2 = \textrm{Tr}(A^*A) = \sum_i \lVert A e_i \rVert^2$$

where $$(e_i)_{i=1}^\infty$$ is a complete orthonormal system for $$\mathcal{H}$$. An operator with finite HS-norm is said to be Hilbert-Schmidt and we denote the set of all Hilbert-Schmidt operators from $$\mathcal{H}$$ to $$\mathcal{H}$$ by $$\mathfrak{B}_2(\mathcal{H})$$.

The Bochner mean of a random variable defined on a Banach space $$\mathcal{X}$$ (if it exists) is given by a limit of simple functions, in the sense that choosing some approximating sequence of integrable simple functions $$s_n$$ satisfying

$$\lim_{n \to \infty} \int_\Omega \lVert X-s_n \rVert_\mathcal{X} \, \mathrm{d}P = 0$$

we define

$$E(X) = \int_\Omega X \, \mathrm{d}P = \lim_{n \to \infty} \int_\Omega s_n \, \mathrm{d}P$$

The Pettis mean of a random variable defined on a Banach space $$\mathcal{X}$$ (if it exists) is defined to satisfy:

$$\varphi(E(X)) = E(\varphi(X)) \quad \forall \varphi \in \mathcal{X}^*$$

Question

Let $$(\Omega, \mathbb{F}, P)$$ be a probability space and consider some random operator $$\mathscr{X}: \Omega \to \mathfrak{B}(\mathcal{H})$$. My question is about the interaction between evaluating a random operator and finding the expectation of the random operator.

For which of the expectations defined above (if any) does it hold that:

$$E(\mathscr{X}(h)) = E(\mathscr{X})(h) \quad \forall h \in \mathcal{H}$$

Does it maybe hold if we assume that $$\mathscr{X}$$ takes values in $$\mathfrak{B}_2(\mathcal{H})$$ (since this space is also separable and a Hilbert space so the Bochner and Pettis integrals coincide)?