The Formula for Happiness: 2019 in Review

Gerrit Hall
RezScore
Published in
12 min readDec 26, 2019

--

The publication of my startup’s year in review was sufficiently well received that I’ve opted to do a similar public treatment for my personal year in review.

For the past year I’ve maintained quantitative records on a daily basis tracking 9 variables, providing an adequate dataset for basic analysis to identify trends. The variables at my disposal include:

  • Overall Happiness
  • Work Satisfaction: (“Biz” in the charts)
  • Productivity
  • Exercise: active calories burned
  • Sleep: hours
  • Diet
  • Weather: conditions + exposure
  • Social
  • Reading

For additional detail on methodology please refer to the rest of the analysis. Feel free to reach out directly if you would like additional color on specific methodology.

Overall Review of Available Variables

The great news is that, in terms of my overall Happiness, 2019 was quantifiably a great year. 85% of my days scored as “happy” (above a score of 5). I would hazard a guess that most people are not so lucky as to be generally happy six out of seven days per week. Even among the bad days, the lowest was merely a “3” ranking occurring on just three such days, usually due to major external perturbations. I essentially stayed in a consistently narrow band of contentedness with very little variation, as demonstrated by the red boxplot on the left:

Boxplot of our dataset, adjusted to a 0–10 scale. Most had a wide enough variance for data analysis.

I’m never satisfied with my daily Productivity, although my standards are notoriously harsh so it will be tough to ever achieve satisfaction on this front. “Productivity” is the element of work over which I have some control (ie was my day filled with sufficient phone calls and code commits?), while the Biz score on the right incorporates the chance elements beyond my control that reflect the roller coaster ride that is startup life. For what it’s worth, here’s my Github history for a year I scored as insufficient:

In hindsight, not as bad as I thought, especially considering I was trying to prioritize bizdev over dev.

My Biz score was better calibrated and ended up slightly above average (mean of 5.5) but slightly below my overall happiness (mean of 6.1). This means there were some counterintuitive days where my work output was insufficient yet I still felt good about the startup, and I’m not yet sure what lesson to draw from this.

My Social score resembles that of a prisoner locked in solitary confinement —on fully half of all days I had absolutely zero social contact. Fortunately this did not have overwhelmingly deleterious effects on overall happiness, as it is a trait I have practiced and taught myself. It sounds weird, but in previous years I was too reliant on socializing for my happiness, so it required a lot of hard work to achieve happiness in solitude.

This year I also started tracking time spent Reading in an effort to see if I could improve this habit, but I’ve not seen much success so far. The primary reason is that I stopped reading on the exercise bicycle in favor of language lessons, which eradicated my primary reading hours. FWIW, here’s some books I enjoyed.

Weather is basically a gauge of the amount of exposure to the sun I received. A “0” would be correspond to a day spent indoors or with complete cloud cover, while a maximum grade would be where I spent as much time in the sun as my pasty skin would permit.

The Sleep variable is different units than the other variables on this chart (hours, as opposed to a 0–10 rating), but the y limits were roughly the same so I tossed it on there — I averaged 6.2 hours of sleep per night according to my watch, though I suspect this number is a bit generous (my watch seems to give me too much credit for restless tossing and turning).

My Exercise habits were above reproach throughout the year — my target was to break 1000 active calories per day, a target I hit 87% of the time. The misses were within striking distance for all but three occasions. My mean (1161) and median (1121) were both above my target, and it had a nice skew towards some periodic feats of superfitness. Indeed, my watch thinks I’m in better shape than people roughly half my age. For the analysis below, we divide by 200 so everything falls pretty neatly within a 0–10 scale

My Dietary data is a bit tough to utilize for these analyses because the data is somewhat discontinuous. For the first part of the year I kept notes on specific ingredients consumed, but partway through the year I moved to a probabilistic model that better captures trace ingredients amid a more consistent diet. At this point I moved to simply logging my eating window, which I reduced from ~8 hours to ~2 hours by the end of the year. For the next section I simply treated this simply as a pseudo-binary variable: “10” representing a day where I ate and “0” representing one of my intermittent fast days (I had two 5-day fasts plus periodic 36-hour fasts throughout the year).

Deriving a Personal Formula for Happiness

