Vitamin D, Sunlight, and Sleep: More

In the comments on yesterday’s post (“Can Vitamin D Replace Sunlight? A Stunning Discovery”), two commenters (John and Aaron Blaisdell) noted that Nephropal had said something similar. They’re right. Here’s what Nephropal said in 2009:

Vitamin D taken at night causes insomnia. This is a complaint of a few of my patients. Moreover, when they switch to morning dosing, the insomnia subsides. Thus, Vitamin D should be taken in the morning.

That’s a great observation, but not the same as Primal Girl’s. Here is her observation, shortened for clarity:

I usually took my supplements mid-afternoon. I vowed to take them first thing every morning. I tried it the next day and that night I slept like a rock. And the next night. And the next.

The two observations support each other. Both support the idea that the timing of Vitamin D matters. But there are also big differences. Paleo Girl had been taking her Vitamin D in mid-afternoon, not at night. She shifted to first thing in the morning, which is more specific than morning. I changed the title of yesterday’s title to make clearer what is new here: the idea that Vitamin D can substitute for sunlight.

Lots of things cause insomnia if you take them in the evening. Caffeine and other stimulants, for example. A comment on yesterday’s post said that B vitamins and calcium cause insomnia if taken in the evening. This is why Nephropal’s observation, although very important, is not a stunning surprise. You stop taking X in the evening, your sleep improves — I won’t be astonished, no matter what X is.

Vitamin D is not a stimulant or is at best a mild stimulant. Taking Vitamin D in the afternoon should not cause trouble sleeping. Yet Primal Girl had trouble sleeping. And she was getting little morning sunlight. It is a real insight that first-thing-in-the-morning Vitamin D could have the same effect as first-thing-in-the-morning sunlight — in other words, could substitute for missing sunlight. Against all odds, the results supported this idea.

One commenter on yesterday’s post said Primal Girl’s results were both unproven and obvious. Vitamin D is technically a hormone! Melatonin is a hormone, said the comment. I have not heard anyone propose taking melatonin first thing in the morning to improve sleep. It is standard to take melatonin in the evening. The accepted view among circadian rhythm researchers is that sunlight produces its effects on circadian rhythms via nerves, not blood. For example, hundreds of experiments have found that destroying the suprachiasmatic nucleus of rats destroys their circadian rhythms. The suprachiasmatic nucleus receives neural input from the eyes — that’s why these lesions were first made (by Irv Zucker, a Berkeley colleague of mine).

Lots of people think Vitamin D improves sleep. That’s not new. Here’s what one of them said, in a post promisingly titled “ When is the best time to take your Vitamin D supplement?“:

In an effort to boost absorption of vitamin D, individuals were asked to take their vitamin D supplements with the largest meal of the day. After 2-3 months, vitamin D levels were checked again.At the end of the study period, vitamin D levels had risen to an average of 47.2 ng/ml (118 nmol/l) – an average i ncrease in vitamin D levels of about 57 per cent. . . It seems sensible, I think, for individuals who are currently supplementing with vitamin D to take this with their largest evening meal.

 

E-Cat Passes Test

Andrea Rossi, an Italian inventor, has constructed a version of his E-Cat invention — a new source of energy — that produces 1 gigawatt/hour. A test to verify this claim satisfied an unknown customer, who bought the device. This is easily the most impressive physics/chemistry news of my lifetime. It remains to be determined how long the device can run on a given amount of fuel (supposedly the fuel is cheap), but the evidence that a new source of energy has been found is much better (in my eyes) than anything else I have ever heard. The (previous) evidence for cold fusion, for example, never came anywhere close to this. (More I learned more after writing this and no longer take E-Cat seriously. For details see end of post.)

The recent BBC documentary Shock and Awe: The Story of Electricity (great, by the way) tells of one big misleading demonstration: Edison’s demonstration of direct current near Wall Street. As everyone knows, the world uses alternating current, not direct current. But Edison’s demonstration was far less astonishing than Rossi’s. Edison’s misleading demonstration was no engineering miracle. It was just costly. Again and again, the documentary tells of inventions and demonstrations that appeared miraculous (the battery, wireless transmission) based on the common knowledge of the time. They turned out to predict the future.

