How is the variance equivalent to the following? I am working through a problem that asks if the set, $P$ is convex.  
Note that $P$ is a set of pdfs.  Each member $p \in P$ describes a pdf - a vector of real numbers that are probabilities.  The assignment is to determine if the set of all pdfs (all $p$'s) subject to a restriction on the variance, is a convex set.
These are the restrictions on $p$, including the inequality for the variance of all of all of the $p$'s:


*

*$p$ is a vector of probabilities, $p \in \mathbb{R}^+$

*probability simplex, which is of course a restriction on $p$
$P = \{p \,  \vert \sum_{i=1}^{n}{p_i} = 1 , p \ge 0\}$

*$p_i$ is the probability that random variable $x$ is $x=a_i$ with $x \in \mathbb{R}$

*$var(x) \ge \alpha\ $and$ \,\,var(x) = \sum_{i=1}^n{(x_i-E[x])^2}\}$

*$\alpha \in \mathbb{R}$ and $var(x) = \sum_{i=1}^n{(x_i-E[x])^2}$ and $E[x]=\sum_{i=1}^np_ix_i$
Now, in the Solutions to the homework I see
In the solutions to my homework, it says that that "$var(x) \ge \alpha$ can be reformulated as $\sum_{i=1}^np_ia_i^2+(\sum_{i=1}^np_ia_i)^2 \le \alpha$".    
This is obviously convex...so I can see the answer from there. 
But, my question is how can this inequality $var(x) \ge \alpha$ be reformulated as $\sum_{i=1}^np_ia_i^2+(\sum_{i=1}^np_ia_i)^2 \le \alpha$ ?
EDIT 
Here is the homework question in full.  I am particularly asking about parts (f) and (g):

And here is the solution:

If you'd like any more information, please let me know.

I think there might be a mistake in the solutions you were given (in fact, I suspect this problem is from a class I TA'd, EE364A, due to the similarities in formatting, etc).
The idea is that we can write $\text{var}(x)$ as
$$
\text{var}(x) = \sum_i p_ia_i^2 - \left(\sum_i p_ia_i\right)^2
$$
but note that your expression in this case is wrong in both the inequality direction and sign, since you can't sum both of the terms to get an expression for variance. Additionally, note that we're asking for convexity w.r.t. $p$. This is now not a convex function, but rather a concave one. Both notions should be easy to prove from here.
