# Show that the following result holds true for the variance of the return of a portfolio of shares

Start with a portfolio $$p$$ of $$n$$ shares, each with weight $$x_i = \dfrac{1}{n}$$ (for $$i$$ ranging from $$1$$ to $$n$$, discretely). Its return is given by: $$R_p=x_1R_1+\ldots+x_nR_n=\sum_{i=1}^{n}=x_iR_i\tag{1}$$ Additionally, the variance of its return is given by: $$Var\left(R_p\right)=Cov\left(R_p, R_p\right)=Cov\left(\sum_{i=1}^n x_i R_i, R_p\right)=\sum_{i=1}^n x_i Cov \left(R_i, R_p\right)\tag{2}$$ Show that: $$Var (R_p)=\frac{1}{n}\times\text{mean variance of shares}+\left(1-\frac{1}{n}\right)\times\text{mean covariance between shares}\tag{3}$$

I tried to show that in the following way:

$$Var(R_p)=\sum_i\sum_jx_ix_j Cov(R_i, R_j)\\=\sum_{i=j=1}^n x_i^2 Var(R_i)+\sum_{i\neq j}x_i x_jCov\left(R_i, R_j\right) \\=\dfrac{1}{n^2}\sum_{i=j=1}^n Var(R_i)+\dfrac{1}{n^2}\sum_{i\neq j}Cov (R_i, R_j)\\=\underbrace{\dfrac{1}{n}\times\dfrac{1}{n}\sum_{i=j=1}^n Var(R_i)}_{\dfrac{1}{n}\times\text{mean variance of shares}}+\dfrac{1}{n^2}\sum_{i\neq j}Cov (R_i, R_j)$$ Hence, I might have managed to show the first part. Could you please confirm me that and, above all, give me some hint so as to show the second part as well? (I was thinking about the fact that so as to get to mean covariance between shares I have to compute the number of all the possible combinations of paired shares, given by $$\dfrac{n\times (n-1)}{2}$$; however, I am not sure that this is a good starting point). Thank you in advance for your precious support

For the covariance part we can observe the following: There are $$n$$ variance terms in the $$n \times n$$ covariance matrix. This implies that there must be $$n^2-n$$ covariance terms (ie. lower and upper triangular matrix subtracted from the diagonal). As such, you can rewrite the last expression by dividing and multiplying with $$n^2-n$$:
\begin{align} \frac{1}{n^2} \sum_{i\neq j} Cov(R_i,R_j) &= \left(\frac{n^2-n}{n^2}\right) \cdot \left(\frac{1}{n^2-n}\sum_{i \neq j} Cov(R_i, R_j)\right)\\ &= \left(1- \frac{1}{n}\right) \cdot (\text{"mean covariance"}) \end{align}