Given a one-parametric random function on a probability space $(\Omega,\mathcal F,\mathbb P)$:


$X:U\times\Omega\to \mathbb R \text{ and } (a,w)\mapsto X(a,w), \text{ with } \sigma(X(a))\subseteq \mathcal F\quad\quad\forall a\in U\subseteq\mathbb R,
$


Then the following holds:


$E\left[\sup\limits\_{a\in U}X(a)\right]=\sup\Bigr\lbrace E\left[X(A)\right]\Bigr|\sigma(A)\subseteq{\mathcal F},\;A(\omega)\in U\Bigr\rbrace$
and also
$E\left[\sup\limits\_{a\in U}X(a)\right]=\sup\Bigr\lbrace E\left[X(A)\right]\Bigr|\sigma(A)\subseteq{\bigcup\limits\_{a\in U}\sigma(X(a))},\;A(\omega)\in U\Bigr\rbrace$


Proof:
------


The following holds trivially:


$E[X(A)]\le E[\sup\_{a\in U} X(a)]$


it remains to show the other direction. This is done by applying [zhoraster's answer](https://mathoverflow.net/questions/48012/expectation-of-a-supremum-of-conditional-expectations/48208#48208):


Clearly, $M(\omega) = \sup\_{a\in U} X(a,w)$ is $\mathcal F$-measurable.


Define for $\delta>0$


$\mathfrak A\_\delta = \lbrace(a,\omega)\in U\times \Omega\mid X(a,w) >M(\omega)-\delta\rbrace$


This set is in $\mathcal B(\mathbb R)\otimes \mathcal F\_t$, and it has a full projection onto $\Omega$. By a measurable selection theorem (which I think one can find in Bogachev *Measure Theory*) there is an $\mathcal F$-measurable $A\_\delta$ such that $(A\_\delta(\omega),\omega)\in\mathfrak A\_\delta$ almost surely. Hence $E[X(A\_\delta)]≥E[M(\omega)]−\delta$. We get the desired statement by letting $\delta\to 0$.


(One can also use Kuratowski--Ryll-Nardzewski theorem to prove the existence of a measurable $A\_\delta$.)



> 
> After a very good answer of [zhoraster](https://mathoverflow.net/questions/48012/expectation-of-a-supremum-of-conditional-expectations/48208#48208), I realized, that my initial question was a mixup of several different things. Thats why I changed it community wiki and clearified the problem.
> 
> 
> 



Commuting supremum and expectation
Clearly, $M(\omega) = \sup\_{a\in U} g(a,S\_t)$ is $\mathcal F\_t$-measurable.


Define for $\delta>0$
$$
\mathfrak A\_\delta = \{(a,\omega)\in U\times \Omega\mid g(a,\omega)>M(\omega)-\delta\}
$$
This set is in $\mathcal B(\mathbb R)\otimes \mathcal F\_t$, and it has a full projection onto $\Omega$. By a measurable selection theorem (which I think one can find in Bogachev *Measure Theory*) there is an $\mathcal F\_t$-measurable $A\_\delta$ such that $(A\_\delta(\omega),\omega)\in \mathfrak A\_\delta$ almost surely. Hence $E[g(A\_\delta,S\_t)]\ge E[M(\omega)]-\delta$. We get the desired statement by letting $\delta\to 0$.


(One can also use Kuratowski--Ryll-Nardzewski theorem to prove the existence of a measurable $A\_\delta$.)


UPD: This is perhaps wrong (I just noticed Did's comment). 


