Showing posts with label lifestyle. Show all posts
Showing posts with label lifestyle. Show all posts

Monday, September 23, 2019

Weight loss, moving averages, and cheating.

If you don't measure it, you can't manage it. — Old management consulting saying.

Like most people who do HIT, I track all my gym data; unlike most people who do HIT, I use fancy-pants (technical term) algorithms to analyse it. (Hey, if you gots thems, you uses thems.)


I also weigh myself almost every morning, and log the weight. But since I noticed clothes getting looser, I didn't actually analyse the weight data. There it was, in a nice .csv file, and nothing ever done to it. Not even a chart.

To be fair, when you lose 22 percent of your bodyweight in 7 months, you don't really need a chart… What?! Who are you and what have you done with Jose Silva?? Data without analysis is just wasted bits!

So, I decided to see if there was any insight there. And, lo and behold, there was.

The problem with bodyweight data is that it's too noisy. Small things, like whether you've been to the throne prior to weighing or had a few gallons of caffeine delivery liquids earlier can make your weight vary a lot. And bathroom scales, even digital ones, can be quite a bit off depending on how your weight is distributed over the platform.

One way to deal with any noisy sequence data is to take moving averages: by averaging a data point with its neighbors, idiosyncratic noise is cancelled out and only information stays. Of course that's only correct if the spectrum of the noise fits within the bandwidth of the averaging. So we simplify (in less engineering-centric terms: cheat) and filter the filtered data, or in our case, average the averages.

An average of this type in a time series is called a moving average; say we want to make a five-datapoint moving average, called MA(5). We start by averaging data points 1 through 5, that's our first result; then 2 through 6, for the second, etc. This creates a new time series, the first-order moving average MA(5). Then we take this new time series and use the same process again, which creates a second-order moving average.


(We could choose a different number of datapoints to average, but I'm staying with 5, a number I pulled out of my ars… a number that my old and trustworthy time series textbook uses as "a good starting point." Note also that these averages may be weighted averages to express a specific filtering function. We'll be using simple, or unweighted, averages.*)

For privacy, and because it's actually useful as we'll soon see, we'll plot the data normalized to the time period: in other words, the heaviest weight will map to 1 and the lightest weight to 0:


The dashed line is a linear model fit to the data in the chart (that is the second-order moving average) and it can be used as a reference for analysis. And that reference shows quite clearly that things went a bit wrong around July.

July, July… yep: due to social pressure and a few events where I had to be present, carbs were consumed, or as I like to call it, cheating on the eating rules** was potentiated by outside events. (Always blame the environment.)

Now, the use of normalized results shines when we use the quartiles: how long it took to lose the first 25 percent of the weight, the second, the third, etc:


And this shows what the cost of cheating was: lost time in the weight loss progression. Because of the cheating, there was a delay of about seven weeks to return to the trend.

As a result, I just threw out my last rice cakes. What am I doing eating carbs? If the general idea underlying fat loss is to have the body burn it for energy, there's no [nutrition] point in eating carbs, whose only nutrition function is as energy.

I didn't know about those lost seven weeks until I run this simple data analysis. Now I adhere to my eating rules more closely, seeing what a waste of time it was to cheat. Quantitatively, not qualitatively.

Data without analysis is just a waste of bits.

- - - - - - -

* Since we're using unweighted averages, we could have simply turned that second-order process into a first-order weighted process. (You can always do this, minus the "simply" in the first sentence.) It's easy to see that the second-order MA(5,5) above is equivalent to a first-order MA(9) with weights
\[
   [0.04,0.08,0.12,0.16,0.2,0.16,0.12,0.08,0.04],
\] which is a triangular smoothing function. If we wanted to be fancy about it, we'd use Gaussian kernels with support over the full data set and variable bandwidth, and tweak said bandwidth just enough to get rid of unsightly noise in the data. Yes, by eye… or using information criteria, if we were really really overthinking a simple weight loss analysis.


** The eating rules, derived from P.D. Mangan and Ted Naiman, MD:

1. Eat only when hungry, not peckish or bored. This usually means around 18 hours of fasting daily, for me. Sometimes I eat only one meal in a day (OMAD), though usually I eat two, one of which is a protein shake or Greek yogurt mixed with protein powder.