Let’s crunch some numbers and derive a formula for happiness. With these variables normalized to a scale of 0–10, regression analysis becomes straightforward and pretty easy to compare. Here’s the first cut where we toss everything into a blender and get a delicious happiness smoothie:

With strong statistical significance, my work satisfaction is by far the heaviest factor in my happiness. Per this formula, a perfect day at work would make me “happy”, even if everything else was trash.

The idea that work satisfaction is so disproportionately connected with happiness feels quite true. My situation is a bit unusual as a startup founder. My days are almost fully consumed with work on my startup, so my personal identity is disproportionately tied up with my startup’s health. Nonetheless, I have worked “jobs” before when needed, and a sense of purpose (or in those cases, the utter lack of purpose), had a very significant effect on my happiness.

Outside of work, Social life (~8% contribution) and Sleep (~14%) had a smaller but statistically significant effect on my score. This is perhaps notable because both of these variables are factors to which I’m quite hostile and seeking methods to eradicate them. Yet the data quite clearly say I would be undermining my happiness if I actually achieved my stretch goal of 24 hours stretches of waking isolation.

Exercise (~15%) also had a pretty strong weight as well, but with a t-score of .16 the effect is less likely to be significant. It’s also worth pointing out that I had no days of exercise “fail” this year, so I have no data as to what would happen to my happiness if I spent a skip day glued to the couch. In previous years exercise was a key factor, this year I can only comment on the effect of a “little” exercise versus a “lot”.

Weather (ie enjoying sunshine) also had a fairly small influence on overall happiness (~5%), but it did look to be moderately statistically significant (t-score of .12). I’d long hypothesized that sunshine was a key component of happiness but lacked the data prove it with the amount of sunshine I received in the sun-torched wasteland of California. Spending a year in a place with actual weather finally offered affirmative evidence of this hypothesis.

Reading and fast days did not have much influence on happiness. My sense of “productivity” as isolated from overall work satisfaction also had little influence, although there was surely a lot of collinearity between these variables, as demonstrated in a later section.

