# probability, measure theory intermediate value for integrals

Given the measure space $(\Omega, A, P)$ and $X:\Omega \rightarrow \mathbb{R}$ an integrable function. D is a closed set of $\mathbb{R}$ such that $\forall B\in A$ with $P(B)>0$

$\displaystyle\frac{1}{P(B)}\int_{B}XdP \in D$ . Prove that $P\{X\in D\}=1$.

this looks quite similar to the intermediate value for integrals taking the riemann integral in the sigma algebra of the borelians. so i tried to get an upper bound and a lower bound for X such that when i integrate i have like :

$P(B)m\leq\int_{B}XdP \leq M P(B)$ then i divide and that's it but what is there any thing that asures me that i can get those bounds? got any other ideas?

-

$\mathbb{R}-D$ is open, so it is a disjoint union of open intervals $\cup_i J_i$. If $P\{X\in D\}<1$, i.e. if $P\{X\in \mathbb{R}-D\}>0$, then for some $i$ also $P\{X\in J_i\}>0$. Let $J_i=(a,b)$. Since $J_i=\cup_n (a+1/n,b-1/n)$, for some $n$ we must have $P\{X\in (a+1/n,b-1/n)\}>0$. Let $B=\{X\in (a+1/n,b-1/n)\}$. Then $a+1/n\leq\frac{1}{P(B)}\int_B X dP\leq b-1/n$, i.e. the number is not in $D$ - a contradiction.