Alcohol, dinner time and sleep

A couple of months back, I presented what I now realise is a piece of bad data analysis. At the outset, there is nothing special about this – I present bad data analysis all the time at work. In fact, I may even argue that as a head of Data Science and BI, I’m entitled to do this. Anyway, this is not about work.

In that piece, I had looked at some of the data I’ve been diligently collecting about myself for over a year, correlated it with the data collected through my Apple Watch, and found a correlation that on days I drank alcohol, my sleeping heart rate average was higher.

And so I had concluded that alcohol is bad for me. Then again, I’m an experimenter so I didn’t let that stop me from having alcohol altogether. In fact, if I look at my data, the frequency of having alcohol actually went up after my previous blog post, though for a very different reason.

However, having written this blog post, every time I drank, I would check my sleeping heart rate the next day. Most days it seemed “normal”. No spike due to the alcohol. I decided it merited more investigation – which I finished yesterday.

First, the anecdotal evidence – what kind of alcohol I have matters. Wine and scotch have very little impact on my sleep or heart rate (last year with my Ultrahuman patch I’d figured that they had very little impact on blood sugar as well). Beer, on the other hand, has a significant (negative) impact on heart rate (I normally don’t drink anything else).

Unfortunately this data point (what kind of alcohol I drank or how much I drank) I don’t capture in my daily log. So it is impossible to analyse it scientifically.

Anecdotally I started noticing another thing – all the big spikes I had reported in my previous blogpost on the topic were on days when I kept drinking (usually with others) and then had dinner very late. Could late dinner be the cause of my elevated heart rate? Again, in the days after my previous blogpost, I would notice that late dinners would lead to elevated sleeping heart rates  (even if I hadn’t had alcohol that day). Looking at my nightly heart rate graph, I could see that the heart rate on these days would be elevated in the early part of my sleep.

The good news is this (dinner time) is a data point I regularly capture. So when I finally got down to revisiting the analysis yesterday, I had a LOT of data to work with. I won’t go into the intricacies of the analysis (and all the negative results) here. But here are the key insights.

If I regress my resting heart rate against the binary of whether I had alcohol the previous day, I get a significant regression, with a R^2 of 6.1% (i.e. whether I had alcohol the previous day or not explains 6.1% of the variance in my sleeping heart rate). If I have had alcohol the previous day, my sleeping heart rate is higher by about 2 beats per minute on average.

Call:
lm(formula = HR ~ Alcohol, data = .)

Residuals:
    Min      1Q  Median      3Q     Max 
-9.6523 -2.6349 -0.3849  2.0314 17.5477 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  69.4849     0.3843 180.793  < 2e-16 ***
AlcoholYes    2.1674     0.6234   3.477 0.000645 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.957 on 169 degrees of freedom
Multiple R-squared:  0.06676,   Adjusted R-squared:  0.06123 
F-statistic: 12.09 on 1 and 169 DF,  p-value: 0.000645

Then I regressed my resting heart rate on dinner time (expressed in hours) alone. Again a significant regression but with a much higher R^2 of 9.7%. So what time I have dinner explains a lot more of the variance in my resting heart rate than whether I’ve had alcohol. And each hour later I have my dinner, my sleeping heart rate that night goes up by 0.8 bpm.

Call:
lm(formula = HR ~ Dinner, data = .)

Residuals:
    Min      1Q  Median      3Q     Max 
-7.6047 -2.4551 -0.0042  2.0453 16.7891 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  54.7719     3.5540  15.411  < 2e-16 ***
Dinner        0.8018     0.1828   4.387 2.02e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.881 on 169 degrees of freedom
Multiple R-squared:  0.1022,    Adjusted R-squared:  0.09693 
F-statistic: 19.25 on 1 and 169 DF,  p-value: 2.017e-05

Finally, for the sake of completeness, I regressed with both. The interesting thing is the adjusted R^2 pretty much added up – giving me > 16% now (so effectively the two (dinner time and alcohol) are uncorrelated). The coefficients are pretty much the same once again.

Call:
lm(formula = HR ~ Dinner, data = .)

Residuals:
    Min      1Q  Median      3Q     Max 
