## The mathematics of kindness

Submitted by Marianne on November 1, 2016Charles Darwin's theory of evolution by natural selection is one of the most profound scientific theories to have ever been developed. However, there were several questions about evolution that Darwin himself could not answer. Not that he wasn't smart enough (in fact, his intuition often pointed in the right direction), but the answers to those questions required sophisticated mathematical insights that were not developed far enough, or even available yet, in Darwin's time.

Worker bees give up their chance to reproduce to serve the hive.

One such problem was the evolution of altruism. In biology, altruism is defined as an organism (or individual) performing an action which is at a cost to itself, but which benefits (directly or indirectly) another individual, often without the expectation of reciprocity or compensation. Altruistic behaviour seems abundant in nature: a mother bear protecting her cubs, possibly at the risk of injury; worker bees giving up their reproductive capacity entirely, effectively reducing their fitness to zero; a bird giving out warning signals to others, thereby revealing its own presence to an approaching predator; human beings going to war to defend their country, knowing very well they might die on the battle field; and so on.

However, if evolution by natural selection is all about competition and survival of the fittest, how can altruistic behaviour (which, by definition, lowers the altruist's fitness and increases the receiver's fitness) ever evolve? As Darwin himself wrote: "Natural selection will never produce in a being anything injurious to itself, for natural selection acts solely by and for the good of each." (Origin of Species, 1859, Ch. 6.) Pondering the riddle of altruism, Darwin later suggested that if natural selection would sometimes act at a level higher than the individual, then altruistic behavior, for the good of the community, could indeed evolve. This intuitive idea already reflected what is now referred to as *group selection*, a notion to which I will return below.

### Hamilton's rule

As some of the above examples indicate, one particular situation in which altruistic behaviour is often observed is when it involves close family members, or *kin*. A mother bear cares for and protects her own cubs (but not others!), because they are closely related to her. In a bee colony, all worker bees are sisters born from the same mother (the queen bee). And even humans are generally more likely to perform "selfless acts of kindness" towards closely related family members than to complete strangers (although not always).

A bear will defend her own cubs, but not others.

The idea of kinship can be made mathematically more precise by calculating a *coefficient of relationship*, call it , which is defined as the probability that two individuals share a common gene (technically this should be stated in terms of *alleles*, or *gene values*, but as in most other descriptions, I’ll use the term gene here, for simplicity). When you were conceived, you inherited (roughly) half of your genes from your mother, and the other half from your father. In general this is a (mostly) random process, with no particular preference for which genes are inherited from which parent. So, the coefficient of relationship between you and either one of your parents is

Now, if you have a sibling (brother or sister), they also inherited half of their genes from your mother and half from your father, but they may not all be the same genes as the ones you inherited. In fact, because the process of inheritance is random, you and your sibling (on average) share only half of the half of the genes that each of you inherited from your mother (and similarly for the half you inherited from your father). So, the coefficient of relationship between you and your sibling is

In a similar way, you can calculate your coefficient of relationship with other family members. For example, for you and a (first) cousin, it is (I’ll leave the calculation as an exercise).

So how can this notion of genetic relatedness explain the evolution of altruism? It was the evolutionary biologist Bill Hamilton, born in Egypt from New Zealand parents who then settled in England, who formulated the answer in a precise mathematical way. Hamilton argued that if the benefit () of an altruistic act, devalued by the coefficient of relationship () between the two individuals involved, is greater than the cost (), then (genes for) altruistic behaviour can evolve. In mathematical terms, if

then altruism is worth it. This is now known as *Hamilton’s rule*.

To give a simple example, if you sacrifice your own life to save two or more siblings, then for every gene that is lost with your own death, at least one copy can be expected to be saved. After all, each of your siblings has a probability of to share a given gene with you. Mathematically, the coefficient of relationship is (between you and your siblings) and the cost is (you). So, according to Hamilton's rule, if the benefit is at least (your siblings), you're OK (or rather, your genes are).

A bird's warning call benefits all other birds around.

