Monday, August 30, 2010

72 Hours Slightly Less Wasted

As I mentioned in my analysis of brain speeds post, I spent about 72 hours reading and researching various articles and topics. In my quest for facts on the physiology of the brain related to a few specific statistics, I stumbled upon some other very interesting (to me) facts. I thought I should go ahead and share them if for no other reason than to help justify that 72 hours a bit more.
  • Single sodium pump maximum transport rate = 200 Na ions/sec; 130 K ions/sec
    Typical number of sodium pumps = 1000 pumps/micron2 of membrane surface (from Willis and Grossman, Medical Neurobiology, Mosby, St. Louis, 1981, p. 36)
    Total number of sodium pumps for a small neuron = 1 million[1]
    -- That's a lot of ions being transferred. I wonder how that compares with the best methods we've been able to engineer.... I'll try to resist the urge to make this into another blog post.
  • Seasonal oscillations in neuron number in the song nuclei of canaries correlates well with singing ability (Goldman & Nottebohm 1983).[2]
    -- Canaries kill off parts of their brain and regrow it regularly. Awesome! Practically speaking, adult neurogenesis can probably be induced, possibly helping people recover from various brain injuries.
  • Conversely, in some instances increased neuron number has been shown to result in improved performance. Exposure of immature frogs and rats to excess growth hormone can boost neuron number 20 to 60% according to Zamenhof and colleagues (1941, 1966), and in several instances the hyperplasia or hypertrophy is correlated with improved performance on single-trial avoidance conditioning tasks (Clendinnen & Eayrs 1961, Block & Essman 1965). Similarly, the number of visual cortical neurons excited by one eye has been experimentally increased two-fold in both cats and monkeys, and this increase is associated with smaller receptive fields in visual cortex (Shook et al 1984). Preliminary work supports the idea that such experimental animals are able to resolve smaller differences in the offset between two lines than normal monkeys (M.G. MacAvoy, P. Rakic and C. Bruce, personal communication).[2]
    -- How long before we have growth hormone supplements for our kids to make them smarter? Is this more scary or awesome?
  • [Regarding axon transmission speeds] The higher the temperature, the faster the speed. So homoeothermic (warm-blooded) animals have faster responses than poikilothermic (cold-blooded) ones.[3]
    -- I've always wondered what the advantages to being warm-blooded are! This fact prompted me to read, which was full of interesting facts (and the correct spelling of homeothermic).
  • Neurons in layer IV receive all of the synaptic connections from outside the cortex (mostly from thalamus)[4]
    -- The thalamus is the key to The Matrix. We must not teach the machines about the thalamus.
  • The longest axons in the human body, for example, are those of the sciatic nerve, which run from the base of the spine to the big toe of each foot. These single-cell fibers of the sciatic nerve may extend a meter or even longer.[5]
    -- Just pretty darn cool.

Now then, tell me an interesting fact. I don't mind reading more than one, if you have extra to share. I obviously have plenty of time to kill....


Friday, August 27, 2010

Thinking a Million Miles an Hour

The other day, someone said that they were thinking a million miles an hour. Naturally, this got me thinking about how fast they were really thinking, given all the various pulses traveling between all the various neurons. First, Google tells us that a million miles per hour is 670.616629 times slower than the speed of light. That's still pretty speedy. It's fast enough to take you around the world in 89.6447392 seconds, or get you to the sun in 3.87316198 days.

That's all well and good, but I really wanted to know: How fast do we think?

