Bayes and Hiccups: Practical working solutions that no one seems to know

So I’ve been interested in Bayesian analysis for some time. It has a fascinating history, described in detail in “The theory that would not die” by McGrayne – a truly wonderful read. A nice summary can be found here. The funny thing is that, upon looking into Bayesian analysis, it all seemed so obvious to me…not trivial, but obvious. It’s just a mathematical way of writing:

Initial Belief + New Data -> Improved Belief

It is a straightforward application of probability theory, has many intuitive examples, and the only competition (so-called orthodox or frequentist stats) can be shown to have serious, obvious flaws. Although in some fields Bayesian analysis is the standard, introductory classes in statistics are still dominated by the frequentist culture. This is an example of a practical working solution being upstaged by something else, something inferior. I often wonder, why isn’t everyone a Bayesian?

So, then we come to hiccups. One thing about hiccups is that it is likely to be a behavior inherited by our fish ancestors! How cool is that? Anyway, you ask 10 people and they will give you 10 different solutions to getting rid of hiccups. Usually this involves imbibing a large quantity of liquid, or doing something either annoying or uncomfortable. When I was young, my mother taught be that if you drink a small amount (no more than 2 swallows) of a carbonated beverage it gets rid of the hiccups…instantly. It has worked every time I’ve tried, but I don’t have carbonated beverages at home much, and when I do I don’t want to waste a whole can for 2 or 3 swallows. Then, one of our children’s preschool teachers taught me this one, which has worked every time, and in every person I’ve told it to. I have yet to see a counter example. It’s bizarrely simple, and I wonder how it works. Here are the steps:

  1. take a sip of water

  2. say, out loud, the word “one”

  3. take another sip

  4. say, out loud, the word “two”

  5. {\vdots }

By the time you’re at 9, they’re gone. You may not even need to get up to nine, but still, 9 small sips of water is not bad. This is a practical solution, which seems to have no counter example, and is superior to every other solution I’ve found…just like Bayesian analysis!

Well, perhaps the link is a little weak, but it’s worth considering. Are there other examples of clearly superior practices that just aren’t the ones that are known?


About brianblais

I am a professor of Science and Technology at Bryant University in Smithfield, RI, and a research professor in the Institute for Brain and Neural Systems, Brown University. My research is in computational neuroscience and statistics. I teach physics, meteorology, astonomy, theoretical neuroscience, systems dynamics, artificial intelligence and robotics. My book, "Theory of Cortical Plasticity" (World Scientific, 2004), details a theory of learning and memory in the cortex, and presents the consequences and predictions of the theory. I am an avid python enthusiast, and a Bayesian (a la E. T. Jaynes), and love music.
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Bayes and Hiccups: Practical working solutions that no one seems to know

  1. My understanding about hiccups is this: we have a single mouth through which we breath into our lungs and consume food which goes to our stomach. To make this possible, there is a “Y” valve on the way from our mouth to these destinations. The Y valve is switched back and forth constantly and involuntarily by our brain, but the command to switch to “swallow mode” comes from a different part of the brain then the command to switch to “breath mode”. When these two parts of the brain become synchronized, so that they both issue their commands at the same time, we hiccup.

    The cure, then, for hiccups is anything that will “reset” these commands back into an alternating pattern. All we have to do to do this is ensure that we are actively using the valve for one purpose or another (swallowing or breathing) through a complete cycle. The automatic commands must be interrupted for one complete breath/swallow cycle. This is why cures involve holding the breath or swallowing.

    Your cure is one I’ve never heard of, but it sounds good. Speaking, like holding the breath, forces the valve to one position. My cure (and it’s always worked for me and my kids) is: drink 15 swallows of water without stopping.

  2. brianblais says:

    Very interesting, and it does explain the reason for some of the cures. I, too, used to do the drinking water for a continuous time. I found it inconsistent (but perhaps I breathed sometimes), and I found I had to drink a lot of water. The solution posted seems failsafe, and doesn’t require a lot of drinking!

  3. Yeah, you have to drink 15 swallows rapidly without pausing for a breath. It always works for me, but my kids, thinking I’m just making stuff up, used to pause for a breath, or sneak a breath in through the nose, then wonder why it didn’t work. However, if you give this explanation of the cause, it helps the cure make more sense.

    Being a programmer, I imagine something like the following:

    Every time the valve is switched, whether purposely or involuntarily, a timestamp is written to a register in your brain.

    There are two low-level services in your brain. Call them “Svalve” and “Bvalve”. “S” for “swallow” and “B” for “breathe”. They both have the same function: Wake up every 20 seconds and look at the timestamp, if its been more than 10 seconds since the last switch, attempt to perform a switch. If successful, go back to sleep for 20 seconds.

    The operating system in your brain was written by a programmer inexperienced with timing issues. He hard-coded it to start Svalve and Bvalve 10 seconds apart, thinking this alone would ensure that they never stepped on one another. Ordinarily this works, but over time for one reason or another they drift together. When this happens, you get the hiccups.

    Now, when these processes attempt to switch the valve, they are like software on a computer attempting to make use of a file or a printer or some other hardware object. They are using lower-level services to gain control of the hardware. Like the file or printer analogy, the lower-level services do not let more than one process have control of a piece of hardware at a time. If one tries, it is put in a wait state until the hardware comes free again.

    The inexperienced programmer was lazy and didn’t put in a lot of robust error handling in his code. He didn’t consider what would happen if Svalve or Bvalve had to wait for longer than 20 seconds to access the valve hardware. He just “assumed” the switch action would be near-instantaneous (it always was when he tested the modules on his development machine). However, if these processes wait for more than 20 seconds for access to the valve, a second copy of them wakes up to check the timestamp and perform the switch. The two threads, running in the same memory space, stomp all over each other, and the process crashes.

    The OS then sees that these essential services have crashed, and restarts them with the 10-second interval again.

    Thus, the key to “curing” the hiccups is to force Svalve and Bvalve to have to wait for at least 20 seconds for access to the valve. To do this, you have to actively engage the valve in some activity for 20 seconds. You cannot allow the valve to switch FOR ANY REASON, because the switch – even a manual switch unrelated to the services – will cause the timestamp to be updated, and when Svalve and Bvalve wake up, they won’t think they have to do the automatic switch. You have to force the valve not to switch, and not to be ABLE to switch, for 20 seconds. That’s why drinking continuously works.

    And now you know more than you ever wanted to know about this. 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s