How discovering an equation for altruism cost George Price everything.

Laura met George in the pages of Reader's Digest. In just a couple of column inches, she read an abridged version of his biography and was instantly intrigued. In the 1960s, apparently, egotistical scientist George Price discovered an equation that explained the evolution of altruism, then overnight turned into an extreme altruist, giving away everything up to and including his life.

A theatre director, Laura Farnworth recognised the dramatic potential of the story. It was a tragedy of Greek proportions – the revelation of his own equation forcing Price to look back on his selfish life and mend his ways, even though choosing to live selflessly would lead inexorably to his death. But as she delved into his life and science over the next five years, Farnworth discovered a lot more than a simple morality tale.

Born in New York in 1922, George Price realised pretty early on that he was destined for greatness. In a class full of smart kids he was one of the smartest, especially with numbers. He was in the chess club, obviously, and his mathematical brain was naturally drawn to science. Determining that there was no rational argument for God's existence, he became a militant atheist, too.

His PhD came from the University of Chicago for work he did on the Manhattan Project – having graduated in chemistry, he'd been recruited to find better ways to detect traces of toxic uranium in people's bodies. Although it had been a top secret project, young Price must have felt he was already part of world events. Obsessed with applying his brilliance to big problems, however, he struggled to find a job that satisfied him. Instead, he pursued his big ideas outside work, and not only scientific ones: he wasn't afraid of wading into public arguments with famous economists, and even sent his plans for world peace to the US Senate. He didn't understand why other people didn't take up his ideas: the solutions seemed so obvious to him.

Domestic problems were a different matter. He'd met his wife, Julia, on the Manhattan Project, but as well as being a scientist she was a devout Roman Catholic. The marriage was hard-pressed to survive Price's scathing views on religion, and after eight years and two daughters – Annamarie and Kathleen – they divorced. Fed up with his job, his life and the distinct lack of recognition in America, Price cut his ties in 1967 and crossed the Atlantic to London, intent on making a great scientific discovery there. He felt he had just a few more years to make his mark, but as it turned out, he needed only one.

Price had set himself the 'problem' of explaining why humans lived in families – particularly what fatherhood was for, scientifically speaking. This, in turn, led him to the question of how altruism had evolved, and it was while studying new theories around this topic that he derived what is now called the Price equation, almost by accident.

This is what it looked like:

wΔz=cov(wi,zi)

It captured the essence of evolution by natural selection in one simple formula. It describes how in a population of reproducing individuals, be they people, plants or self-replicating robots, any trait (z) that increases fitness (w) will increase in the population with each new generation; if a trait decreases fitness, it will decrease. It's a type of statistical relationship called covariance, and it was so elegant that Price couldn't quite believe no one had stumbled across it before.

So in September 1968, this obscure middle-aged American scientist walked in off the street to the Galton Laboratory, the home of human genetics at University College London. No one there knew who he was – he had no credentials, held no academic position and had no appointment. All he had was an equation. When he confidently proclaimed in his condescending, high-pitched voice that his equation could explain the evolution of altruism, they probably thought he was a crank. Nevertheless, when he walked out 90 minutes later, Price had a job and the keys to his own office.

He continued to hone his equation there, but at the same time began giving away his possessions. He would seek out the homeless in Soho Square or at the nearest railway stations, Euston and King's Cross, and give them anything they asked for, from the money out of his pay packet right down to the clothes off his back. If they needed a place to sleep, he would invite them back to his flat indefinitely. Eventually he had given away so much that he became as destitute as the men he was helping. When the lease ran out on his flat, he took to squatting, moving often, somehow continuing to do research as well.

By the end of 1974, Price had given up everything. Some time before dawn on 6 January 1975, in a squat not far from Euston, he killed himself.

Told like that, it seems obvious that everything was connected – he studied the concept of family because of the way he'd left his wife and daughters; his subsequent altruism was related to the equation he discovered; his suicide was a result of his extreme altruism. But as Farnworth discovered, nothing in Price's story is that simple.

To understand the sequence of events in his life, she set about drawing up a timeline based on his letters (archived in the British Library), the 2010 biography of Price that had prompted that short piece in Reader's Digest, and other sources.

Knowing more of the details changes the story. For example, despite the implication that he deserted his daughters, they never felt he had abandoned them. Kathleen's attitude is that it was normal in the 1950s for children to stay with their mother after a break-up, plus their father had remained a part of their lives, taking them to museums, concerts and the theatre. Yes, they saw less of him when he had to move away for a new job, but in her late teens Kathleen spent some time in New York, not far from where Price was then living, and she has fond memories of long walks through the city together, his love of poetry and Shakespeare, and his insatiable intellectual curiosity.