Unfortunately, I couldn't find the answer, or even enough solid information to compute an answer I was truly satisfied with. I will provide you with the best answer I can come up with, though. First, the relevant facts!

  1. Average number of neurons in the brain = 100 billion[1]
  2. Length of myelinated nerve fibers in brain = 150,000-180,000 km (Pakkenberg et al., 1997; 2003)[1,2]
  3. At the age of 20, the total length of myelinated fibers in males is 176,000 km while that of a female is 149,000 km[5]
  4. Number of synapses in cortex = 0.15 quadrillion (Pakkenberg et al., 1997; 2003)[1,2]
  5. The length of a single dendrite is usually several hundred micrometers. Due to branching, the total dendritic length of a pyramidal cell may reach several centimeters. The pyramidal cell’s axon is often even longer and extensively branched, reaching many centimeters in total length.[4]
  6. The number of dendrites varied between 4 and 13 (mean 9.1; ± 4.0) and the total dendritic length of adult cat VB neurons varied between 9,421 and 19,646 µm mean 13,120 µm; ± 2,605.[6]
  7. Dendritic length (µm) 1639 ± 341a 2140 ± 561 3397 ± 524[7]
  8. Apical dendrites possess a larger average total dendritic length (6332 vs 5062 micrometres) and surface area (12629 vs 9404 square micrometres) [this does not include spines].[11]
  9. Speed of impulses: 100 m/s (passive) ---- 20–30 m/s (thinking)8
  10. while nerve impulses in unmyelinated neurones have a maximum speed of around 1 m/s, in myelinated neurones they travel at 100 m/s.[12]
  11. The speed of propagation for mammalian motor neurons is 10 - 120 m / s, while for nonmyelinated sensory neurons it's about 5 - 25 m/s.[13]
  12. Human neurons fire approximately 200 times per second, using signals that travel at a maximum of 100 meters per second.[9]
  13. Frequency of impulses: Thus, a maximum of 1,000 nerve impulses per second is possible. However, firing rates of 1 per second to 300-400 per second are more typical.[9]
  14. Resting firing rates are generally a few times per second; a stimulated neuron might fire 20 or 30 times a second.[9]
  15. Simple spikes occur at rates of 17 – 150 Hz (Raman and Bean, 1999) either spontaneously, or when Purkinje cells are activated synaptically by the parallel fibers, the axons of the granule cells. Complex spikes are rapid (>300 Hz) bursts of spikes caused by climbing fiber activation, and can involve the generation of calcium-mediated action potentials in the dendrites. Following complex spike activity simple spikes can be suppressed by the powerful complex spike input.[10]
  16. Average = about 100 action potentials per second.[12]
  17. Number of neocortical neurons (females) = 19.3 billion. ---- Number of neocortical neurons (males) = 22.8 billion[1]