According to Wikipedia, Rossi has a doctorate from Kensington University, California, a diploma mill. His nonsense-doctorate is in chemical engineering. His discovery is not chemical engineering. But who better than me to ignore this? My doctoral degree, although real, came from research on animal learning, which is quite different than weight control, mood, sleep, nutrition, all the stuff I claim to have learned new things about. And now I am commenting on physics! What I have learned from my experience of science is that major discoveries require knowledge and freedom — freedom to try a thousand things. It appears that Rossi — who wasn’t a professor at a major university, worrying about his next grant — had both.

More Stop the presses! Having read this and this (thanks, expedient), I have much greater doubts about Rossi’s claims and would not have written this post had I read them earlier.

 

 

Google Yes, Wikipedia Yes, Aaron Swartz No?

We praise Google and Wikipedia for making knowledge more available — consider them two of the best innovations of the last 50 years — but after Aaron Swartz, a friend of mine, apparently tried to do the same thing he was charged with wire and computer fraud and faces up to 35 years in jail and a $1 million fine.

The prosecutor, U.S. Attorney Carmen Ortiz, made an interesting statement:

Stealing is stealing, whether you use a computer command or a crowbar, and whether you take documents, data or dollars. It is equally harmful to the victim whether you sell what you have stolen or give it away.

In my experience, tautological statements such as “stealing is stealing” or “correlation is not causation” do not bode well for that side of the argument. As Thorstein Veblen might say, the reason for the tautology was the need for it.

Ortiz’s statement shows that she, like the rest of us, thinks that what matters is amount of harm. Harm is hard to find here. The only clear harm is that MIT access to JSTOR was shut down for a few days. This is so minor that JSTOR’s statement about the case (which includes “it was the government’s decision whether to prosecute, not JSTOR’s. . . . We [have] no interest in this becoming an ongoing legal matter”) doesn’t mention it. I don’t think many people will agree that this amount of harm justifies the charges that Ortiz has brought.

Sign a petition supporting Aaron.

Percentile Feedback and Productivity

Warning: This post, written for the Quantified Self blog, has more repetition than usual of material in earlier posts.

In January, after talking with Matthew Cornell, I decided to measure my work habits. I typically work for a while (10-100 minutes), take a break (10-100 minutes), resume work, take another break, and so on. The breaks had many functions: lunch, dinner, walk, exercise, nap. I wanted to do experiments related to quasi-reinforcement.

I wrote R programs to record when I worked. They provided simple feedback, including how much I had worked that day (e.g., “121 minutes worked so far”) and how long the current bout of work had lasted (e.g., “20 minutes of email” — meaning the current bout of work, which was answering email , had so far lasted 20 minutes).

I collected data for two months before I wrote programs to graph the data. The first display I made (example above) showed efficiency (time spent working/time available to work) as a function of time of day. Available time started when I woke up. If I woke up at 5 am, and by 10 am had worked 3 hours, the efficiency at 10 am would be 60%. The display showed the current day as a line and previous days as points. During the day the line got longer and longer.

The blue and red points are from before the display started; the green and black points are from after the display started. The red and black points are the final points of their days — they sum up the days. A week or so after I made the display I added the big number in the upper-right corner (in the example, 65). It gives the percentile of the current efficiency compared to all the efficiency measurements within one hour of the time of day (e.g., if it is 2 p.m., the current efficiency is compared to efficiency measurements between 1 p.m. and 3 p.m. on previous days).

I started looking at the progress display often. To my great surprise, it helped a lot. It made me more efficient. You can see this in the example above because most of the green points (after the display started) are above most of the blue points (before the display). You can also see the improvement in the graph below, which shows the final efficiency of each day.

My efficiency jumped up when the display started.

