Let $(X, \mathcal{M},\mu)$ be a probabilty space and $\Sigma \subseteq \mathcal{M}$ a $\sigma$-algebra. For every $f \in \mathcal{L}^1(\mu,\mathbb{C})$, we know that there exists $g \in \mathcal{L}^1(\mu,\mathbb{C})$ called conditional expectation of $f$ with respect to $\Sigma$, and denoted $g=\mathbb{E}(f,\Sigma)$, which is $\Sigma$-meassurable and satisfies that for every $A \in \Sigma$ we have
$$ \int_A f d \mu = \int_A g d \mu $$
The problem I am trying to solve is the following:
Let $\varphi: \mathbb{C} \to \mathbb{R}$ be a convex continuous function such that $\varphi \circ f \in \mathcal{L}^1(\mu,\mathbb{R})$. Let $g=\mathbb{E}(f,\Sigma)$, $h = \mathbb{E}(\varphi\circ f,\Sigma)$, $\lambda \in \mathbb{R}$ and $B \in \Sigma$ with $\mu(B)>0$ contained in $\left\lbrace x \in X : h(x) \leq \lambda \right\rbrace $, then $$ \varphi \left( \frac{1}{\mu(B)} \int_B g d\mu \right) \leq \lambda. $$
I would like to use Jensen's inequality:
Let $(X, \Sigma, \mu)$ a probability space and $\varphi: \mathbb{C} \to \mathbb{R}$ a convex continuous function (that is, $\varphi(\theta z + (1-\theta)w \leq \theta \varphi(x) + (1-\theta)\varphi(w)$ for $z,w \in \mathbb{C}$ and $\theta \in [0,1]$). Let $f \in \mathcal{L}^1(\mu,\mathbb{C})$ a complex-valued function such that $\varphi \circ f \in \mathcal{L}^1(\mu,\mathbb{R})$. Then $$ \varphi \left( \int_{X} f d\mu \right) \leq \int_{X} \varphi \circ f d \mu. $$
but I do not know how to deal with the $1/\mu(B)$ factor. I would appreciate any suggestion.
Assuming that $\mu(B) >0$ define $\nu$ by $\nu (E)=\frac {\mu(B \cap E)} {\mu (B)}$ verify that this is a probability measure and $\int h d\nu=\frac 1 {\mu (B)} \int hd\mu$ for any integrable (w.r.t. $\mu$) function $h$. Can you finish?