Skip to content
Impact of Coffee on Productivity
Share
Explore

Impact of Coffee on Productivity

Results from a self-experiment.
Published:
June 25, 2021
Experimenter:
Noah MacCallum
Hypothesis:
Coffee consumption will improve productivity and alertness.

Interested in running your own self-experiment?
Sign Up

Summary

Caffeine is the world’s most popular drug. While it’s generally acknowledged that coffee helps with productivity and alertness, I’ve felt that I’m productive even on days without it. Coffee also has potential downsides, like increased anxiety and disrupted sleep quality. As a habitual coffee drinker, I wanted to investigate whether the pros outweighed the cons and learn more about how it was impacting me as an individual, rather than trusting studies that simply apply to population averages.

After running an “n of 1” trial on myself to investigate, I found a small improvement in productivity, a (surprising) improvement in anxiety and stress, and no impact in alertness, or sleep quality.

Input
Outcome
Effect
Coffee Consumption
12
Productivity

0-3 hr vs. 6+ hr from consuming coffee
+9%
Heart Rate Variability (HRV)
+40%
Garmin Stress Score
-20%
Anxiety
-23%
Resting Heart Rate (RHR)
-6%
Work Efficiency
-6%
Stress
No Significant Change
Work Volume
No Significant Change
Alertness
No Significant Change
Sleep Duration
No Significant Change
Sleep Quality
No Significant Change
Wakefulness
No Significant Change
Meditation Time
2
Alertness
Significant Increase
Productivity
Significant Increase

Methods

I did an “n of 1 trial” on myself, in which I abstained from coffee for one week and consumed it liberally for the next, tracking the differences in a variety of outcome measurements. The primary outcomes I was interested in were self-reported productivity, alertness, and working efficiency, as well as overall volume of hours worked each day, in addition to some other self-reported and wearable metrics. I also tracked input variables that could impact productivity. This includes the amount of coffee, exercise, meditation, sleep, and others. Data was collected via survey that was automatically sent via SMS 7x/day.

image.png

Results

Start: June 6, 2021
End: June 18, 2021
Number of Samples: 100


Raw Data

image.png
Plots outlining all variables measured throughout the study. All variables generally fluctuated throughout the experiment, except for coffee consumption, which was consumed only in the second week.

Most variables varied significantly throughout the study. Some trends are apparent from simply comparing the first and second weeks. Productivity didn’t vary much, which itself is an initial indicator of future results. Next, treating every day as independent (which is a bold claim for time series data), we can observe correlations between each pair of variable.


image.png
Correlations between all measured variables. Note that this does not display significance, only degree of positive or negative association. Higher numbers mean the two variables tend to increase together. Observe the bottom row to see the correlation with coffee.

We can sort these associations by strength and filter for only those that are statistically significant. Note that these effects sizes can be amplified by covariates, which aren’t yet controlled for.

Input
Output
Correlation
Statistical Significance
1
coffee_cups
heart_rate_variability
0.653
Significant (p<0.05)
2
coffee_cups
stress
-0.55
Significant (p<0.05)
3
coffee_cups
anxiety
-0.616
Significant (p<0.05)
4
coffee_cups
stress_score
-0.636
Significant (p<0.05)
5
coffee_cups
resting_heart_rate
-0.824
Very Significant (p<0.001)
6
family_stress
stress
0.774
Significant (p<0.05)
7
family_stress
productivity
-0.574
Significant (p<0.05)
8
family_stress
heart_rate_variability
-0.738
Significant (p<0.05)
9
meditation_time_mins
alertness
0.647
Significant (p<0.05)
10
meditation_time_mins
productivity
0.554
Significant (p<0.05)
11
meditation_time_mins
work_efficiency
0.533
Borderline Significant (p<0.1)
12
meditation_time_mins
wakefulness
0.514
Borderline Significant (p<0.1)
13
sleep_duration_hr
work_efficiency
0.498
Borderline Significant (p<0.1)
14
sleep_quality
work_efficiency
-0.465
Borderline Significant (p<0.1)
15
workout_relative_effort
work_efficiency
-0.499
Borderline Significant (p<0.1)
There are no rows in this table

