Sam Gentle.com

Multiply-average










  



  

I'm trying something a little different today: an experiment!

When you click the Ready button above, it'll generate 10 random numbers adding to something between 1 and 1000. You have 5 seconds to try to enter their sum. Unless you're the biologically unlikely lovechild of Leonhard Euler and Euclid himself, it'll probably be pretty difficult. To get an answer in 5 seconds you'll need to sacrifice a lot of accuracy. (You can also press enter in the input box instead of clicking ready)

Now try changing the dropdown from "sum" to "avg". Your goal is to guess the average in 5 seconds. You will probably find this substantially easier.

Then comes the fun part: observe that, for 10 numbers, the sum is 10 times the average. So change it back to sum and, instead of trying to guess the sum, guess the average and multiply it by 10.

I based this experiment on an observation in the first chapter of Thinking, Fast and Slow, that we could calculate the average length of a bunch of lines much more easily than their total length. Kahneman's theory is that this is because we think prototypically; ie, we have already formed a general impression of the lines that are on the page, and our notion of that average tends to be pretty accurate.

I started thinking about the relationship between sums and averages, and that particular problem when you look at, say, a list of file sizes that all seem relatively small, but their total size is deceptively large. Could we build a better intuition for adding up sets of large numbers quickly? This is where the multiply-average technique technique comes in.

Still, it's not clear whether Kahneman's shape averaging actually translates into symbolic reasoning. Do we get an intuitive sense of the size of numbers the same way we get a sense of the size of shapes? I'm not sure, but I definitely got faster and more accurate results when I used the average. I'd also be interested to test out how much you sacrifice with non-trivial multiples (20 is probably okay, but what about if there's 37 numbers?). The code and a stand-alone demo are available on Github if you'd like to mess around with it.

Being able to throw out quick experiments like this is, I think, one of the great benefits of knowing how to code. Not everyone needs to be able to build Facebook from scratch, but being able to take a little idea and make it into a real thing is enormously valuable.