-7.6047 -2.4551 -0.0042  2.0453 16.7891 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  54.7719     3.5540  15.411  < 2e-16 ***
Dinner        0.8018     0.1828   4.387 2.02e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.881 on 169 degrees of freedom
Multiple R-squared:  0.1022,    Adjusted R-squared:  0.09693 
F-statistic: 19.25 on 1 and 169 DF,  p-value: 2.017e-05

So the takeaway is simple – alcohol might be okay, but have dinner at my regular time (~ 6pm). Also – if I’m going out drinking, I better finish my dinner and go. And no – having beer won’t work – it is going to be another dinner in itself. So stick to wine or scotch.

I must mention things I analysed against and didn’t find significant – whether I have coffee, what time I sleep, the time gap between dinner time and sleep time – all of these have no impact on my resting heart rate. All that matters is alcohol and when I have dinner.

And the last one is something I should never compromise on.

 

 

 

Alcohol and sleep

A few months back we’d seen this documentary on Netflix (I THINK) on the effects of alcohol on health. Like you would expect from a well-made documentary (rather than a polemic), the results were inconclusive. There were a few mildly positive effects, some negative effects, some indicators on how alcohol can harm your health, etc.

However, the one thing I remember from that documentary is about alcohol’s effect on sleep – that drinking makes you sleep worse (contrary to popular imagination where you can easily pass out if you drink a lot). And I have now managed to validate that for myself using data.

The more perceptive of you might know that I log my life. I have a spreadsheet where every day I record some vital statistics (sleep and meal times, anxiety, quality of work, etc. etc.). For the last three months I’ve also had an Apple Watch, which makes its own recordings of its vital statistics.

Until this morning these two data sets had been disjoint – until I noticed an interesting pattern in my average sleeping heart rate. And then I decided to join them and do some analysis. A time series to start:

Notice the three big spikes in recent times. And they only seem to be getting higher (I’ll come to that in a bit).

And then sometimes a time series doesn’t do justice to patterns – absent the three recent big spikes it’s hard to see from this graph if alcohol has an impact on sleep heart rate. This is where a boxplot can help.

The difference is evident here – when I have alcohol, my heart rate during sleep is much higher, which means I don’t rest as well.

That said, like everything else in the world, it is not binary. Go back to the time series and see – I’ve had alcohol fairly often in this time period but my heart rate hasn’t spiked as much on all days. This is where quantity of alcohol comes in.

Most days when I drink, it’s largely by myself at home. A glass or two of either single malt or wine. And the impact on sleep is only marginal. So far so good.

On 26th, a few colleagues had come home. We all drank Talisker. I had far more than I normally have. And so my heart rate spiked (79). And then on June 1st, I took my team out to Arbor. Pretty much for the first time in 2022 I was drinking beer. I drank a fair bit. 84.

And then on Saturday I went for a colleague’s birthday party. There were only cocktails. I drank lots of rum and coke (I almost never drink rum). 89.

My usual drinking, if you see, doesn’t impact my health that much. But big drinking is big problem, especially if it’s a kind of alcohol I don’t normally drink.

Now, in the interest of experimentation, one of these days I need to have lots of wine and see how I sleep!

PS: FWIW Sleeping heart rate is uncorrelated with how much coffee I have

PS2: Another time I wrote about alcohol

PS3: Maybe in my daily log I need to convert the alcohol column from binary to numeric (and record the number of units of alcohol I drink)

 

The Wife’s Methods

During a particularly acrimonious fight last night, I found that I was losing myself, and had no clue what was happening. Tempers were frayed, voices were raised and a huge towel had become wet from our collective tears and nose-goo. And I was fighting a losing battle, against myself. It seemed like I was consuming myself, and there was no way out.

I walked up to the kitchen and pulled out two New York shot glasses from the shelf. I reached for the top shelf, where we store the stuff, and pulled out the Talisker bottle. And I filled the shot glasses, up to the brim, and we downed it, one glass each. Soon, it seemed like all was going to be fine with the world.

