Jensen's inequality and conditional expectation Denote $(\Omega,\mathcal{F},P)$ to be our probability space and $X:\Omega\to\mathbb{R}$ a random variable. Suppose we have a measurable convex function $f:\mathbb{R}\to\mathbb{R}$. From Jensen's inequality, we know
that for all sub-sigma-algebra $\mathcal{G}\subset\mathcal{F}$:
$$
E[f(X):\mathcal{G}] \geq f(E[X:\mathcal{G}]).
$$
Now let us denote a partition of $\mathbb{R}$ by $\mathbb{R}^{(n)} = \{\mathbb{R}^{(n)}(k) \subset \mathbb{R}: k=1,..,n\}$ such that $P(X \in \mathbb{R}^{(n)}(k)) = 1/n$ for all $k =1,...,n$. Define a finer partition $\mathbb{R}^{(2n)} = \{\mathbb{R}^{(2n)}(k) \subset \mathbb{R}: k=1,..,2n\}$ such that each component in $\mathbb{R}^{(n)}$ is a proper superset of 2 components in $\mathbb{R}^{(2n)}$ and such that $P(X \in \mathbb{R}^{(2n)}(k)) = \frac{1}{2n}$ for all $k =1,...,2n$
Now define random variable $X^{(n)} = E[X:X\in\mathbb{R}^{(n)}]$. From Jensen's, we know that 
$$
E[f(X):X^{(n)}] \geq f(E[X:X^{(n)}]).
$$
I want to show that as $n\to\infty$, the above holds with equality, i.e.
I want to show that in the limit
$$
\lim_{n\to\infty}E[f(X):X^{(2n)}] = \lim_{n\to\infty}f(E[X:X^{(2n)}]) = f(X)
$$
almost surely. Is this possible??? Do I even need convexity?
Thank you.
 A: We may as well assume the first partition occurs for $n=1$, so we have partitions at $n=2^k$ for every $k\ge0$. Let $\mathcal F_k=\sigma\{[X\in A]:A\in\mathbb R^{(2^k)}\}$, the $\sigma$-field generated by these partitions.  If we assume both $X$ and $f(X)$ are integrable, then $X^{(2^k)}=E[X|\mathcal F_k]$ and $Y^{(2^k)}=E[f(X)|\mathcal F_k]$ both define martingales. The martingale convergence theorem implies that
$$X^{(2^k)}\to E[X|\mathcal F_\infty],\qquad Y^{(2^k)}\to E[f(X)|\mathcal F_\infty]$$
as $k\to\infty$ almost surely, where $\mathcal F_\infty:=\sigma\left(\bigcup_k\mathcal F_k\right)$. Thus, your desired result will follow for any continuous $f$ if we can show that $X$ is $\mathcal F_\infty$-measurable, no convexity required. (If $f$ is injective, this is if and only if.)
However, this isn't always true. Assume $X$ is uniformly distributed on $(0,1)$. Define
$$\mathbb R^{(2^k)}(j)=\left[\frac{j-1}{2^{k+1}},\frac{j}{2^{k+1}}\right)\cup\left[\frac{j-1+2^k}{2^{k+1}},\frac{j+2^k}{2^{k+1}}\right)$$
for $2\le j\le2^k-1$, and
$$\mathbb R^{(2^k)}(1)=(-\infty,2^{-{k+1}}),\qquad\mathbb R^{(2^k)}(2^k)=[1-2^{-(k+1)},\infty).$$
Note that $P(X\in\mathbb R^{(2^k)}(j))=2^{-k}$ for all $j$, so this partition meets your conditions. However, if $A\in\mathbb R^{(2^k)}$ for some $k$, then $A\cap[0,1)$ is closed under the map $\varphi:x\mapsto x+\frac12\mod1$, hence $[X\in B]\in\mathcal F_\infty$ implies $B\cap[0,1)$ is also closed under $\varphi$. In particular, this implies that $[\frac12\le X<1)\notin\mathcal F_\infty$, so $X$ is not $\mathcal F_\infty$-measurable.
