Convex function and conditional expectation I have the following question. I hope someone has encountered this or can point me in a direction.
Probability space $(\Omega,\mathcal{F}, \mathbb{P})$. Let $X:\Omega\to\mathbb{R}$ be a random variable and $f:\mathbb{R} \times \mathbb{R} \to \mathbb{R}$ be a function. Suppose we have a sub-sigma-algbra $\mathcal{G}\subset\mathcal{F}$.
If $\mathbb{E}[f(X, y)]$ is convex in y, is it true that
$$\mathbb{E}[f(\mathbb{E}[X : \mathcal{G}], y)]$$
is also convex in y???
If not, what conditions do we need to impose to ensure convexity?
Thank you.

A simple counterexample. Let $X\sim N(0,1)$ and $f(x,y)=(x^2-1)y^2$. It follows that
$$
E\left [f(X,y)\right ]=0, 
$$
which is convex in $y$. If $\mathcal{G}=\{\varnothing, \Omega\}$, 
$E(X|\mathcal{G})=EX=0$ and so 
$$
E\left [f(E(X|\mathcal{G}),y)\right ]=-y^2, 
$$
which is not convex. Unfortunately, I have no idea what assumptions should be imposed to ensure the convexity. 