The founders of population genetics, the trio Ronald Fisher, J. B. S. Haldane, and Sewall Wright, apparently had been intuitively aware of this general idea. Fisher had already published a table calculating genetic distances between kin in 1918, and Wright formally introduced the coefficient of relationship in 1922. For some reason, though, they never related this to the problem of altruism. However, according to legend, Haldane had first expressed the logic behind Hamilton's rule when he announced that he was prepared to lay down his life for eight cousins or two brothers. But in the end it was Hamilton who generalised the idea and formalised it mathematically in 1964.

So, clearly, altruistic behavior is associated with kinship. Or at least it is in many cases. However, as some of the above examples indicate, it need not always be. Warning signals from one bird are received by all birds that happen to be nearby, whether they are genetically related to the altruist or not. And people going to war to defend their country don't only fight to protect their own immediate family. Even though one could argue that in these cases there is a good chance that there will be a sufficiently large number of close kin among the receivers of the altruistic act to make it worthwhile, there seems to be something more general going on.

### The Price equation

Enter George Price, an American physical chemist living in London on his savings, reading and writing on evolutionary biology. After applying for a grant and obtaining a research position in mathematical genetics at University College London, and reading Hamilton's 1964 papers on kin selection, Price derived an equation (in the early 1970s) that generalises Hamilton's rule, and provides a formal method for the hierarchical analysis of the effects of natural selection.

#### Covariance

The Price Equation, as it is now known, consists of two terms. Let's start with considering only the first term, also known as the *covariance equation* (which, incidentally, was discovered independently, and unbeknownst to Price, a few years earlier by two other researchers, Robertson (1966) and Li (1967)). Suppose we have a quantitative trait, such as human height, or the propensity for altruistic behaviour. Let's write for this trait — so is a variable that takes a numerical value measuring the trait (e.g. height in centimetres). Given a population of people, each comes with his or her value for and we write , , , etc, for all the different values that occur in the population, and for the population average. Now each value of (for ) comes with a *fitness* value (e.g. being tall might come with a high fitness value because it enables you to reach more of the fruit on a tree than a small person). Let's again write for the population average.

### Covariance

The covariance between and is defined as

where denotes the expected (or mean) value.

There is a statistical quantity called the *covariance* between the trait values and their respective fitness values. It’s a measure of how the and vary together and denoted by (see the box for a definition). Roughly speaking, a positive value of the covariance indicates that the and are related, with increasing when does and vice versa (with a high positive value indicating a strong relationship). A negative value indicates there’s an inverse relationship between the two, with decreasing when increases and vice versa (with a low negative value indicating a strong inverse relationship). Finally, a value of the covariance means that there is no relationship between the two.

The covariance equation states that the change in average trait value from one generation to the next (denoted by ) is proportional to the covariance between the trait values and their respective fitness values:

Here is a graphical illustration of the meaning of the covariance equation for selection.

Figure: PaulGNelson, CC BY-SA 4.0.

If the covariance between trait values and fitness values is positive (so a higher trait value means higher fitness), the average trait value in the current population (, dashed blue line) will move upward in the next generation (, dashed red line) due to selection.

This may seem a trivial statement, but it actually represents a significant insight in at least two ways. First, it provides a formal, quantitative description of how selection works, which can be used to analyse any kind of selective process, not only in biology, but also in economics or learning, for example. And second, it generalises Hamilton's rule by showing that what really matters is statistical association (i.e., covariance), not just genetic relatedness (which is only one particular source of statistical association, although a very important one in biological evolution).

George Price (1922-1975).

Covariance is the proper way to think about the role of genetic relatedness in evolution. After all, selection acts directly on traits, and only indirectly on genes (through those traits the genes are responsible for). This crucial insight had been missed (or at least under-appreciated) by everyone else: Darwin himself, the founding trio of population genetics Fisher, Haldane, and Wright, and the originator of kin selection Hamilton. However, George Price was the first to realise its importance, which subsequently led Hamilton to reformulate his theory of kin selection in terms of covariance. Indeed, it can be shown mathematically that Hamilton's rule is a specific instance (given appropriate assumptions) of the covariance equation.

