Why is the variance formula different to the portfolio variance formula?

110 Views Asked by At

I'm trying to wrap my head around the variance, covariance and correlation. I'm clear on the formulas in their basic forms. However, confused as to why the portfolio variance formula is:$$Std^2=(W_a^2)(Std_a^2)+(W_b^2)(Std_b^2)+(2)(W_a)(W_b)(Cov_{a,b}).$$Whereas Variance in stats is:$$Std^2=\sum \frac{(x-mean)^2}{n}.$$Is this because it measures two variances?