# Hamilton's derivation of direct fitness from his 1970 paper

In his 1970 paper "Selfish and Spiteful Behaviour in an Evolutionary Model", Hamilton uses Price's equation to derive his well-known rule $rb -c >0$. My question is about one of the steps in his derivation.

Hamilton considers a population of $n$ individuals. Let $s_{ij}$ be the effect of individual $i$ on the fitness of $j$. The fitness of an individual $j$ is defined as $w_j = 1 + \sum_i s_{ij}$, $w=1/n \sum_j w_j$ is the mean fitness in the population, and $q=1/n \sum_j q_j$ is the average frequency of a certain allele. Using Price's equation, we get

$w \Delta q = Cov (q_j, \sum_i s_{ij})$.

So far so good. But Hamilton then says that this equation can be rewritten as

$w\Delta q = \sum_i 1/n \sum_j (q_j - q)s_{ij}$

Based on the definition of covariance (i.e., $Cov (X,Y) = E((X-E(X))(Y-E(Y)))$, this seems to only be the case if $E(\sum_i s_{ij}) = 1/n \sum_j \sum_i s_{ij} = 0$. But this would imply that the average fitness wouldn't change over time, which sounds odd for me. In sum, I don't understand this step in Hamilton's paper. What am I missing?

Actually the derivation is pretty straightforward. It's easier to use the fact that $Cov(X,Y) = E(XY) - E(X)E(Y)$ to derive this result. Suppose $x_{j} = \sum_{i} s_{ij}$.