At once we calmed down. We started thinking more rationally now. The fight continued, but the voices got lowered, the collective discharge into the towel ebbed. We weren’t consumed by ourselves any more. Instead, we were now calmly talking to each other, trying to find a way out of the problem we had at hand. Note that we didn’t kiss-and-make-up-and-bury-the-fight like we used to earlier. We didn’t sleep until we’d finished our business and reached an agreement. But life had become so much better.

I must admit that over the last year or more, I’ve consistently underestimated the wife (earlier the girlfriend) and her methods. Sometimes I’ve never understood why she does things in a certain way (and expects me to do things the same way), at other times I’ve been too arrogant in my own thoughts, to give her methods a fair hearing. This was yet another such example.

It was I who had made an irrational decision that Talisker was meant for slow sipping and savouring. It was I who had thought it was “too expensive to be shot down”. And it was I who had made the wife promise she won’t gulp it down before buying the current bottle of Talsker. I admit it, I was wrong. Wrong. The wife, it turns out, had always been right.

Mahabharata at home

I was Parikshit. I was peacefully reclining on my bean bag and watching football when an ant that had been crawling on the floor decided to attack me. Like its cousin Takshak, it bit my foot so hard that that I was screaming in pain. Unlike Parikshit, though, I didn’t die. I instead turned into Janamejaya.

For this vile act of this one ant, I decided to put an end to the entire ant race. Unlike Janamejaya, I didn’t bother with trivialities such as conducting a yagna, feeding mongooses, reciting the Mahabharata and stuff. I immediately swung into action, with a Mortein Gold bottle in hand. I sprayed the liquid liberally on the line of ants that was walking across my living room, on the carpet, on the kitchen shelf even. I sprayed Mortein with a vengeance, in an attempt to put an end to the ant race. Massacre did happen.

That night I couldn’t sleep so well. I still can’t yet decide if it was because of the pain of the ant bite, or because of the sin I committed by murdering so many innocent ants. Maybe reading the Mahabharata once again will help me get rid of this sin.

Jet Lag And Other Stories

A couple of months back, Bryan Caplan had written:

1. Jet lag. What’s the best way to cope with jet lag?  Most people sleep on the plane, then gradually adjust to the local time once they reach their destination.  The problem: It often takes a week for people to get a decent night’s sleep.  By the time they’re feeling themselves again, they’re almost ready to go home.

My alternative: Do not sleep on the plane.  At all.  When you arrive, do not sleep – at all – until a locally normal bedtime.  Pay the fixed cost without cheating.  When you wake up eight to ten hours later, you will be refreshed and in sync with your new time zone.  In exchange for less than a day of sleep deprivation, you will feel fine for the rest of your trip.

So I  decided to practically test out his advice. When I was flying in to New York over the weekend, I took a conscious decision to not sleep on the flight beyond 7 am New York time. It was hard, and I had to watch drivel such as Sankat City in order to keep myself awake, but after a day of work in New York, I think it is working well. It’s hardly 10pm and I’m feeling insanely sleepy now but I suppose this can be classified as “normal” sleeping time itself.

I also saw Kaminey on the flight. Extremely well-made movie, and the lack of length helps. And I finished reading Jonathan Wilson’s Inverting the Pyramid also during the flight.

New York city is insanely cold, and windy! It is ar eally scary experience wehn the wind hits your face, and there is the chance that your nose might just break and fall off ! When i had gone for dinner last night, I ended up running backwards! Only to save my face from being hit by the wind. Thankfully today the weather was better and I managed to roam for a bit after work.

I hope to update this blog more frequently while I’m here in New York. And doo read all of Bryan Caplan’s article.

The Theory of Consistent Fuckability and Ladders for Men

Ok so the popular Ladder Theory states that men have only one ladder. It states that all men want to sleep with all women, and they simply rank every woman on the scale of how badly they want to sleep with her or whatever. Women, on the other hand, have two ladders – the “good” ladder, and the “friends” ladder, which allows them to get close to men without harbouring any romantic/sexual thoughts. Since men are incapable of exhibiting such behaviour, you get the concept of Gay Best Friend.

