# when can integration and expectation be exchanged?

When is it possible to move expectations into integrals?

In a proof of the Central Limit Theorem, at one point an expectation was moved into the integral (without much explanation of why that worked.) (I don't have that proof, sorry.)

I assume it has to do with the support being independent of the parameters?

Some background of why I'm asking:

I want to find the Cramer Rao bound of a messy function which is defined as an integral. (I'm integrating out the second variable but I need software which I don't yet have access to to actually integrate it.) So I wanted to bring the expectation inside the integral, but I'm not sure if/when that is possible.

• The expected value is an integral over $x$ of $f(x)x$. Maybe they were just expanding the expected value into its integral form? – Noah Jun 13 '19 at 23:02
• I don't think so, because I asked the professor about it, and he said it was a special case where this was possible – Jess Jun 13 '19 at 23:04
• In that case there's no way we'll be able to help without seeing the actual proof (unless there's someone out there with an encyclopedic knowledge of statistics proofs that involve the central limit theorem and recognizes this special case). – Noah Jun 13 '19 at 23:06
• I wasn't asking for the proof specifically, but rather if there is a known general case where the expectation can be brought into an integral? (i.e. maybe it has something to do with monotonicity or the limits of integration?) – Jess Jun 13 '19 at 23:08

Generally speaking, the expected value of an integral is an iterated integral, and so the normal mathematical rules for interchange of integrals apply. To see this more clearly, we first note that the expectation operator is an integration operation. Formally, a random variable $$X$$ in the probability space $$(\Omega, \mathscr{G}, P)$$ has expected value defined by the Lebesgue integral:

$$\mathbb{E}(X) \equiv \int_\Omega X(\omega) dP(\omega).$$

Now, suppose we have a random variable that is an integral over some other function:

$$X(\omega) = \int_\mathbb{R} H(r,\omega) dr.$$

In this case, the expected value can be written as an iterated integral as follows:

$$\mathbb{E}(X) = \int_\Omega \Bigg( \int_\mathbb{R} H(r,\omega) dr \Bigg) dP(\omega).$$

Now, there are a number of theorems relating to when you are allowed to interchange the order of integration in this kind of iterated integral, but the most important is Fubini's theorem. (If $$H$$ is a measureable function in the above expression then you will be able to interchange the order of integration under this theorem.) This is a large subject, so I will not attempt to set it out fully here. Instead, I will refer you to books on integration and measure theory, which deal with the basis of Lebesgue integration and the application of iterated integrals. Good luck with your explorations!