(Actually, facts [9] through [11] aren't particularly relevant, but I spent a lot of time reading about them so I forced you to spend a tiny bit of time reading about them, too. The speed of the pulses doesn't matter for our calculations - it's more than fast enough to cover the length between any two neurons in much less than a second.)

One problem with brain studies is that they tend to focus on specific parts of the brain. This makes it rather difficult to piece together whole-brain statistics. For example, [1] refers to the number of neurons in the entire brain, while [2] and [3] are talking about the length of axons in just the white matter - I think. [4] is at minimum related to the surrounding gray matter, but it's unclear if it includes any of the inner gray matter structures. Perhaps more importantly, the numbers vary considerably and are ambiguous as to exactly what they are measuring! [2] and [3] mention myelinated nerve fibers, which tends to be synonymous with axons, but the axon terminals aren't myelinated, so it's not 100% clear that they aren't included in this length measurement, or how long they would be otherwise. [5], [6], and [7] put the total length of dendrites per neuron at several centimeters, 0.9-1.9 cm, and 1.5-3.5 mm, respectively. Fact [8] gives an indication of where this difference comes from. Presumably, the length isn't tallied past a certain branching level, or below a minimum branch size, or something similar. [4] and [8] also indicate that the total length of all dendrites for a pyramidal neuron would be the sum of the two averages mentioned in [8], or ~11000 micrometers - again, not including the spines. In fact, the wording of [8] makes it unclear if that's total dendritic length for the cell, or for the single dendrite counting all its branches (up to a point). This uncertainty is frustrating, to say the least.

Neuron speeds vary, too, depending on the source. [9], [10], [11], and [12] give values between 10 and 120 m/s for myelinated axons, and between <1 and 30 m/s for unmyelinated fibers - dendrites and axon terminals? That's quite a range, but it isn't the only speed that varies. The frequency of the action potentials is reported as anywhere from 1Hz to 400Hz in [12] through [16], with a theoretical maximum of 1000Hz. So, what can we come up with using these ranges of numbers?

It turns out that we can be fairly pessimistic in our assumptions and still arrive at some staggering results. Let's take 150,000km of myelinated nerve fibers - the axons - and assume 10 impulses per second. 10 pulses seems to be a good compromise, given that we are thinking at a million miles an hour, not resting at a million miles an hour, but not all thinking would necessarily involve all portions of our brain. (That is not to say the myth about using only 3-10% of our brain is anything but a myth!) This alone gives us 150,000km * 10/s = 1,500,000,000 m/s5 times the speed of lightjust shy of a million miles a second! And we've only included one half of the synapse structure!

Let's be fairly conservative about the total length of the dendrites and axon terminals and any other unaccounted for lengths, and use 19.3 billion as the number of cells with dendrites, discounting everything but the neocortex (fact [17]). We'll go with 7.75 mm of dendrites per cell, since I really don't know what the source behind fact [7] was talking about, and source [14], which didn't have a fact to quote because the length had to be calculated out of other data, indicates total dendrite length of around 1.1 cm, so we're nearing a consensus of 1 cm or more. Anyway, I chose 7.75mm because 7.75 mm * 19.3 billion = 149,575 km, which means we can just double our previous results! Over 10 times the speed of light! 1,864,113 miles per second! And these are conservative estimates (I hope)!

Just for fun, let's see how fast I think. My neurons easily fire 100 times per second. I thought really hard about it, and sure enough all 100 billion neurons in my brain often fire at that rate. It turns out that my brain isn't very conservative when it measures itself, which makes my total dendritic length per neuron around the proposed average of 1.1 cm instead of 0.775 cm. So, when I'm thinking really hard, my mind is racing at (150,000 km + 100 billion * 1.1 cm) * 100/s = 125,000,000,000 m/s417 times the speed of light77,671,399 miles per second. I actually wouldn't be terribly surprised if this is closer to the true average speed of thinking really hard. (Are there any neuroscience folks out there that want to provide some different numbers?)

It's not a relevant fact, but it's pretty awesome: "% brain utilization of total resting oxygen = 20%[1]." I've always said that I remain thin because I think so much. Now I have evidence! Apparently, your brain running a million miles an hour is a pretty good workout. So, grab a puzzle book and lose some weight!

OK, so maybe this is the teensiest bit nerdy. And maybe it didn't warrant spending a total of about 72 hours of research spread out over three weeks.... But I lost 4 pounds!

  2. Awesomely, the most relevant paper cited in the first link is available in full:!
  7. which is part of

Wednesday, August 25, 2010

Infinite Retirement Calculator

As you may know, I plan on living forever. Dying just seems so wasteful, so I think I'll skip that part of life. Living forever requires some planning, though. It'd be rather annoying to retire and then be forced back into the workforce at age 2718 because I ran out of money. Every retirement calculator I've ever found requires you to choose how long you will be retired. The longest option I've seen is 120 years, but even that's rather pessimistic. So then, I need to know how much money I need to save up in order to retire - forever. Alternatively, I'd like to know how much I can take out every year given my current investments.

I tried to be as conservative as possible in my planning. I assumed I would take out the entire year's spending money at the beginning of the year, i.e., I was pessimistic about how much of my net worth would grow each year. Of course, this pesky little recession has shown that I'm being ridiculously optimistic by assuming any sort of consistent growth during my retirement. Still, this is for planning purposes only, and certain assumptions have to be made in order to make the math at all reasonable.

So, without further ado, the calculator!

  • Modify either the "Net worth" or the "Max sustainable income" field and the other will be calculated.
  • "Growth rate" and "Inflation rate" are configurable as well.
  • The bold label indicates the calculated value.
Net worth ($):
Growth rate (%):
Inflation rate (%):
Max sustainable income ($):
Monthly values?

For every $0.00 you save, your eternal retirement income increases by $1.00.

Some following ado is in order. It should be noted that the "Net worth" and "Max sustainable income" values are in current dollars. The amount you withdraw is assumed to adjust for inflation each year; your infinite retirement should maintain a consistent quality of life. Since money equals happiness, this means your purchasing power should remain the same no matter how long you live. Similarly, the "Net worth" (when calculated) is how much you would need today in order to retire. The amount you need goes up each year, since your income requirements get larger as you postpone your retirement, but most of the difference should be accounted for in the principal growth that would be occurring. It should also be noted that the amount you have to save per dollar is entirely dependent on the growth and inflation rates, so these are rather important to estimate right (and/or conservatively).

Observant readers may have noticed that the default inflation rate of 3.3% closely matches the annualized inflation rate discussed previously. They may have also noticed that the default growth rate of 7% does NOT match any of the numbers in my discussion on the annualized growth rate. I chose 7% because this calculator models retirement, and people tend to be more conservative in their retirement. I think 7% is a better reflection of a portfolio with a significant percentage allocated to bonds, for example.

The "Net worth" label is probably a bit misleading, but it gives you a good place to start. I would probably not include my home equity in these calculations because I don't plan on using that for income in any way. Similarly, cash accounts won't come close to the average growth most people assume in their models, and would probably best be ignored. I would have used "Retirement savings" except that term is usually used to refer to 401(k) and IRA accounts, and regular taxable accounts can grow and produce income, too.

Growth and inflation rates are APY values. The default values reflect yearly budgeting, and for yearly values, APR=APY and things are simple. When the "Monthly values?" checkbox is checked, the growth and inflation rates are adjusted such that the APY remains the same as for the yearly case, other than rounding errors. When looking at monthly values, your overall income will still be higher (or your net worth needed lower) because you are leaving your money growing a few months longer.

Monday, August 23, 2010

Annualized S&P 500 Growth Rate

I talked before about the annualized inflation rate since 1913, and how this is a good number to use in modeling the future. This time, I'll be looking at the annualized return of the stock market as a representative of investments in general.

Once again, my efforts started by trying to find everything I needed online. I came much closer this time around than before. I found an excellent CAGR calculator for the S&P 500 going back to 1871. Again, this is good to get a final answer for a given time period, but I'd like the time period to be less arbitrary. The problem is that historic price data is readily available, but that doesn't include dividends. We really need data reflecting the total return seriously, visit this link - 44% of the total return is dividend reinvestment - amazing!). After a lot of searching for raw data, I found some detailed monthly data for the S&P 500 going back to 1970, much of which was reconstructed. While not raw, it's at least data!

