Expected value of (3X - 5X^2 + 1) I have an exercise where I need to find the expected value of $3X - 5X^2 + 1$, and I don't know where start. I know that $E(aX + b) = a \cdot E(X) + b$, and also that $Var(X) = E(X^2) - [E(X)]^2$, but I don't know how to use these formulas. Can I have a hint on how to start? I don't need to know the PDF, but only try to expand the problem using the formulas I know.
 A: Given a unknown disttibution with $E(X)=\mu$ and $V(x)=\sigma^2$:
$$E(3X-5X^2+1)=3E(X)-5E(X^2)+E(1)$$
$$E(3X-5X^2+1)=3E(X)-5[V(x)+E(X)^2]+E(1)$$
$$E(3X-5X^2+1)=3\mu-5[\sigma^2+\mu^2]+1$$
$$E(3X-5X^2+1)=3\mu-5\sigma^2-5\mu^2+1$$
I consider the full expression of @corey979 is the answer but it needs $\mu$ and $\sigma^2$.
A: Comment: Just a reality check with a particular example: Let $X \sim\mathsf{Pois}(\lambda=3),$ so that $\mu = \sigma^2= 3.$ Let $Y = 3X-5X^2 + 1,$ and
find $E(Y).$ With 10 million realizations of $Y,$ one can expect three significant digits of accuracy.
set.seed(2020)
x = rpois(10^7, 3)
y = 3*x - 5*x^2 + 1 
mean(x);  var(x)
[1] 3.00072     # aprx E(X) = 3
[1] 3.000116    # aprx V(X) = 3
mean(3*x) - mean(5*(x^2)) + 1
[1] -50.02001   # aprx E(Y) = -50
mean(y)
[1] -50.02001   # aprx E(Y) = -50
3*3 - 5*3 - 5*3^2 + 1
[1] -50         # exact E(Y)


Addendum re the discrete random variable discussed in Comments.
I will let you show exact numerical values corresponding to
simulated values, if interested.
set.seed(1219)
w = sample(c(1,2,5), 10^7, rep=T, p=c(1,2,5)/8)
v = 3*w - 5*w^2 + 1 
mean(w);  var(w)
[1] 3.750773  # aprx E(W) = 15/4 = 3.75
[1] 2.686251
mean(3*w) - mean(5*(w^2)) + 1
[1] -71.52042 # @ Duck's solution
mean(v)
[1] -71.52042 # Directly

