A discrete random variable has the PMF of $x/15$ for $x \in\{ 1,2,3,4,5\}$ and $p(x) = 0$ for all other values. $Z = 3X^2 +1$. what is $\mathsf {Var}(Z)$?
When I solve for $\mathsf E(Z)$ I get $3[1/225 + 4/225 + 9/225 + 16/225 + 25/225] + 1$.
Then when I solve for $\mathsf E(Z^2)$ I get $3^2[(1/225)^2 + (4/225)^2 + (9/225)^2 + (16/225)^2 + (25/225)^2] + 1^2$.
Then $\mathsf {Var}(Z) = \mathsf {Var}(aX+b) = 3^2(Var(Z))$.
Which $\mathsf {Var}(Z) = \mathsf E(Z^2) - (\mathsf E(Z))^2$.
When I plug in the value I get a negative value. HELP! I know variance is a non-negative number.
Edit: $\color{navy}{\text{The original post has been updated. Added new text to also answer the amended post.}}$
Why are you squaring the probability to find $\mathsf E(Z)$? You just need: $$\mathsf E(3X+1) = 1 + 3 \sum_{x=1}^5 \frac {x^2}{15}$$
$$\color{navy}{\mathsf E(3X^2+1) = 1 + 3 \sum_{x=1}^5 \frac {x^3}{15}}$$
Your formula for $\mathsf E[(3X+1)^2]$ is further erroneous. You have attempted to find $\mathsf E[(3X)^2+1]$ instead. What you need is:
$$\mathsf E((3X+1)^2) = \sum_{x=1}^{5}\frac{(3x+1)^2x}{15}$$
$$\color{navy}{\mathsf E((3X^2+1)^2) = \sum_{x=1}^{5}\frac{(3x^2+1)^2x}{15}}$$