They say money can’t buy happiness, but if you can afford to go to college and get an advanced math degree, the money you spent can help you understand a new mathematical formula for happiness that improves upon a previous mathematical formula for happiness that was missing a few key variables. Does this mean only mathematicians are happy? We’ll find out.

Our equation can predict exactly how happy people will be based not only on what happens to them but also what happens to the people around them.

Dr. Robb Rutledge from the UCL Institute of Neurology and Max Planck UCL Centre for Computational Psychiatry co-authored the study after finding that a formula for happiness developed in 2014 focused more on what happens to an individual and not on what happens to people around them.

Forty-seven volunteers, strangers to each other, performed monetary tests in small groups. In one, they were asked to split a small sum of money with a person they just met. In another, participants gambled with the money first and were able to see how much money others won or lost before being asked to split what they had left.

The results showed clearly that generosity and the happy feelings one gets from giving to others are directly affected by how much money the donor saw that the other person had and how they felt about this. If the other person had less (possibly because the donor won more at gambling), the donors gave away on average 30% or their money. Rutledge speculates that’s because of guilt. On the other hand, donors who say that the other person had more money gave on 10% on average, most likely because of envy. However, win or lose, the participants were happiest when there was little or no money inequality between donor and recipient.

On average we are less happy if others get more or less than us, but this varies a lot from person to person … Based on exactly how inequality affects their happiness, we can predict which individuals will be altruistic.

So, according to Dr. Rutledge’s new formula, the perception of inequality and our feelings towards it are a keys to our happiness. Does this equation also explain our current political campaign in the U.S.?

For the mathematically inclined or happiness deprived, here is Dr. Rutledge’s explanation of the formula:

This is the updated equation to predict happiness, where t is the trial number, w0 is a constant term, other weights w capture the influence of different event types, 0 ? ? ? 1 is a forgetting factor that makes events in more recent trials more influential than those in earlier trials, CRj is the certain reward if chosen instead of a gamble on trial j, EVj is the average reward for the gamble if chosen on trial j, and RPEj is the RPE (reinforcement prediction error) on trial j contingent on choice of the gamble. The RPE is equal to the reward received minus the expectation in that trial EVj. If the CR was chosen, then EVj = 0 and RPEj = 0; if the gamble was chosen, then CRj = 0. The variables in the equation are quantities that the neuromodulator dopamine has been associated with in previous neuroscience studies. The additional term w4 relates to advantageous inequality (guilt) when the reward received by the subject Rj exceeds the reward received by the other player Oj, and w5 relates to disadvantageous inequality (envy) when Oj exceeds Rj.

Credit: Robb Rutledge, UCL