In 1966, more than a decade after the divorce, Price needed an operation to remove a tumour that had been lurking in his thyroid for a few years. Fatefully, he asked an old friend to do the surgery, and while removing the entire thyroid gland cured the cancer, it had serious consequences for Price's health. A nerve in his right shoulder was damaged in the operation, leaving him extremely bitter about his (former) friend's "butchery" and without feeling in his arm and on one side of his face. In addition, he had to take thyroxine pills to replace the hormones his thyroid used to make. On occasion, Price would stop taking his pills and experience profound episodes of depression as a result.

On a more positive note, Price's medical insurance paid out handsomely, and it was this money that funded his move to London. Far from abandoning Annamarie and Kathleen, by then 19 and 18 years old respectively, he stayed in touch, writing often. But conscious of his own mortality, he felt time was running out and that by moving away he would be able to focus on one brilliant, final piece of research.

It's inconceivable that his choice of family as a topic was not bound up with his relationship with his children, but the evolution of social behaviour – and of altruism in particular – was also one of the biggest scientific questions of the age. It was threatening to undermine Darwin's whole theory of evolution by natural selection, which made it more than worthy of Price's obsessive attention.

Altruism has always been a bit of a problem. Every altruist has their own motives, of course – some are emotional, responding to fellow humans in desperate straits, while others are more rational, thinking about the kind of society they'd like to live in and acting accordingly. Does that imply a level of self-interest? Even if it did, it shouldn't undo the goodness of altruism, and yet people can be deeply suspicious of those who apparently willingly put others' interests before their own. Selfless acts often attract accusations of hidden selfishness, suggesting they're not really altruistic at all.

This wasn't the problem for Darwinism. After all, humans have culture and religion and moral codes to live by – maybe our altruism was more to do with that than biology. Unfortunately, altruism was not only a human trait – it was everywhere. There were birds that nurtured other pairs' fledglings, vampire bats that regurgitated blood for those who'd failed to feed in the night, monkeys that put themselves in danger by raising the alarm when a predator approached the rest of their troop.

It was altruistic ants that posed a particular problem for Charles Darwin. Natural selection is often described as 'survival of the fittest', where fitness means how successful an individual is at reproducing. If one individual has a trait that gives them a fitness advantage, they will tend to have more offspring than the others; because the advantage is likely to be passed on to their offspring, that trait will then spread through the population. A fundamental part of this idea is that individuals are competing for the resources they need to reproduce, and fitness includes anything that helps an individual reproduce more than the competition.

But as Darwin observed, ants and other social insects are not in competition. They are cooperative, to the extent that worker ants are sterile and so have literally zero fitness. They ought to be extinct, yet there they are in every generation sacrificing their own reproductive ambitions to serve the fertile queen and her drones. Darwin suggested that competition between groups of ants – queen, drones and workers together – might be driving natural selection in this case. What was good for a nest competing against other nests would then outweigh what was good for any individual ant.

Group selection, as this idea was known, was not a very good solution, though. It didn't explain how the cooperative behaviour evolved in the first place. The first altruistic ant would have been at such a huge disadvantage compared to the rest of its group that it would never have got the chance to breed more altruistic ants. The same was true of humans – natural selection was intrinsically stacked against any altruistic individual surviving long enough to pass on their altruism.

This left a rather embarrassing paradox: the evolution of altruism was impossible, yet clearly altruism had evolved. If the biologists couldn't resolve this, would they have to throw out the whole idea of natural selection?

Luckily, a young man called Bill Hamilton spared biology's blushes with a slightly different solution in 1964. He proposed that altruism could have evolved within family groups – yes, an individual altruist would seem to be at a disadvantage, but that was not the whole picture because other individuals who shared the same genes associated with altruism would all influence each other's 'inclusive fitness'.

Discussions of human altruism are often framed in terms of someone drowning in a pond. Do you put your own life at risk to try and save them? If you do, that's altruism. Hamilton's idea, which became known as kin selection, acknowledged that compared to a selfish person who never got their feet wet, someone who went around jumping into ponds to save drowning people would be at a greater risk of dying before they managed to reproduce and pass their altruistic genes on to their children. However, if they happened to save a relative who shared the same genes, our altruist would have indirectly helped to get those genes passed on to the next generation after all. If the total benefit derived from having altruistic genes in the family, so to speak, was greater than the cost, then the evolution of altruism was no longer paradoxical.

When George Price stumbled across Hamilton's work in the Senate House Library in 1968, he was shocked. He was forced to confront the relationship between morality and family, the biological imperative he should have felt to sacrifice his selfish ambitions in favour of supporting his kin. He immediately set to work to challenge, even disprove Hamilton's theory. But he could only confirm it. Along the way, he derived his equation of natural selection, which helped to prove that altruism was not selfless and moral, but rather selfish and genetic.

