# Can we switch integral and expectation by Fubini's theorem?

Can we switch the expectation and integral in the RHS by Fubini's theorem?

I'm actually not quite sure how Fubini's theorem is used outside basic Calculus.

The fact that my professor did not discuss Riemann integration of a random variable suggests that it is possible otherwise the $\int_0^T X_t^2 dt$ probably wouldn't make sense.

You can switch expectation and integral by Tonelli's theorem since $X_s^2\geq 0$.
• Is it? One is from 0 to T while the other is not over an interval but rather over $\Omega$ – BCLC Sep 14 '15 at 19:18
I believe this is a result from Itô isometry in Stochastic Calculus, where LHS is the variance of the Random Variable $\int_{0}^{T}X_tdW_t$, reduced to ordinary expectation w.r.t $ds$ on RHS.