In Equation 7.17, the book breaks the variance into two parts. I can't seem to understand why the 1/n is represented outside the summation part in the first part of the equation. Also, shouldn't there be a single n given that there are n observations representing variance in the covariance table?
The first part of equation 7.17 is just the contribution of the portfolio variance from the variance of the individual assets (j=i, the asset equals itself). It is the squared weights times just the diagonal of the variance-covariance matrix. The second part of the equation 7.17 is the contribution of the covariances of all the assets. It is the contribution of all the other elements of the variance-covariance matrix other than the diagonal. As you can see it is where the asset does not equal itself (j<>i).
If you just use equation 7.16, using 1/n as the weights, you will get the same answer.