Laura Farnworth wanted to be a dancer when she grew up. When scoliosis put an end to dreams of ballet school she turned to theatre instead, but like Price, her ambitions were stymied by poor health. In Farnworth's case, ulcerative colitis and a subsequent MRSA infection put her out of action for four years just as she had started to make her mark as a theatre director. In 2011, when she had at last started working again, the idea of making a play about Price was also, therefore, about putting herself back centre-stage.

Ambition was tempered with respect, however – rather than play up to the obvious version of his story, Farnworth wanted to "do right by George", which meant digging deeper into the true meaning of his actions and his research. But, she admits, understanding the Price equation was a constant struggle: "It's like juggling with three balls. I can juggle with two, but throw the third one at me and I drop it. I get two parts of the equation but when I try and understand the third bit, I lose it."

Price added the third bit while employed at the Galton Lab. Here's what the next version looked like:

wΔz=cov(wi,zi)+E(wiΔzi)

The new bit on the right-hand side accounts for any effects the trait in question might have on its own transmission – if it has properties that make it more likely to be passed on than other traits. Having this extra term opened up the process to allow for more than the simple story of 'survival of the fittest' – this was where Hamilton's ideas of inclusive fitness and kin selection could start to influence the course of evolution. It even allowed group selection more broadly; indeed, Price thought it meant natural selection could occur at many levels simultaneously. He wrote to Hamilton at once.

In his memoirs, Hamilton isn't sure when he and Price became friends; reading their letters 40 years later, Farnworth was able to see their friendship develop more clearly. Price had written first within days of reading the papers on kin selection. Hamilton had replied politely enough, not suspecting what was to come, then had gone to Brazil on an extended field trip, so there was a gap in their correspondence of about a year. During this time, prompted by an offhand remark in Hamilton's letter, Price had toyed with applying game theory to biology (this work, taken up and developed by other scientists, actually helped move evolutionary biology forward much more than his equation). But he'd also set about working to improve the maths of the kin selection theory, making it "more transparent". By the time Hamilton was contactable again, Price had derived the first version of his equation and got his job at University College London. But it was the extended version of the equation that he really wanted his new friend to see.

Today, some scientists will tell you that the Price equation is empty. It is like a footballer who, when asked how their team will win the next match, says they will score more goals than the other team. By trying to explain the game at its most fundamental level, say the critics, the equation explains and predicts nothing about why certain traits should increase or decrease fitness.

In her own quest to crack its meaning, Farnworth went to ask three evolutionary biologists who think there is more to it than that. One told her it was "quite simple, really". Another jumped up and started scribbling diagrams and equations on the whiteboard in his office. The third said, "None of us understands it really; it resonates in context." For its supporters, the Price equation is the closest thing biology has to E=mc2. It is a fundamental expression of natural selection that can be used to clarify concepts, separate different components of selection, and compare more specific mathematical models of evolution.

As for Hamilton, he was delighted with it from the moment he saw it. The Price equation was not, as Price had hinted to him, a new derivation or correction of his ideas. Instead, it was "a strange new formalism that was applicable to every kind of natural selection". Its strangeness came precisely because Price was not a biologist – instead of starting from the work of their scientific forebears, he had worked everything out for himself from first principles.

"In doing so," wrote Hamilton, "he had found himself on a new road and amid startling landscapes."

In June 1970, just a few months after Hamilton had written to say how "enchanted" he was with the equation, Price had a profound religious experience (he refused to tell his friend the details, sensing that Hamilton would be as unbelieving of such things as Price himself would have been until that point). Depressed, apparently by his role in confirming that altruism had selfish origins – though it is just as likely that he had stopped taking his thyroxine pills again – he had become obsessed with coincidences in his life, not least the sheer improbability that he, who hadn't known "a covariance from a coconut", should have discovered that equation. All at once, despite a lifetime of hardline atheism, he became convinced that a higher power had been at work.

The nearest church was All Souls, just above Regent Street in central London. He walked in and started praying. By the time he walked out again, he had given himself to Jesus.

At first, he brought the full weight of his intellect to bear on the Bible – he concluded that Easter week had taken 12 days, not eight, and was determined to persuade others of this truth, writing arguments as rigorous and detailed as his scientific research. Typical Price: start from first principles, take nobody else's word for it, test it obsessively and try to find your own way to the truth.

