Solution (source code)

= Solution

We prove the <Convex Poincaré inequality>. For a differentiable convex function $h:[0,1]\to\mathbb R$ and independent copies $U,U'$ supported on $[0,1]$, convexity gives
$$
(h(U)-h(U'))^2
\leq h'(U)^2\mathbf1_{\{U>U'\}}
+h'(U')^2\mathbf1_{\{U'<U\}}.
$$
Taking expectations and using $\operatorname{Var}(h(U))=\frac12\mathbb E(h(U)-h(U'))^2$ gives
$$
\operatorname{Var}(h(U))\leq\mathbb Eh'(U)^2.
$$
Applying this conditional inequality coordinate by coordinate in the <Efron–Stein inequality> proves
$$
\operatorname{Var}(f(X))\leq
\mathbb E\sum_i(\partial_if(X))^2
=\mathbb E\lVert\nabla f(X)\rVert^2\leq1.
$$
Since $-g$ is convex and has the same gradient norm as $g$, the same argument gives $\operatorname{Var}(g(X))\leq1$.