When Jensen's inequality is equality

17.3k Views Asked by At

One form of Jensen's inequality is

If $X$ is a random variable and $g$ is a convex function, then $\mathbb{E}(g(X))\geq g(\mathbb{E}(X))$.

Just out of curiosity, when do we have equality? If and only if $g$ is constant?