TITLE: Mean value theorem for random variables (inside an expectation value)
QUESTION [9 upvotes]: In a proof I am trying to understand a mean value theorem for random variables is used. It is stated that
$$E[f(X+Y)]=E[f(X)+f^\prime(X+\Theta Y)]$$
for real valued random variables $X$ and $Y$ and $f\in C^1$ (Note: I had to change the equation above). The random variable $\Theta$ has values in $[0,1]$.
My question: It is also stated, that the random variable $\Theta$ is uniformly distributed in $[0,1]$ and independent of $X$ and $Y$. Why is this the case? Can you point me to the used theorem? (In my textbook only the results but not the used theorems are mentioned...)
Additional information:

$X = \tfrac{1}{\sqrt{n}}\sum_{k=1, k\neq i}^n Y_k$ for standardized i.i.d random variables $Y_k$ and a certain $i\in\{1,2,\ldots,n\}$
$Y = \tfrac{1}{\sqrt{n}}Y_i$
Thus $X$ and $Y$ are independent.
$f$ is the solution of a Stein equation for normal approximation

Update 1: I just found out, that it is important to take the mean on both sides of the equation. I edited my question...
Update 2: I found a solution for the question, why $\Theta$ is uniformly distributed (see my answer). It remains the question: Why is $\Theta$ independent of $X$ and $Y$?

REPLY [2 votes]: For $f$ one has:
$$\begin{align}
f(y)-f(x) &= \int_x^y f'(s) ds \\
&= (y-x) \int_0^1 f'(x+(y-x)t)dt \\
&= (y-x) E\left[f'\left(x+(y-x)\Theta\right)\right]
\end{align}$$
with $\Theta$ uniformly distributed in $[0,1]$. Thus
$$\begin{align}
E[f(X+Y)]-E[f(X)] &= E[f(X+Y) - f(X)] \\[1em]
&\left\downarrow\ f(y)-f(x) = (y-x) E\left[f'\left(x+(y-x)\Theta\right)\right] \right.\\[1em]
&= E[\ Y\cdot  E[f'(X+\Theta Y)]\ ]
\end{align}$$
So
$$E[f(X+Y)] = E[f(X) + \ Y\cdot  E[f'(X+\Theta Y)]]$$
Because $\Theta$ can be freely chosen, one can chose $\Theta$ independent of $X$ and $Y$. (I didn't check it, but I guess one can always construct a random variable with a given distribution which shall be independent of other variables).