The earnings a merchant has is given by $Z=3X-Y-5$ where $X$ and $Y$ are independent random variables with $\operatorname{Var}{(X)}=1$ and $\operatorname{Var}(Y)=2$. What is the value of $\operatorname{Var}(Z)$ ?
I'm not sure where to start from, I should have the probability function of both of them to calculate the variance, so I'm lost.
We have a few rules for the variance: \begin{align} \operatorname{Var}(aX+b) &= E[(aX+b)^2]-E[aX+b]^2 \\ &= a^2E[X^2] + 2abE[X] + b^2 - a^2E[X]^2 - 2abE[X]-b^2 \\ &= a^2\operatorname{Var}(X), \end{align} so constant shifts don't do anything, and rescaling gets squared. If $X,Y$ are independent, then $$ E[XY]=E[X]E[Y], $$ so \begin{align} \operatorname{Var}(X+Y) &= E[(X+Y)^2]-E[X+Y]^2 \\ &= E[X^2] + 2E[XY] + E[Y^2] - E[X]^2 - 2E[X]E[Y] - E[Y]^2 \\ &= \operatorname{Var}(X)+\operatorname{Var}(Y). \end{align} A combination of these is enough to calculate $\operatorname{Var}(Z)$ in terms of the given variances: $$ \operatorname{Var}(Z) = \operatorname{Var}(3X-Y-5) = \operatorname{Var}(3X-Y) = 9\operatorname{Var}(X) + \operatorname{Var}(Y) $$