Despite what I threatened, I did not just use copy-paste to make the data match the code. I have a special, ad hoc part of the code that is commented out, and I can reanimate it to make it deal with the annoying data files. Also, I used the cut function on my 0-1-2 scale and named the levels after the desired strings. I still need to turn my fudge factor into a variable that is defined near the beginning of the code, and from there I am good to go. I think.

Today my mind wandered onto the topic of random sequences of bits that are controlled by a Bernoulli process. What if all of my complicated models of headaches are wrong and my headache frequency is indistinguishable from random? Maybe it is just so simple that there is some parameter, say \(p = \frac{15}{31}\), and on any given day I will have a headache with probability p. My internal narrative about headache states and triggers and Markov processes might just be a crazy story that I tell myself to make sense of the world. One of the standard demos in introductory statistics classes has the students assigned to either flip a coin or pretend to flip a coin, and the teacher can always tell which group pretended to flip the coin because there isn’t a long enough string of heads in a row. Maybe when I have a bunch of headache-free days, it is totally random. Maybe when I have a headache every day for a week, it is also random.

You can’t prove that a sequence is random. The Kolmogorov complexity measures the randomness of a sequence, but it can’t be computed. At best you can estimate some bounds.

I had 12 headache days in March and 13 headache days in April. I had a headache every day the entire last week of March. The chances of that happening just by chance are roughly 1 in 49. Unusual. But not unthinkably so. April looks a lot more random; no streaks longer that four days. Yet, wouldn’t randomness predict that I would have either a streak of headache days or a streak of headache-free days?

(Even though I am pretending to entertain the assumption of true randomness, I know that flying on airplanes gives me a headache. Some people tell me that the low humidity on airplanes causes me to get dehydrated, which is what causes the headache. I do not believe them because this happens on one-hour flights. If I start out reasonably non-dehydrated and drink the complementary beverage, I don’t believe that I can get sufficiently dehydrated on a one-hour flight. I blame the change in air pressure.)

And was the levetiracetam working in January and February? Is that why I had so few headaches during those months? If I stop taking levetiracetam once I get the taper-off instructions from the doctor, will my number of headaches increase?

Yesterday I got a letter from the insurance company telling me that they will not pay for Botox unless I can provide them with headache diaries showing that I am having at least 15 headache days per month. In May 2017, I had 16 headache days. In June 2017, I had 18 headache days. Would I expect this high of a variance between last year and this year under assumptions of true randomness?

And maybe the magical new medicine (the one with the coupon from the drug company) will work, and I will not have to worry about any of these calculations.