Thursday, January 9, 2014

New Year's Resolutions for 2014

The following are my non-software engineering related goals for 2014, along with probability estimates for each:

1.) Earn the compostela by walking the Way of Saint James. P(1) = 50%

2.) Complete the Spanish skill tree on Duolingo. P(2) = 60%

3.) Read 12 books. P(3) = 80%

Tuesday, December 31, 2013

2013 in Review

Last year, I made 7 goals as my New Year's resolution. You can find the results here, here, here, here, here, here, and here (and the conjunction here). That is only a 29% success rate. I attribute this low rate more to unanticipated value shift (mostly caused by the birth of my son) than to picking overly difficult goals. On the bright side, my calibration still appears to be pretty good at 50/50, 62/60, 75/70, 81/80, 95/90, and 96/100.

Tuesday, January 1, 2013

New Year's Resolutions: A Numerical Estimate

In 2012, I accomplished a mere 37% of my goals for the year. I didn't bother estimating the likelihood of each, but, if I remember correctly, I believed I was going to achieve at least most of them. This year is (probably) going to be different. Not in the sense that I will accomplish all my goals (after all, if I can do all of them, then they were too easy), but in the sense that I will actually know afterwards how good I am at predicting my own behavior over the span of a year. Also, according to a 2007 study by Richard Wisemen, making your resolutions public increases the chance you will complete them (although, the effect is larger for females). The following are my goals for 2013, along with probability estimates for each:

1.) My company will double its number of clients before 2014. P(1) = 55%

2.) I will perform 1 set of 25 standard pull-ups and 1 set of 250 bodyweight squats on the same day before 2014. P(2) = 65%

3.) I will take the Spanish Language CLEP exam and will achieve a score of 55 or higher before 2014. P(3) = 40%

4.) During a single 24 hour period, I will write 48 hiragana and 48 katakana from memory with an error rate of 0% before 2014. P(4) = 95%

5.) During a single 24 hour period, I will write 2,200 kanji from memory with an error rate of 10% or less before 2014. P(5) = 40%

6.) I will be enrolled as a student at ASU again before 2014. P(6)= 70%

7.) I will complete every single exercise in Harry Gensler's Introduction to Logic: Second Edition with an error rate of 20% or less before 2014. P(7) = 50%

Assuming that the probabilities of the individual resolutions are correct and independent of each other, the chance that I will achieve all 7 goals during the year of 2013 is about 2%.

Friday, August 24, 2012

Melatonin: Preliminary Results

I now have roughly 2 months of sleep data. The first month (the control phase) I didn't take any sleep supplements, but in the second month (the experiment phase) I took exactly 3mg of melatonin approximately 30 minutes before going to bed each 'night'. During the control phase, I got an average of 406 minutes of sleep per night, with a standard deviation of 136 minutes.
In the experiment phase, I averaged 444 minutes of sleep per night, with a standard deviation of 98 minutes.
Therefore, on melatonin, I average an extra 38 minutes of sleep per night and experienced significantly less variation in the total length of sleep.

For the control phase of the trial, I averaged 115 minutes in REM sleep, with a standard deviation of 43 minutes.
During the experiment phase, I averaged about 125 minutes of REM sleep, also with a standard deviation of 41 minutes.
Therefore, while on melatonin, I was getting about 10 extra minutes of REM sleep per night with about same amount of variance.

For the control portion of the trial, I got about 37 minutes of deep sleep on average, with a standard deviation of approximately 23 minutes.
In the experiment phase, I got an average of 34 minutes of deep sleep, with a standard deviation of 12 minutes.
While taking melatonin, I average 3 minutes less deep sleep, but with quite a bit less variance as well.

During the control phase, I woke up about 3 times per night, with a standard deviation of 2 times.
In the experiment portion, I also awoke about 3 times a night with a standard deviation of 2 times.
Being on melatonin didn't seem to make any difference in the number of times I woke up during the night.

According to the preliminary data, while on melatonin, I seemed to get more total sleep, more REM sleep, less deep sleep, and wake up about the same number of times each night. Because this isn't enough data to be very confident in the results, I plan on continuing this experiment for at least another 4 months (2 on and 2 off of melatonin) and will analyze the results for the significance and magnitude of the effects (if there really are any) while throwing out the outliers (since my sleep schedule is so erratic).

Monday, July 23, 2012

The Paleo Diet: Follow-Up V

