# Upsetting inequality (à la Cauchy-Schwarz?)

How to prove that:

$$\left(\sum_{i=1}^n w_i n_i \sqrt{\dfrac{y_i(1-y_i)}{n_i+1}}\right)^2 \leq \dfrac{\left(\sum_{i=1}^n w_i n_i y_i\right)\left(\sum_{i=1}^n w_i n_i (1-y_i)\right)}{(\sum_{i=1}^n w_i n_i+1)}$$ where $w_i\geq0$, $\sum_{i=1}^n w_i=1$, $n_i>0$ and $y_i \in (0,1)$ for $i=1,\dots,n$, with $n>1$?

I have verified numerically that it should hold, but I cannot still find an elegant way to show it.

The formula comes from an inequality for the variance of a convex combination of beta-distributed variables.

-

Consider some random variables $X$ and $Y$ such that, for every $i$, $(X,Y)=(n_iy_i,n_i(1-y_i))$ with probability $w_i$. The OP asks a proof of an inequality equivalent to $$E(g(X,Y))\le g(E(X),E(Y)),$$ where, for every nonnegative $x$ and $y$, $$g(x,y)=\sqrt{\frac{xy}{x+y+1}}.$$ The second partial derivatives $\partial^2_{xx}g$ and $\partial^2_{yy}g$ are negative and the determinant of the Hessian matrix of $g$ is $(xy+x+y)/(4xy(x+y+1)^3)$, which is positive. Hence both eigenvalues of the Hessian matrix are negative, the function $g$ is concave on its domain, and Jensen's inequality yields the result.
Very nice solution! However, concavity is not determined by the signs of the individual second derivatives; $\partial^2_{xx}g$ and $\partial^2_{yy}g$ could both be negative and yet the Hessian could have a positive eigenvalue. (The sign of $\partial^2_{xy}g$ doesn't affect the eigenvalues of the Hessian.) However, according to Wolfram, the determinant of the Hessian is $\frac{xy+x+y}{4xy(x+y+1)^3}>0$, so the function is indeed concave on its domain. – joriki Mar 1 '11 at 19:53