Why did the display help? I call it percentile feedback because that name sums up a big reason I think it helped. The number in the corner makes the percentile explicit but simply seeing where the end of the line falls relative to the points gives an indication of the percentile. I think the graphical display helped for four reasons:

1. All improvement rewarded, no matter how small or from what level. Whenever I worked, the line went up and the percentile score improved. Many feedback schemes reward only a small range of changes of behavior. For example, suppose the feedback scheme is A+, A, A-, etc. If you go from low B- to high B-, your grade won’t change. A score of 100 was nearly impossible, so there was almost always room for improvement.

2. Overall performance judged. I could compare my percentile score to my score earlier in the day (e.g., 1 pm versus 10 am) but the score itself was a comparison to all previous days, in the sense that a score above 50 meant I was doing better than average. Thus there were two sources of reward: (a) doing better than a few hours ago and (b) doing better than previous days.

3. Attractive. I liked looking at the graphs, partly due to graphic design.

4. Likeable. You pay more attention to someone you like than someone you don’t like. The displays were curiously likable. They usually praised me, in the sense that the percentile score was usually well above 50. Except early in morning, they were calm, in the sense that they did not change quickly. If the score was 80 and I took a 2-hour break, the score might go down to 70 — still good. And, as I said earlier, every improvement was noticed and rewarded — and every non-improvement was also gently noted. It was as if the display cared.

Now that I’ve seen how helpful and pleasant feedback can be, I miss similar feedback in other areas of life. When I’m walking/running on my treadmill, I want percentile feedback comparing this workout to previous ones. When I’m studying Chinese, I want some sort of gentle comparison to the past.

 

 

 

 

 

Google Uses My Credit Card Without Telling Me

Last week, while looking at Google Voice I noticed a button that said “Get $10″. I thought it meant “get $10 credit for trying it” so I pushed the button. Ten dollars credit showed up. Since Google Voice is free for the calls I make I had no use for $10 credit but maybe someday….

A few days later I happened to look at my credit card bill. Google had billed me $10! I didn’t even know they knew my credit card number! It hadn’t been required for the $10 transaction. I haven’t consciously used Google Checkout. I haven’t given it to them in any other connection. Talk about data mining…

When I go to Account Settings listed under my Gmail address, one of the sections is My Products, meaning My Google Products. Under that is listed Google Checkout, although I’ve never signed up for it and (I thought) never used it. So why is it there? I looked in Google Checkout. The Google Voice $10 transaction is the only transaction listed. As far as I can tell, this proves I didn’t use Google Checkout in the past (say, 4 months ago) and forget about it. Google really did get and use my credit card number without telling me, much less asking me.

My credit card company quickly gave me a refund.

 

Dear Gmail: Publish Break-in Stats

A year ago my gmail account was hacked. I recovered it in an hour or so, not before a friend of mine had an amusing conversation. Recently, judging by James Fallows’s experiences, there has been a rise in these attacks. My mistake, I believe, was using the same password on my gmail account and another account. I suspect the recent outbreak of gmail break-ins is happening because there was recently a large exposure of passwords elsewhere.

But I can’t be sure because I cannot compare break-ins over time. What does a graph of break-ins-versus-time look like? Is what Fallows has noticed a recent spike? (It probably is.) If so, that supports my explanation of its cause (passwords lost elsewhere). Or has there been a steady increase over time? That would contradict my explanation. It is revealing that Fallows provides two security suggestions, one of them really time-consuming (two-stage verification) in the long haul. He says nothing about making sure your gmail password is not used anywhere else. If he could have seen that break-ins-versus-time graph, he could better judge whether the gmail hacks are due to duplicated passwords. If I am right about the cause of these hacks, Suggestion #3 should have been don’t use your gmail password anywhere else — and would have been the most effective.

Gmail developers can help all of us be safe at reasonable cost by publishing graphs that show break-ins (and probability of break-in) per day. I think that is estimated by the number of account recovery requests they receive per day. After my gmail account was hacked, I contacted Google to recover it and soon did. Perhaps those account recovery requests could involve the person making the request giving a reason (e.g., “account hijacked”). Then Google could simply tell us (with a graph?) the number of hijacked accounts reported per day.

