When is the Bochner expectation equal to the vector whose coefficients are the expectations of the random coefficients? This question is sort of a follow-up to one that was posted a couple years ago.
Let $B$ be a Banach space with a countable basis $b := (b_1, b_2, \ldots)$. Let $X$ be a Bochner-integrable $B$-valued random vector, and let $(X_1, X_2, \ldots)$ be its [random] coefficients with respect to $b$.
I'm wondering if there are any simple sufficient conditions for the Bochner expectation of $X$ to be equal to the vector whose coefficients with respect to $b$ are the expectations of the random coefficients $(\mathbb{E} X_1, \mathbb{E} X_2, \ldots)$.
That is, are there are any simple sufficient conditions on $B$ and/or $X$ such that
$$\mathbb{E} X = \sum_i (\mathbb{E} X_i) b_i$$
Of course, this works when $B$ is finite-dimensional. I would like to know if it holds more generally, but I've browsed some summaries of Bochner and Pettis integrals and haven't seen it addressed.
I would also be interested to know the answer for the same question, but with Pettis expectations instead of Bochner expectations.
 A: This always holds.
If $b_1,\dots$ is a basis for $B$ then it's a standard theorem that the coefficient functionals are bounded: There exist $\pi_j\in B^*$ with $$x=\sum_j\pi_j(x)b_j\quad(x\in B).$$And it's a theorem that the Bochner integral commutes with bounded linear operators, so $$\pi_j\Bbb E[X]=\Bbb E[\pi_j(X)]=\Bbb E[X_j],$$which says exactly that $$\Bbb E[X]=\sum_j\Bbb E[X_j]b_j.$$Similarly for the Pettis integral, except then the fact that the integral commutes with bounded linear functionals is part of the definition instead of being an easy theorem.
Edit This raises the question of why $\pi_j$ is bounded. One of those things that seemed impossibly deep years ago... I cheated and looked at Wikipedia on Schuder Bases. The proof there is wrong, but it led me to a correct proof.
Define $$S_nx=\sum_{j=1}^n\pi_j(x)b_j.$$
(The proof on Wikipedia deduces boundedness of $||S_n||$, and hence of $||\pi_j||$, from Banach-Steinhaus. This is wrong; we can't apply Banach-Steinhaus until we know that $S_n$ is bounded (at which point we already know that $\pi_j$ is bounded)!)
Let $c_0(B)$ be the Banach space of sequences of elements of $B$ that tend to $0$ in norm (with norm $||(y_1,y_2\dots)||=\sup_j||y_j||_B$). Define $T:B\to c_0(B)$ by $$Tx=(x-S_1x,x-S_2x,\dots).$$It follows from the Closed Graph Theorem that $T$ is bounded. Hence each $S_n$ is bounded, hence $\pi_j$ is bounded (and in fact $||S_n||$ is bounded, so $||\pi_j||$ is bounded.)
To show $T$ is bounded, suppose $x_n\to x$ in $B$ and $Tx_n\to(y_1,y_2,\dots)$ in $c_0(B)$. We need to show that $Tx=(y_1,y_2,\dots)$.
Now, $x_n-\pi_1(x_n)b_1\to y_1$ in $B$; since $x_n\to x$ this shows that there exists $c_1$ so that $\pi_1x_n\to c_1$ and $y_1=x-c_1b_1$. Similarly $\pi_2x_n\to c_2$ and $y_2=x-(c_1b_1+c_2b_2)$. Etc. Since $||y_j||\to0$ this shows that $$x=\sum_{j=1}^\infty c_jb_j.$$So $c_j=\pi_jx$; hence $y_j=x-S_jx$ and so $Tx=(y_1,y_2,\dots)$, as required.
