Remainder of Taylor's Theorem using random variables Let $I$ be an interval and $X$ a random variable with values in I with $E(|X|^m) < \infty \forall m \in \mathbb{N}$. Also let $f: I \rightarrow \mathbb{R}$ with $f \in \mathcal{C}^{(m)}$ bounded. Let $\beta_m$ be a random variable with law beta and density function:
$$\rho_{m}=m(1-\theta)^{m-1} \quad \forall 0 \leq \theta\leq1.$$
Suppose that $X$ and $\beta_m$ be independent, then if $\mu \in I$ we have that:
$$E(f(X))-\sum_{k=0}^m\dfrac{f^{(k)}(\mu)}{k!}E((X-\mu)^k)= \dfrac{1}{m!}E((X-\mu)^m(f^{(m)}(\mu+(X-\mu)\beta_m)-f^{(m)}(\mu))$$
I was given as hints to prove this that I should use for an $x \in I$ the Taylor remainder on the integral form and the write it in terms of the $\beta_m$, then change $x$ with $X$ since it's independent with $X$ and take expectation values then use Fubini.
I'm not able to prove the result, I can make the $\beta_m$ appear by using the fact that $E(\beta_m)=\dfrac{1}{m+1}$ since the $\beta_m$ follow a $Beta(1,m)$ distribution, but I can't figure a way to get the Fubini theorem properly applied so I can compute the integral. I'd appreciate any help.
 A: I assume that $f^{(m)}$ is also bounded to ensure the integrability of the random variable $(X-\mu)^m f^{(m)}(\mu+\beta_m(X-\mu))$.
The Taylor formula with integral reminder yields for every $x \in I$
$$f(x) - \sum_{k=0}^{m-1} \frac{f^{(k)}(\mu)}{k!}(x-\mu)^k = (x-\mu)^m \int_0^1 \frac{(1-\theta)^{m-1}}{(m-1)!} f^{(m)}(\mu + \theta(x-\mu)) ~\mathrm{d}\theta.$$
Then apply this formula to $X$ instead of $x$ and take expectation of both sides. Calling $P_X$ the law of the random variable $X$, you get
\begin{eqnarray*}
E[f(X)] - \sum_{k=0}^{m-1} \frac{f^{(k)}(\mu)}{k!}E[(X-\mu)^k] 
&=& E \Big[ (X-\mu)^m \int_0^1 \frac{(1-\theta)^{m-1}}{(m-1)!} f^{(m)}(\mu + \theta(X-\mu)) ~\mathrm{d}\theta \Big] \\
&=& \frac{1}{m!} \int_I \Big( \int_0^1 m(1-\theta)^{m-1} (x-\mu)^m f^{(m)}(\mu + \theta(x-\mu)) \mathrm{d}\theta \Big) \mathrm{d}P_X(x)
\end{eqnarray*}
By independence of $\beta_m$ and $X$, the double integral in the right-hand side is the expectation of $(X-\mu)^m f^{(m)}(\mu+\beta_m(X-\mu))$.
The desired formula follows by subtracking the expectation of $\frac{f^{(m)}(\mu)}{m!}(X-\mu)^m$ to both sides.