Top linear associations between input and output variables, with significance. Note that this doesn’t control for covariates.

This provides some interesting initial information, but looking at the level of an entire day could be obscuring some of the transient effects of coffee.

Does Productivity Peak Right After Coffee?


image.png
Distribution of productivity scores relative to when coffee was consumed.

It appears that the mean productivity score is higher right after drinking coffee. Is the change statistically significant?

Measure
Time Since Coffee (A)
Time Since Coffee (B)
Relative Impact
Statistical Significance
1
productivity
0-3 hr
3-6 hr
-2.3%
Not Significant
2
productivity
0-3 hr
6+ hr
-8.9%
Significant (p<0.05)
3
productivity
3-6 hr
6+ hr
-6.7%
Not Significant
There are no rows in this table
The productivity within 3 hours of drinking coffee is 9% higher than it is 6+ hours afterwards, with statistical significance.

Causal Effects of Coffee Consumption

In order to determine causality over time, we need to account for natural oscillations in the data and the effects of the other covariates. We can build a model (in this case, a bayesian structural time-series) from the period without coffee, simulate what
would have
happened throughout the period with coffee, and compare to what
actually happened
in the coffee-drinking period. If we see a significant difference between the two, we can say coffee had a causal impact on that variable.

Outcome
Relative Effect
Statistical Significance
1
heart_rate_variability
40.1%
Very Significant (p<0.001)
2
productivity
4.5%
Not Significant
3
wakefulness
2.2%
Not Significant
4
alertness
-0.0%
Not Significant
5
sleep_quality
-2.0%
Not Significant
6
work_efficiency
-5.8%
Significant (p<0.05)
7
resting_heart_rate
-5.9%
Very Significant (p<0.001)
8
work_volume_hr
-7.0%
Not Significant
9
sleep_duration_hr
-7.7%
Not Significant
10
stress_score
-20.3%
Very Significant (p<0.001)
11
stress
-21.4%
Not Significant
12
anxiety
-23.0%
Very Significant (p<0.001)
There are no rows in this table
Covariates for all but: Workout Intensity, Family Stress, Meditation Time, Sleep Duration, Sleep Quality. To estimate sleep quality and duration they were removed as covariates.

image.png
Bayesian structural time-series (BSTS) estimation of heart rate variability during the treatment period. Without coffee the model estimates it would have been within the purple line, while the observed values were much higher.

image.png
BSTS estimation for Productivity, which was not statistically significantly different.

image.png
BSTS estimation for Anxiety, which was statistically significantly different.

Conclusion

Overall I found this to be a very useful exercise. I became much more actively engaged in my health, and the desire to learn new things motivated me to stick to the plan and complete all of my check-ins.

Also, the process of regularly checking in and observing how I’m feeling provided more general awareness of my state of well being. This awareness also provided more intuitive sensitivity to the impact of various interventions; for example, the clarity and awareness that came from meditation was more apparent, and this led to me wanting to meditate longer and more frequently, which indeed was shown to be associated with a significant increase in both alertness and productivity. Note that this
shouldn’t
impact the conclusions of the study since we can track the impact of meditation both with and without the coffee.

I found the impact of coffee is more positive than negative, so I will continue to have a cup in the mornings, but I’ll avoid its compulsive use as a crutch to do better work. I’m also skeptical of the benefits of coffee on HRV, since I exercised a lot the previous week and it was likely due to physical adaptation to that stress. Looking ahead, I’ll lean more heavily on meditation as a mechanism for improving my productivity, as well as enjoying the other benefits.

With regards to format, this self-expeirment went smoothly. Surveys were quick to answer, and two weeks passed by quickly. The format, and subsequent analysis, can be easily adapted to new experiments in the future. I’m excited to keep trying things and seeing what works and what doesn’t.

Thanks to Blake Arnold for the help with analysis.

Interested in running your own self-experiment? We’ll help you design your protocol, collect the right data, keep you motivated, and provide similar analysis and insights at the end.

Sign Up

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.