Then, at the end of 1972, he had a second conversion. He had already decided to trust in Jesus completely. He'd stopped taking his thyroxine pills and by now his insurance money was starting to run out – but if Jesus wanted to save him, Jesus would find a way. Around Christmas, he collapsed, close to death. A neighbour found him and he was rushed to hospital where the doctors saved his life. For Price, this was a sign that Jesus did want him to live, but also to change his ways and stop worrying about the length of Holy Week. He told Hamilton he had "sort of 'encountered' Jesus". He had had a vision, in other words, and heard Jesus whisper, "Give to everyone who asks of you."

Not everyone approved. A friend advised him against trying to "out-God God", while even the vicar at All Souls said giving money to down-and-outs was "seldom more than an easy way out for ourselves". But Price carried on giving away his worldly possessions whatever the consequences. He would even give away the big aluminium cross he wore round his neck if someone asked for it. Giving had become a compulsion, an addiction.

Farnworth turned to Isabel Valli at the Institute of Psychiatry, King's College London, to analyse Price's letters for clues to his mental state during this period. The meticulous detail in his letters suggested they were reliable accounts of events, but to Valli they were like a psychiatric interview. She got an insight into the way his thought processes were changing while he was in London. Linearity gradually gave way to circular thinking; he would go off on tangents, spiralling ever further away from what he was trying to say. There was a logic to it, but one that became harder for anyone else to follow.

Price was probably experiencing psychotic delusions, paranoia and hallucinations beyond his visions of Jesus, not to mention depression exacerbated by thyroid hormone deficiency. According to Valli, it is human nature when trying to make sense of delusions to construct explanations based on things already significant in our lives; for Price, those things were religion and altruism (and also marriage – he proposed to several women around this time, including suggesting to Julia that they get remarried; like the others, she declined).

It's not that his altruism was a symptom of mental illness, nor that his equation turned him into an altruist; it was just another part of his increasingly disordered life that he was trying to incorporate into a consistent worldview.

For him, the most rational explanation available was that he had been chosen by God to discover the Price equation and to become an extreme altruist. He was happy to tell people about it, too – if he is remembered at all, one of the first things people tell you about him is that he ran through the corridors of University College London shouting that he had "a hotline to Jesus". In some ways his life had become extremely complicated, but it was also much more simple to be willing to give up anything and everything and put all his faith in Jesus.

Of course, that isn't the end of the story. As Farnworth sees it, Price had a third conversion shortly before he died. He finally stopped helping others. He didn't have much more to give by this point, it's true, but he began to pay more attention to his own wellbeing. He had realised that he needed to help himself first if he was going to be any use to anyone else. Rebuilding his life from the bottom up was a daunting task, however. Despite getting a job as a cleaner at a bank, he knew he was struggling. He made an appointment to see a psychiatrist. But then, just days before his appointment, he killed himself.

George Price was buried in an unmarked grave in St Pancras Cemetery, a few miles north of central London. Bill Hamilton was at the funeral service along with some of the homeless men Price had helped. Afterwards, Hamilton went to the squat where Price had been staying to collect any scientific papers he had been working on.

"Although the house was awaiting demolition the electricity was still on: it mightn't have been too freezing for George when he was there all alone over Christmas," Hamilton wrote in his memoirs. "As I tidied what was worth taking into the suitcase, his dried blood crackled on the linoleum under my shoes: a basically tidy man, he had chosen to die on the open floor, not on his bed.

"That is how his life became dreamlike for me and also how his colourful thread in my science and my life ran out."

On 29 March 2016, Farnworth's play Calculating Kindness opened for a sold-out three-week run at the Camden People's Theatre. It's a small community venue not far from where Price lived, worked and died (though in his day it was the Lord Palmerston pub).

Given that Price didn't selfishly desert his family, his equation wasn't strictly about altruism and his altruism didn't directly cause his death, Farnworth had to make some choices about the story she was going to tell. She could stick to the morality tale with its inherently simplistic drama, or she could trust in the compelling tragedy of his life in all its complexity. In the end, she decided the latter would be the right thing to do by George. She would present his shifting worldview and let the audience draw their own conclusions. As such, the play doesn't offer any neat answers, it doesn't tell anyone how to live, or how selfish or altruistic we should be. Like the Price equation, it describes what happened, not what will or ought to be.

Among the audiences that came to see the show were Annamarie and Kathleen Price. Farnworth had invited them over from America, but was still incredibly nervous about what their reaction would be. They were delighted. Kathleen said she saw the essence of her father on stage.

While in London, the sisters took the opportunity to arrange for a headstone to be placed at their father's grave. Below his name, it reads, "Father. Altruist. Friend." And there at the bottom, the Price equation, engraved in stone.

Wellcome, the publisher of Mosaic, co-funded Calculating Kindness.

This article first appeared on Mosaic and is republished here under a Creative Commons license.​