If this exercise were repeated for somebody who did not have a strong personal stake in their startup — maybe a more normal person who worked a decent but unsatisfying job to support a family (here’s lookin’ at you #FANG). I would expect their work satisfaction to be a large but less overwhelming variable. They would probably also recalibrate the “social” variable to break out family effects from social effects outside their nuclear family.

But a hypothetical straw man is not writing this article, so let’s dig into my outlier of a life. What would happen if I removed the work effects and tried to control for factors contributed to happiness outside of the 17.8 hours per day I’m focused about work. Here’s the regression without the “Biz” and “Productivity” variables:

My personal happiness formula, excluding work effects , can be roughly described as: a baseline score of 3.5 plus one point for each of the following:

  • Being social
  • Catching some rays
  • Getting a good night sleep.
  • Getting an excess of exercise (possibly)

I’d expect this general formula could be widely applicable to the people stuck in the 9-to-5 grind.

A Formula for Work Satisfaction and Productivity

For a workaholic, whose happiness is heavily derived from my work satisfaction, what factors make me happy and productive at work? We first quickly observe that my sense of productivity (“Did I get a lot done today?”) is very strongly connected with my sense of satisfaction with work (“How do I feel overall about my startup?”)

Some of these associations are curious. Then again, my unenviable social life is pretty heavily connected with work, as it consists heavily of going to business or startup oriented meetups, so it’s not a huge surprise that there would be a correlation. The heavy correlation with good weather is also counterintuitive, but I have observed that if I’m feeling frustrated with work then it is often cured by a long walk around lunchtime.

Since I have more agency over my personal productivity than I do over my overall work satisfaction, I’ll now give this heavier consideration. Are any of these other factors, which are mostly under my control, a good correlate for my productivity? This is a factor where I was continuously dissatisfied throughout the year, so it stands to reason that if I figure out a better formula for productivity I would increase my satisfaction with work and therefore my overall satisfaction. Here’s the regression:

The negative correlations here are quite curious. Using productivity as the dependent variable, I see some funny results. The most statistically significant variable here, which here is negatively correlated, is social life. Of course, when I’m busy socializing I’m not immersed in code, so this passes the sniff test. Similarly (though less significant), if I’m out enjoying the weather then I’m not coding.

It’s interesting that these are factors which correlate positively with work satisfaction and overall happiness, but they also seem to slightly subtract from productivity, which is the strongest positive correlate for work happiness. What a complex web we weave.

We also observe that exercise is a positive correlate with productivity (albeit with a .27 t-score). This is actually surprising given my habits, since getting a very high score on exercise can only really happen when I chew up most of of my waking hours on some kind of hyper-fitness (i.e., a full day spent hiking). I would ordinarily think that this would displace any time spent working, but the data actually suggest otherwise. In contrast, a low exercise score would usually be the sort of “typical” day, say the sort of day where I spend an hour and change in the gym to get my brain warmed up then get to work. Yet the data suggest that these are actually less productive days? It’s really tough to say, here is the boxplot across the spectrum if you want to draw your own conclusions:

Finally, I note that the connection between “Reading” and “Productivity” is significant, but I’d argue it’s very likely to be correlation, not causation. I’d argue that whatever combination of effects causes me to successfully sit still and read a book is the same combination of effects that causes me to sit still and crank out code.

Possible Adjustments for 2020

When I consider where I may want to tweak the data I collect heading into 2020, here is what I have come up with:

  • Perhaps break “Social” into “Social Personal” and “Social Business”, since there is some question as to whether social benefits are due to business networking (which might serve to inflate the powerful “biz” scores) and personal effects (ie family, friends, dating).
  • Similarly, it may be worth adding a “physical contact” variable, as there’s good research on how some level of physical contact contributes to happiness — given my interest in getting a dog this could yield some good data if this actually happens this year.
  • I could probably stand to pick up a non-exercise related “Hobby” that gets me offline, to see if this has any effects.

The Elusive Happiness Diet

As mentioned, the data surrounding diet was a bit rough, but given that my eating went through a few basic phases it was generally possible to tease out the major ingredients I ate on any given day. Unfortunately, it’s not been so easy to tease out any obvious trends from this data. Here’s what the correlation table looks like:

As you can see, while happiness correlated reasonably strongly with the other major variables I tracked, there was very little significant correlation with any of the other major ingredients I consumed on any given day.

The strongest correlation seems to be ice cream and productivity from back in the days when I ate ice cream. Back then I would eat desserts after I was done with work, so maybe I had a slight tendency to treat myself if I was good? I did not consider the effect of diet on productivity because I would usually tend to eat very late in the day, after I’d gotten the bulk of my work done.

There was also a slight correlation between eating red meat and being social — or in other words, I would occasionally get a burger with a friend. No real insights there. Also, I was more likely to eat salad when the weather was good — where you might observe that summer is when veggies are in season.

One quick asterisk is that “nuts” was not really included here because I ate this pretty much every day as my primary source of protein. Since this variable would always be scored as a “1” there was no way to run analysis on this, although I did move to placing higher emphasis on lower-carb nuts (ie Brazil nuts, pecans, walnuts) as the year progressed.

About halfway through the year, I cut back sugars significantly including my worst habit of ice cream. To be specific, my daily diet is currently 18% carbohydrates, which is well above what keto people would recommend (<10%) but suits me just fine. I’m now at the point where the biggest reduction I could get in carbs would be to stop eating a third of a banana per day. If trace amount of banana is what kills me, then I hope you all crack some good banana jokes at my death party (“…I’m just happy to see you depart”).

That said, with a good sample of roughly half a year with sugar and half a year without sugar, was there any observable effect? To the chagrin of the #keto folks, not really:

The boxplots of happiness broken out by whether or not I ate sugar are dead ringers for each other

You deserve better than qualitative data, so here’s a happiness diet as best as I could tease anything out.

As near as I can reckon, the best possible diet to maximize your happiness is (with a t-score of ~0.1):

Definitely:

  • Salmon
  • Ice cream

Maybe:

  • Mixed nuts? (no control data)
  • Salad? (collinearity)

I tended to eat salmon with salad, so there’s probably a lot of collinearity meaning “salmon” is really “salmon salad” and R couldn’t tease it out.

So there it is, if you want to be happy, just eat a salmon salad topped with a handful of nuts. If you were good, wash it down with ice cream. If you’ve cut out sugar like me, you can still enjoy life with the Trader Joe’s Light Chocolate Peanut Butter Ice Cream:

Happiness

--

--