I have a question about the solution of exercise 2.15 part (a) from Boyd & Vandenberghe's Convex Optimization. The exercise says let $x$ be a real-values random variable with $\operatorname{prob}(x = a_i) = p_i, i = 1, \ldots, n$, where $a_1 < \ldots < a_n$. Which of the following conditions are convex in $p$?
(a) $\alpha \leq \mathbb{E} f(x) \leq \beta$, where $\mathbb{E}f(x)$ is the exc+pected value of $f(x) $, i.e., $\mathbb{E} f(x) = \sum_i^n p_i f(a_i)$. (The function $f: \mathbb{R} \to \mathbb{R} $ is given.)
The answer in the solution manual does not satisfy me. It says: $\mathbb{E} f(x) = \sum_i^n p_i f(a_i)$, so the constraint is equivalent to two linear inequalities $$\alpha \leq \sum_i^n p_i f(a_i) \leq \beta.$$
Can anybody help me understand why $f(x)$ is not important in this argument? $f$ could be non linear or even non convex function and the solution did'nt say any thing about it.