2. When hungry eat protein (in the culinary sense: meat, fish, eggs, mostly; Greek yogurt with whey protein supplements on occasion, protein shakes when 'needs must'), minimize added fat, and avoid all carbs. Don't count calories or macros or any other pretend-science metric; those only lead you astray.

3. Cheat only at Michelin-starred restaurants and only on someone else's expense account. (This rule is my personal addition. These occasional gourmet cheats are enough to keep life interesting, gastronomically speaking. As for the someone else's expense account, I use mine for important things, like computers, software, and books, not hospitality.)

These worked for me, because they solve the only problem that really matters in fat loss: they're easy to adhere to; note how I'm never hungry for long, as when I'm hungry — and only then — I eat.

Thursday, September 8, 2016

Multitasking at the gym



Powerlifting and other training (including conditioning) are not multi-taskable. It's very important to keep one's concentration and focus on the exercise. I cringe when I see people talking with each other while moving metal. Even during warm-up sets; perhaps especially during warm-up sets, when the low weight allows one to do a preflighting of the movement, check for any anomalies in mobility or weak or sore prime movers or stabilizers.

When walking short distances, cooking, or doing housework, I tend to listen to podcasts or sometimes to the audiotrack of YouTube hangouts (basically the equivalent of radio's Morning Zoo). These are ways to get some low-density information into the brainpan without distracting too much from the errands. (I also listen to podcasts on shared transportation, like shuttles. Too much entropy for anything else.)

Some podcasts I listen to (there are more; I usually only listen to a few episodes a week):


(Yes, I have a significant déformation professionelle.)

When I go for a real walk, what I call a walk-n-think, I typically listen to music, not any sources of information. The point is to think and clear the cobwebs of my mind. I find the Baroque a particularly good cobweb-solvent period. Here's a walk-n-think with a side-trip to exchange books at the SFPL:

Walk SF January 30, 2016

Once in a repetitive-motion machine in the gym, for oxygenation not conditioning purposes, the main determinant of the type of content is the movement of the head, in particular the eyes.

When walking on treadmills (my preferred cool-down approach) or rowing on a machine (which for me is real exercise, but of form and rhythm, not muscle), the head moves too much to fix the eyes on a screen; as the activity itself requires less attention than the errands, freeing attention for content, my choices of media are audio lectures and audio books.

(I only run on treadmills for High-Intensity Interval Training, which is conditioning, which means it cannot be multitasked. When doing anything that stresses the body, I always want 100% of the attention to be on the exercise. I have this strange desire to avoid injury, ridicule, and absence of gains; sort of the philosophical opposite of CrossFit.)

I should clarify that I'm using "lecture" to mean all sorts of purposeful speeches, not just university lectures. I do have a number of these speeches and lectures which work out well, many of them extracted from videos of talks where there were no significant visuals (or the visuals were the dreaded "power points," which are speaker's notes not audience-centered visuals).

As for audiobooks, I've been a Platinum member of Audible for fifteen years, which means I have two new books per month, which I complement by filling up on the seasonal sales and the occasional extra purchase.

Here are a few of my latest Audible purchases:



 On average I listen to around 30 audiobooks per year, some of which are re-listens.