However, this absence of dual ladders for men exists only if you look at the short term. If you are a man and you are looking for a long-term relationship with genetic propagation as a part of your plans, I argue that the female twin ladders can be suitably modified in order to separate out “friends” from potential “bladees”. In order to aid this, I present the Theory of Consistent Fuckability.

From the ladder theory, we know that every man wants to sleep with every woman. For a fruitful, long-term, gene-propagating relationship, however, this is just a necessary but not sufficient condition. As I had argued in another post, given that divorce is usually messy, the biggest cost in getting married to someone is the opportunity cost of getting into long-term relationships with the rest of the population. And if you are involved in gene-propagation, it is ideal if neither of the propagators cheats on the partner – from the point of view of the child’s upbringging and all such jazz.

So if you are a man and you want to marry someone, you must be reasonably sure that you want to sleep with her on a consistent basis. You should be willing to do her every day. If not, there is a good chance that you might want to cheat on her at a later date, which is not ideal from your genes’ point of view.

A small digresssion here. You might ask what might happen to “ugly” women (basically women considered unattractive by a large section of men). However, the argument is that the market helps you find your niche. For example, if you want to cheat on a woman, there must be other women who are superior (on your scale) to this woman who want you to do them. Assuming that I am extremely unattractive and the fact that not too many “attractive” women will want to do me, I should be able to set my “consistent fuckability standard” appropriately.

Returning to the point, when you are evaluating a woman for MARRIAGE (note it doens’t apply to shorter term non-gene-propagating relationships), you will need to decide if you will want to have sex with her on a consistent basis. And based on the answer to this question, you can define the universe of all women into two – those that you want to do consistently and those that don’t. And they form your two ladders.

Now, reasonably independent (maybe there’s a positive low correlation on one of the ladders) of this consistent fuckability factor, you can evaluate the women on other factors such as emotional compatibility, strengths, weaknesses, culture fit and all that jazz. And rank them on those. And then use this distinction on the consistency factor and you will have your two ladders. So you have the “friends” ladder – which is differnet from the friends’ ladders of women in the sense that you want to sleep with them but not on a consistent basis. And there is the “good” ladder of those who you want to do consistently.

To summarize, consistent fuckability is a necessary but not sufficient condition for a fruitful, multiplicative, gene-propagating long-term relationship; and because of this, under certain circumstances, men also develop a pair of ladders.

Currently listening to: When I’m Sixty Four, The Beatles

Discrete and continuous jobs

Earlier today, while contributing to a spectacular discussion about ambition on a mailing list that I’m part of, I realized that my CV basically translates to spectacular performance in entrance exams and certain other competitive exams, and not much otherwise. This made me think of the concept of a “discrete job” – where you are evaluated based on work that you do at certain discrete points in time, as opposed to a continuous job where you are evaluated based on all the work that you do all the time.

A good example of a discrete job is that of a sportsman. Yes, a sportsman needs to work hard all the time and train well and all that, but the point is that his performance is essentially evaluated based on his performance on the day of the game. His performance on these “big days” matter significantly more than his performance on non-match days. So you can have people like Ledley King who are unable to train (because of weak knees) but are still highly valued because they can play a damn good game when it matters.

In fact any performing artist does a “discrete” job. If you are an actor, you need to do well on the day of your play, and off-days during non-performing days can be easily forgiven. Similarly for a musician and so forth.

Now the advantage of a “discrete” job is that you can conserve your energies for the big occasion. You can afford the occasional slip-up during non-performing days but as long as you do a good job on the performing days you are fine. On the other hand, if you are in a continuous job, off-days cost so much more, and you will need to divide your energies across each day.

If you are of the types that builds up a frenzy and thulps for short period of time and then goes back to “sleep” (I think I fall under this category), doing a continuous job is extremely difficult. The only way that it can be managed is through aggregation – never giving close deadlines so that you can compensate for the off-day by having a high-work day somewhere close to it. But not every job allows you the luxury of aggregation, so problem are there.

Now, my challenge is to find a discrete job in the kind of stuff that I want to do (broadly quant analysis). And maybe give that a shot. So far I’ve been mostly involved in continuous jobs, and am clearly not doing very well in that. And given my track record in important examinaitons, it is likely I’ll do better in a discrete job. Now to find one of those..