Security departments and others don’t like to provide this sort of information. Persons at the top of companies worry it will scare customers! Those in security departments worry people will be less scared — thus reducing their power. From a user point of view these are horrible reasons not to make this information public. With accurate knowledge of the likelihood of break-ins, gmail users can make reasonable estimates of the costs and benefits of various security options. Without knowing the likelihood of break-ins, they can’t.

Effect of One-Legged Standing on Sleep

In 1996, I accidentally discovered that if I stood a lot I slept better. If I stood 9 hours or more, I woke up feeling incredibly rested. Yet to get any improvement I had to stand at least 8 hours. That wasn’t easy, and after about 9 hours of standing my feet would start to hurt. I stopped standing that much. It was fascinating but not practical.

In 2008, I accidentally discovered that one-legged standing could produce the same effect. If I stood on one leg “to exhaustion” — until it hurt too much to continue — a few times, I woke up feeling more rested, just as had happened when I stood eight hours or more. At first I stood with my leg straight but after a while my legs got so strong it took too long. When I started standing on one bent leg, I could get exhausted in a reasonable length of time (say, 8 minutes), even after many days of doing it.

This was practical. I’ve been doing it ever since I discovered it. A few months ago I decided to try to learn more about the details. I was doing it every day — why not vary what I did and learn more?

One thing I wanted to learn was: how much was best? I would usually do two (one left leg, one right leg) or four (two left leg, two right leg). Was four better than two? What about three?

I decided to do something relatively sophisticated (for me): a randomized experiment. Every morning I would do two stands (one left, one right). In the evening I would randomly choose between zero, one, and two additional one-legged stands. Sometimes I forgot to choose. Here are the results for three sets of days: (a) “baseline” days (baseline(2), baseline(3), baseline(4)) before the randomized experiment and during the experiment when I forgot and (b) the “random” days (random 2, random 3, random 4) when I randomly choose and (c) a later set of days (“baseline 4″) when I did four one-legged stands every day.

Each morning, when I woke up I rated how rested I felt on a scale where 0 = not rested at all (as tired as when I went to sleep), and 100 = completely rested, not tired at all.

 This shows means and standard errors. The number of days in each condition are on the right.

The main results are that three was better than two and four was better than three. The three/four difference was large enough compared to the two/four difference to suggest that five might be better than four. The similarity between random 4 and baseline 4 means that the amount of one-legged standing on previous days doesn’t matter much. For example, on Monday night it doesn’t matter how much I stood on Sunday.

These differences were not reflected in how long I slept. Below are the results for “first” sleep duration, meaning the time from when I went to sleep to when I woke up for the first time — which is when I measured how rested I was (the graph above). On a small fraction of days, I went back to sleep a few hours later.

These results mean that one-legged standing increased how deeply I slept, what you could call sleep “efficiency”.

I also computed “total” sleep duration, which included first sleep duration, second sleep duration, and nap time the previous day (e.g., nap time on Monday plus sleep Monday night). If I took a long nap, I slept less that evening. Here are the results for total sleep duration.

The results also support the idea that one-legged standing made me sleep more deeply.

The randomized experiment had pluses and minuses compared to a simpler design (such as an ABA design, where you do each treatment for several days in a row). The two big pluses were that the conditions being compared were more equal and you could simply continue until the answer was clear. The two big minuses were that I often forgot to do the randomization and lack of realism. If I decided that four was the best choice, I’d do four every day, not in midst of two’s and three’s.

Overall, it was clear beyond any doubt that four was better than two, and clear enough that four was better than three (one-tailed p = 0.02). The results suggest trying larger doses, such as five and six. I’ve only done six once: before a flight from Beijing to San Francisco. It was one of the few long flights where I slept most of the way.

If you try this and you do more than one right and one left, leave plenty of time (two hours?) before the second pair, to allow the signaling molecules to be regenerated.