# Multivariate Jensen's inequality in a probabilistic setting: When does equality hold?

I am having trouble understanding the concept of Jensen's inequality in a probabilistic setting with multiple variables. Specifically, I am interested in cases where equality holds. I understand that in the univariate case $$$$f(\text{E}[X])\leq \text{E}[f(X)]$$$$ for an integrable, real-valued random variable $$X$$ and a convex function $$f$$, and that equality holds if $$X$$ is constant almost surely or $$f$$ is linear on some set $$A$$ such that $$\text{P}(X \in A) = 1$$ (according to wikipedia and some answered questions on this site).

I am trying to find a similar condition for the multivariate case with independent random variables. For example, consider the function $$g(X, Y) = XY$$ for two independent, integrable, real-valued random variables $$X$$ and $$Y$$ (e.g. normal distributed). In that case $$$$\text{E}[g(X, Y)] = \text{E}[XY] = \text{E}[X]\text{E}[Y] = g(\text{E}[X],\text{E}[Y])$$$$ which suggests to me that $$g$$ has some property that causes equality. However, if my understanding is correct, $$g$$ is not linear (it is for example not homogeneous of degree 1). I assume that the paragraph about general inequality in a probabilistic setting on wikipedia is relevant to my question, but it is far above my level of understanding.

Is there a condition for equality in the multivariate case besides almost surely constant random variables (and specifically how does $$g$$ above meet this condition) or do I have a serious misunderstanding about the applicability of Jensen's inequality on this case?

Your function $$\ g\$$ is neither convex nor concave, so Jensen's inequality isn't applicable. If $$\ x=\Big(\frac{1}{2},\frac{-1}{2}\Big)\$$ and $$\ y=\Big(\frac{-1}{2},\frac{1}{2}\Big)\$$, for instance, then \begin{align} g\Big(\frac{1}{2}x+\frac{1}{2}y\Big)&=g((0,0))\\ &=0\\ &> \frac{-1}{4}\\ &= \frac{1}{2}g(x)+\frac{1}{2}g(y)\ , \end{align} so $$\ g\$$ isn't convex. On the other hand, if $$\ u=\Big(\frac{1}{2},\frac{1}{2}\Big)\$$ and $$\ v=\Big(\frac{-1}{2},\frac{-1}{2}\Big)\$$, then \begin{align} g\Big(\frac{1}{2}u+\frac{1}{2}v\Big)&=g((0,0))\\ &=0\\ &< \frac{1}{4}\\ &= \frac{1}{2}g(u)+\frac{1}{2}g(v)\ , \end{align} so $$\ g\$$ isn't concave either.
• Equality holds for all linear functions (for all affine functions, in fact) by the linearity of expectations, a stronger result than Jensen's inequality, although it can be deduced by applying Jensen's inequality to both the function and its negative. And, yes if a function $\ g\$ is neither convex nor concave then you can't invoke Jensen's inequality, so it tells you nothing about the value of $\ \text{E}(g(X))-g(\text{E}(X)) \$. May 3, 2021 at 16:19