This is the question
Suppose that $X$ is a discrete random variable with the mean $4$ and variance $9$. If $Y= -2X+1$. What is the mean and variance of $Y$?
I was able to easily solve the mean $E[Y]$ like so:
$E[Y] = E[-2X+1] = -2E[X] + 1 = -2(4) + 1 = -8 + 1 = -7$
but I got a little confused about solving the variance. This was my attempt
$VAR[Y] = E[Y^2] - (E[Y])^2 = E[(-2X + 1)^2] - (-7)^2 = ?$
My issue is handling the $E[(-2X + 1)^2]$ portion well.
Note that $E[-2X+1]^2=4E[X^2]-2E[X]+1$, and remember that $\operatorname{Var}[X]=E[X^2]-(E[X])^2$.
Or you can use directly the fact that $\operatorname{Var}[aX+b]=a^2\operatorname{Var}[X]$.