The graph below (click for full size) shows the 1970-2009 data - individual monthly total returns, trailing 12-month total returns, trailing 20-year annualized total returns, and cumulative total returns since 01/1970. The overall total return from 1970-2009 was 9.44%-9.93% depending on what month you end on. The average 20-year annualized return was 13.31%, and the average 12-month return was 11.33%. It's not included in the graph or the table below, but the average 30-year annualized return over 1871-2009 was 9.36%, while the overall annualized return was 8.89% for that range. (NOTE: The average of a sliding window is not a great statistic - the time periods on each end are under-weighted. I include them because if any readers are like me, taking the average of a series of numbers is one of the first things you try to do. I am simply saving them a bit of work. ;)

For modeling my future investments, I use a more conservative 8% growth rate. However, I have a column in my spreadsheet that projects a 10% growth goal from when I first created it. Of course, the financial crisis and recession means I have a lot of catching up to do, even to my original 8% plan.

Display S&P 500 Data Table

Friday, August 20, 2010

Annualized Inflation

Knowing the current inflation rate is helpful in making short term decisions. Seeing a table of historical inflation rates is only slightly productive. For long term planning, what we're really interested in is the annualized inflation over a period of time. Sure, some years inflation may skyrocket to 20%, but other years it's flat or even negative. Taken together, they should be equivalent to one inflation rate applied each year. This annualized inflation rate (or geometric mean, or Compound Annual Growth Rate [CAGR]) is probably a good value to use when modeling inflation far into the future.

I found some great information over at, but I couldn't find any information on average or annualized inflation. I found a calculator at, but that also wasn't terribly useful except to give me a single final result. Then I found Peter Dolph on average inflation, but that was unclear whether it gave an average year-over-year inflation, which didn't make as much intuitive sense, or the geometric mean. So, I decided to compute it myself.

Since I love data, I started with the raw CPI data (see one of the tables below). I then computed the annualized inflation rate from 1913 up until each data point using the same month (or average, in the annual case) in each year. Looking at the table, things appeared to level out, so I decided to verify that with a graph! Not content with that, I then added the year-over-year inflation data for comparison purposes. Not content with that, I then computed and added a sliding 20-year window of annualized inflation rates.

The graph above (click for full size) shows the year-over-year inflation rate, a sliding 20-year annualized inflation rate, and an overall annualized inflation rate. Below, you can toggle between the raw CPI data and the overall annualized inflation rate table. The month of July was used for the graph for the simple reason that it was the most recent month data was available for this year. Also, the average 20-year annualized inflation rate was 3.236% compared to the overall annualized rate of 3.239% at the end of July, 2010, and compared to the 3.26% Peter Dolph found to be the average. Things seem to be pretty consistent.

"What about the risk of hyperinflation?" you may ask. Hyperinflation would indeed be bad, but I don't think it's particularly useful to worry about. If hyperinflation hits us, the world economy is likely completely broken and no amount of planning will help. You could argue that real goods like precious metals would hold their value, but I think owners of gold, for example, will have a hard time taking possession of that gold. Just a theory.

So, 3.3% is a pretty reasonable assumption for long term inflation, arrived at using various methods. This should give us some confidence when we create long term models and/or plans!

Display Annualized Inflation Table