To find $V[4X+2]$ I did $V[4X+2] = 4^2*V[X]$
To find $V[X]$ I used this formula:
$$\mu = 0.2*-2+0.3*2 = 0.2 \\V[X] = ((0.2*-2)^2-(0.2)^2)+(-0.2^2)+((2*0.3)^2-0.2^2) = 0.4\\ 4^2*0.4 = 6.4$$
However my professor did this:
$$V[X] = E[x^2]-E[X]^2 = 2-0.2^2=2-0.04 = 1.96\\ 4^2*1.96 = 31.36$$
I don't understand any of this. It makes no sense to me. Where did he even get that formula? The one we were given in theory class was the one from the screenshot. Can anyone explain this to me?


It is known that $V[X] = E[X^{2}] - E[X]^{2}$, for any random variable $X$. Using your definition: $$\begin{align} V[X] &= E[(X - E[X])^{2}] \\&= E\left[X^2-2XE[X]+E[X]^2\right] \\&= E[X^{2}]-E[2XE[X]] + E[E[X]^{2}] \\&= E[X^{2}]-2E[X]^{2} + E[X]^{2} \\& = E[X^{2}]-E[X]^{2} \end{align}$$ Your calculation for $V[X]$ is wrong. $$\begin{align} V[X] &= \sum_{x} (x - E[X])^{2} f(x) \\ & = (-2 -0.2)^{2} f(-2) + (0 - 0.2)^{2} f(0) + (2-0.2)^{2} f(2) \\ & = 4.84 \cdot 0.2 + 0.04\cdot0.5 + 3.24\cdot0.3 \\ & = 1.96 \end{align}$$
Note that expectation is linear, which follows from the formula.