(Yes, I re-read and re-listen to books. There are some books I read pretty much every year… Waugh, Wilde, and Wodehouse; certain Poirots and Maigrets; a few favorite Discworld pieces. There are 1000-page books I read every year, though that's just Anathem. And Cryptonomicon. And Reamde. And Seveneves, now on its second year. Guess who my favorite living author is.)

For other machines, like elliptical runners, stairclimbers, and exercise bicycles, the head doesn't move, so it's feasible to use the eyes. My old-but-trusted iPad 1.0 has seen this gym duty pretty much from the first day I bought it, which was the day it came out. (100% impulse purchase, as I was coming back from brunch and passed an Apple Store.)

Though in the past I've read books (paper books), journals (academic magazines), and magazines on paper on these machines, and have evolved to read electronic versions of these, I find that I prefer to give the eyes a break by letting them watch video instead of processing written words. I tend to watch lectures (again including speeches, but in this case a lot more real lectures) on the elliptical and the stairclimber, and to read books (ebooks with large type) only on the exercycle.

(Basically I use elliptical, exercycle, and stairclimbers in my building exercise room. It's not a "gym event," rather a "I need to take a break and instead of vegetating in front of the TV, which I no longer have service for, I can go do some movement while imbibing some basic knowledge.)

I keep a Rite-in-the-rain notebook and a Fisher space pen nearby in case I want to make notes, something that confuses other users of our exercise room. And that others have started to copy.

I hasten to point out that despite the déformation professionelle mentioned above, I tend to think of these books and lectures as leisure, so I keep them broadly within my areas of interest but not focussed on my actual area of work. For example, here are a few courses that I've enjoyed on the elliptical machines in the exercise room:









It's worth mentioning that real intellectual work cannot be multitasked, as indicated by the position of textbooks and research papers in the diagram. Anytime I'm looking to learn something, that requires dedicated attention, note-taking, and a block of dedicated time.

I don't mean work-related textbooks (though american textbook prices do their darndest to discourage the intellectually curious from serious study) or research papers (ditto with the gating, but public libraries and authors' own webpages are a good workaround), but even when I'm trying to learn something, say geology, our of pure curiosity, reading textbooks and research papers has been a much better experience than the materials that now pass for science popularization.

(My opinion on the decline of science popularization is well established in this blog.)

One thing I used to do at the gym (the real big gym, not the exercise room and not the powerlifting gym I occasionally go to instead of driving to the big gym) and eventually stopped due to social pressure, was to watch FoodTV network on the gym TV while cooling down on a treadmill or an elliptical, after 90-120 minutes of iron and conditioning. For some reason, those whose entire workout is 30 min of slow walking on the elliptical (what I call a Potemkin workout, still better than Planet Fatness or CrossFit) were not happy with my selection of programming.

Go figure.

Sunday, April 22, 2012

Counterintuitive solution for being a late chronotype

Hi. I'm Joe and I'm a late chronotype.

A late chronotype is someone whose energy level, after waking up, increases more slowly than than the average person's; also known as "not a morning person." Typically this slow start is balanced by high levels of energy in the evening, when other people are crashing. (Panel I below depicts this for illustration.)

Mismatching Chronotypes

Many late chronotypes believe that the solution to their problem is to sleep late. That is exactly the wrong approach. The problem of being a late chronotype is that our level of energy doesn't match everyone else's. Starting the day later only increases the problem (as illustrated in panel II).

The solution, which may sound counter-intuitive, is to get up much earlier than everyone else, therefore reaching peak energy at the same time as everyone else (as shown in panel III).

I have used a number of approaches to manage being a late chronotype (caffeine, no breakfast, exercise, ice-cold morning shower), but none was ever as effective as being on Boston time while living in California.

Tuesday, November 1, 2011

Less

I found a magic word and it's "less."

On September 27, 2011, I decided to run a lifestyle experiment. Nothing radical, just a month of no non-essential purchases, the month of October 2011. These are the lessons from that experiment.


Separate need, want, and like

One of the clearest distinctions a "no non-essential purchases" experiment required me to make was the split between essential and non-essential.

Things like food, rent, utilities, gym membership, Audible, and Netflix I categorized as essential, or needs. The first three for obvious reasons, the last three because the hassle of suspending them wasn't worth the savings.

A second category of purchases under consideration was wants, things that I felt that I needed but could postpone the purchase until the end of the month. This included things like Steve Jobs's biography, for example. I just collected these in the Amazon wish list.

A third category was likes. Likes were things that I wanted to have but knew that I could easily live without them. (Jobs's biography doesn't fall into this category, as anyone who wants to discuss the new economy seriously has to read it. It's a requirement of my work, as far as I am concerned.) I placed these in the Amazon wish list as well.

Over time, some things that I perceived as needs were revealed as simply wants or even likes. And many wants ended up as likes. This means that just by delaying the decision to purchase for some time I made better decisions.

This doesn't mean that I won't buy something because I like it (I do have a large collection of music, art, photography, history, science, and science fiction books, all of which are not strictly necessary). What it means is that the decision to buy something is moderated by the preliminary categorization into these three levels of priority.

A corollary of this distinction is that it allows me to focus on what is really important in the activities that I engage in. I summarized some results in the following table (click for bigger):

Misplaced priorities (image for blog post)

One of the regularities of this table is that the entries in the middle column (things that are wrongly emphasized) tend to be things that are bought, while entries in the last column (what really matters) tend to be things that are learned or experienced.


Correct accounting focusses on time, not on nominal money

Ok, so I can figure out a way to spend less in things that are not that necessary. Why is this a source of happiness?

Because money to spend costs time and I don't even get all the money.

When I spend one hour working a challenging technical marketing problem for my own enjoyment, I get the full benefit of that one hour of work, in the happiness solving a puzzle always brings me. When I work for one hour on something that I'd rather not be doing for a payment of X dollars, I get to keep about half of those X dollars (when everything is accounted for). I wrote an illustration of this some time ago.

In essence, money to spend comes, at least partially from doing things you'd rather not do, or doing them at times when you'd rather be doing something else, or doing them at locations that you'd rather not travel to. I like the teaching and research parts of my job, but there are many other parts that I do because it's the job. I'm lucky in that I like my job; but even so I don't like all the activities it involves.

The less money I need, the fewer additional things I have to do for money. And, interestingly, the higher my price for doing those things. (If my marginal utility of money is lower, you need to pay more for me to incur the disutility of teaching that 6-9AM on-location exec-ed seminar than you'd have to pay to a alternate version of me that really wants money to buy the latest glued "designer" suit.)


Clarity of purpose, not simply frugality, is the key aspect

I'm actually quite frugal, having never acquired the costly luxury items of a wife and children, but the lessons here are not about frugality, rather about clarity of purpose.

I have a $\$$2000 17mm ultra-wide angle tilt-shift lens on my wishlist, as a want. I do want to buy it, though I don't need it for now. Once I'm convinced that the lens on the camera, rather than my skills as a photographer, is the binding constraint in my photography, I plan to buy the lens. (Given the low speed at which my photography skill is improving, this may be a non-issue. ☺)

Many of our decisions are driven by underlying identity or symbolic reasons; other decisions are driven by narrowly framed problems; some decisions are just herd behavior or influenced by information cascades that overwhelm reasonable criteria; others still are purely hedonic, in-the-moment, impulses. Clarity of purpose avoids all these. I ask:

Why am I doing this, really?

I was surprised at how many times the answer was "erm...I don't know," "isn't everybody?" or infinitely worse "to impress X." These were not reasonable criteria for a decision. (Note that this is not just about purchase decisions, it's about all sorts of little decisions one makes every day, which deplete our wallets but also our energy, time, and patience.)

Clarity of purpose is hard to achieve during normal working hours, shopping, or the multiple activities that constitute a lifestyle. Borrowing some tools designed for lifestyle marketing, I have a simple way to do a "personal lifestyle review" using the real person "me" as the persona used in lifestyle marketing analysis. Adapted from the theory, it is:

1. Create a comprehensive list of stuff (not just material possessions, but relationships, work that is pending, even persons in one's life).

2. Associate the each entry in the stuff to a sub-persona (for non-marketers this means to a part of the lifestyle that is more or less independent of the others).

3. For each sub-persona, determine the activities which have given origin to the stuff.

4. Evaluate the activities using the "clarity of purpose" criterion: why am I doing this?

5. Purge the activities that are purely symbolic and those that were adopted for hedonic reasons but do not provide the hedonic rewards associated with their cost (in money, constraints to life, time, etc), plus any functional activities that are no longer operative.

6. Guide life decisions by the activities that survive the purge. Revise criteria only by undergoing a lifestyle review process, not by spur-of-the-moment impulses.

(This procedure is offered with no guarantees whatsoever; marketers may recognize the underlying structure from lifestyle marketing frameworks with all the consumer decisions reversed.)


Less. It works for me.


A final, cautionary thought: if the ideas I wrote here were widely adopted, most economies would crash. But I don't think there's any serious risk of that.