Okay, I finally got around to digitizing all of my secondary data (from my doctor's records, lab tests, and United Blood Services) relevant to the efficacy of my dietary experiments and merged it with my primary data (the data I collected myself), so I am now in a much better position to make an final appraisal than previously was the case. Also, thanks to my recently acquired programming skills (although still rudimentary at this point) I was able to reorganize my data so that all of the points share the same date format, which should make it much easier to visualize the passage of time (rather than merely the passage of measurements) in my graphs than before.

Firstly, did I lose weight? I already had a high degree of belief that this was the case (from clothing fit and pictures taken during this time period), but since I started recording my weight daily simultaneous with beginning the diet, my assessment lacked the degree of objectivity I think appropriate for these kinds of things. Here is a graph including all of the information about my weight that was available to me at the time of this post (which includes datapoints further in the past than my original analysis):

As you can see from the graph (the "lumpiness" in the first half is due to the relative poverty of information I have about myself from before I became a self-tracker), I was slowly gaining weight during the year leading up to the start of the experiment. The weight loss I did experience started immediately upon starting the diet and continued at a fairly rapid rate for months before slowing down and then oscillating between values that the Singapore Government's Health Promotion Board deems a "healthy range".

Secondly, did I maintain my strength and endurance? When I started my diet I went to the gym 4-6 days a week, alternating between running and weight-lifting. I currently go to the gym 4-6 days a week, alternating between running and weight-lifting. All of my lifts have increased in weight while keeping sets, reps, and rest periods constant. Also, I now run at a higher rate of speed for the same amount of time (and therefore, am running a greater distance). 

Thirdly, has my health suffered? Subjectively, this is an obvious no. My body feels better along almost every imaginable dimension. On the other hand, the placebo effect can be quite powerful and the human capacity for self-deception almost limitless. Since the most common argument against the efficacy of the Paleo Diet for long-term health is that high-fat diets increase the chance of getting heart disease and stroke (although, bacterial infection and calcium deficiency are also fair worries), I have decided to concentrate on measures of cardiac health.

The American Heart Association recommends a systolic (maximum) blood pressure of between 90-119 mmHg and a diastolic (minimum) of between 60-79 mmHg. Blood pressure can very quite a bit throughout the day and between days, so the average is more important than any individual measurement. Before starting the diet my average systolic blood pressure was 115 mmHg, but the sample includes only 4 datapoints which isn't enough to know with much certainty what the actual value was during this time period . In any case, the average from after starting the diet until now (including 119 datapoints, which allows us to be fairly confident in the result) is 112.6 mmHg.

Pre-Paleo my diastolic blood pressure came out to an average of 64.8 mmHg, while afterward it ended up being 61.8 mmHg.

As is apparent from the graphical representations of the data, my blood pressure started out in the AHA's "desired" category and ended up in the same category. Interestingly, in both cases, my average blood pressure decreased after starting the diet.

Cholesterol is generally considered (by the medical profession) to be a measure of heart health, but Paleo advocates disagree. The following graph shows my total cholesterol levels before and after going on the Paleo Diet:

My average total cholesterol started out at 154.2 mg/dL, but is now 201.3 mg/dL. This appears to be an unfavorable change (assuming the consensus in the medical field is correct), but only barely puts me over the edge between "desirable" and "borderline high". While perhaps worrying in isolation, in conjunction with the fact that my post-experiment ratio of total cholesterol to HDL cholesterol is 2.9:1 (which easily falls into the AHA's recommendation of "less than 5:1") it doesn't seem to be a serious threat to my cardiovascular health.

In short, I lost a significant amount of weight, increased my strength and endurance, and probably didn't endanger my health in any other way. This is essentially the same as my initial appraisal, but my confidence in this result is now significantly greater due to the much larger quantity of data and the extended time period (incorporating "new" data from both before and after my original post) used in this later analysis. I am now comfortable making the claim that if you are like me in relevant ways (especially if you are closely related to me), then you should worry a little less about eating large amounts of fat and worry a little more about eating things high in processed carbohydrates.

Thursday, June 28, 2012

Sleep: The Baseline

I was finally able to procure an EEG device thanks to some generous benefactors*. The following summary parameters are based on data (21 datapoints total) collected using the Zeo headband and a Samsung Galaxy S running Android 2.3 between 06/10/2012 and 07/03/2012:

Total Time Spent Asleep
Mean: 387 minutes
Median: 450 minutes
Mode: 471 minutes
Range: 506 minutes
Minimum: 18 minutes
Maximum: 524 minutes
Sum: 8,125 minutes

Time Elapsed Before Falling Asleep
Mean: 18 minutes
Median: 18 minutes
Mode: 13 minutes
Range: 38 minutes
Minimum: 1 minutes
Maximum: 39 minutes
Sum: 377 minutes

Time Spent Awake
Mean: 10 minutes
Standard Error: 3
Median: 6 minutes
Mode: 0 minutes
Range: 57 minutes
Minimum: 0 minutes
Maximum: 57 minutes
Sum: 217 minutes

Time Spent in REM Sleep
Mean: 108 minutes
Median: 125 minutes
Mode: 134 minutes
Range: 154 minutes
Minimum: 5 minutes
Maximum: 159 minutes
Sum: 2,274 minutes

Time Spent in Light Sleep
Mean: 245 minutes
Median: 290 minutes
Mode: 290 minutes
Range: 320 minutes
Minimum: 13 minutes
Maximum: 333 minutes
Sum: 5,153 minutes

Time Spent in Deep Sleep
Mean: 34 minutes
Median: 28 minutes
Mode: 24 minutes
Range: 104 minutes
Minimum: 0 minutes
Maximum: 104 minutes
Sum: 708 minutes

Number of Awakenings
Mean: 3 times
Median: 3 times
Mode: 5 times
Range: 9 times
Minimum: 0 times
Maximum: 9 times
Sum: 71 times

After only a few days, I realized that I was getting much less sleep than I thought (less than 6:30 per "night") and decided to make some adjustments. I set my alarm for an hour later and purchased one of those cheap "sleep masks" from Walmart. I don't anticipate making any other large changes before starting any of my sleep experiments, so this set of data will act as something of a baseline with which to compare later data to. My first experimental intervention (having to do with sleep) will be melatonin. I plan on taking it on-and-off for at least 6 months (possibly up to a year, if that is what will be required to reach statistical significance) in order to measure its effects and will perform a cost-benefit analysis on melatonin supplementation shortly after completing the trial.

*Thanks mom and dad for the birthday present!