In the examples above, this means that birds (or people) who interact in an altruistic way do not necessarily need to be genetically related. It could be sufficient for the altruistic individuals to belong to a clearly distinct group, such as all birds nesting in a particular patch of trees, or all people living in a particular country, which provides the required statistical association. This, then, brings us to the full Price equation and the notion of *group selection*.

#### Group selection

The full Price equation consists of the original covariance equation plus an additional term:

where measures the change in character values between ancestor and descendant, weighted by the fitness , and denotes the *expected* (or mean) value of .

One interpretation of the full equation is that it provides a natural and hierarchical decomposition of selection within and between groups. To see this, let’s assume the population consists of several groups (e.g. birds nesting in different parts of a forest) and write for the average trait value within a group . The corresponding average fitness within the group is . We can now rewrite the equation, replacing individuals by groups:

where and are the corresponding averages over all groups . Now, note that the in the expectation term (in bold in the equation above), which is the change in average trait value of a given group , can itself be written as a full Price equation (in bold in the equation below) in terms of the individuals that make up this group :

This simplifies to

This recursive expansion of the Price equation can be repeated for yet another level of subgroups, replacing in the expectation term by yet another full Price equation, and so on.

However, what is important here is that this recursive expansion provides additional insight into the possible evolution of altruism. Recall that, by definition, altruistic behavior decreases an individual’s fitness, but increases its group’s fitness (relative to other groups). In other words, the covariance between an individual’s altruistic trait and that individual’s fitness is negative, . So, according to the Price equation, altruistic traits can only evolve in those situations where the positive *between*-group covariance is large enough to make up for the negative *within*-group covariance . The Price equation thus provides a mathematical formulation (and verification) of Darwin’s original intuition that if natural selection acts at a level higher than the individual (in other words, group selection), then altruistic behaviour can evolve (within a group, for the good of the community).

Direct reciprocity can be observed in many animal species, including chimps. Grooming someone else is a cost to yourself (it takes time and energy, without getting any direct benefit), but it strengthens social bonds, and is expected to be "paid back".

Note that in such a group selection scenario, there is reciprocity at the group level, but not necessarily directly between the same two individuals. In other words, if I do you a favour, I do not necessarily need to expect you personally to return the favour to me, as long as I can expect it from the group as a whole. Altruism based on direct reciprocity, i.e., between the same two individuals, can also be explained using game theory (see this article to find out more). Incidentally, it was also Price who introduced this idea in evolutionary biology, together with John Maynard Smith, one of the leading evolutionary biologists during the second half of the 20th century (and a former student of Haldane). Alternatively, direct reciprocity can also be viewed in a group selection setting, where the group size is just two.

What had motivated Price to develop his equation was a quest to find true selfless kindness. However, what his mathematics seemed to tell him is that altruism, as a product of evolution, in the end still serves a selfish purpose, whether it is at the level of the gene, the individual, or the group as a whole. Even within groups, altruism only evolves when there is competition between groups. Perhaps disillusioned by what may have looked to him like a failure in his quest, George Price took his own life in January of 1975. At that time probably only a handful of evolutionary biologists (including Hamilton) truly understood the significance of his equation.

### Further reading

The complete and highly intriguing story of the life and work of George Price is beautifully told in the book *The Price of Altruism: George Price and the Search for the Origins of Kindness* by Oren Harman, professor of the history of science at Bar Ilan University, Tel Aviv, Israel. The current article is largely based on that book, together with the more technical overview of George Price's contributions to evolutionary genetics by Steven A. Frank, professor of ecology and evolutionary biology, University of California, Irvine, CA, USA. I also thank my colleague Mike Steel, professor of mathematics and statistics at the University of Canterbury, Christchurch, New Zealand, for gifting me a copy of Harman's book, which inspired me to learn more about the Price Equation and "the mathematics of kindness".

### About the author

Wim Hordijk is a computer scientist currently on a fellowship at the Konrad Lorenz Institute in Klosterneuburg, Austria. He has worked on many research and computing projects all over the world, mostly focusing on questions related to evolution and the origin of life. More information about his research can be found on his website.