Adding simplicity

Simplicity is costly. You have to give up something to achieve it. You can’t just add it on top. William Bridges illustrates this in his book The Way of Transition where he describes his moving out to the country.

… I had been infatuated with Thoreau’s Walden and its story of living a basic life, close to nature. The heart of that undertaking, he had written, was to simplify your life. … In retrospect, I can see that although I thought that this was what I was doing, I was really just trying to add simplicity to my life. In addition to all the old things I had been doing … Of course, my life grew more and more complicated in the process.

A simplification has to remove or replace something else. You can’t just add on simplicity.

There may be an exception to this. Sometimes you can add a few missing pieces to make something more symmetric. In that case, the additions simplify the whole. (Mendeleev did something like this when he drew his periodic table.) Even then, I suppose you could say you’re removing the asymmetry. In any case, achieving simplicity usually requires more subtraction than addition.

Related posts

A sort of command line for your browser

Quix is a sort of command line for web browsers. It’s a bookmarklet, a piece of JavaScript you save like a bookmark. When you launch Quix, it opens a small dialog that lets you enter brief commands for common browser tasks. For example the gs command does a Google search within the domain of the current page.

You can install Quix by dragging it to your bookmark menu. However, if you want to use Quix to make it easier to use your browser without a mouse, you don’t want to have to click the Quix bookmark to get started. You can integrate Quix with your browser to be able to launch Quix from the keyboard.

For example, if you’re using Firefox on Windows, you can drag the Quix bookmarklet to your bookmarks toolbar. Next right-click on the bookmarklet, select “Properties”, and set “q” as the keyword. Then you can launch Quix by typing Ctrl-L q.

You can find directions here for integrating Quix with Chrome, IE, Firefox, Opera, and Safari.

Related posts

Does gaining weight make you taller?

In his autobiography, The Pleasures of Statistics, Frederick Mosteller gives an amusing example of why observational studies are no substitute for doing experiments.

We are all familiar with the idea that we can estimate height in male adults from their weight. … But not one of us believes that adding 20 pounds by eating and minimizing exercise will add an inch to our height.

The problem is not simply that the direction of causality backward, it’s that we cannot use a static description to predict what will happen if we change something.

Although regression situations may give one the illusion of finding out what would happen if we changed something, in the absence of an experiment they offer merely offer guesses.

He summarizes his point by quoting George Box:

To find out what happens to a system when you interfere with it, you have to interfere with it (and not just passively observe it).

Remember this next time you hear claims such as every dollar spent on X saves so many dollars spent on Y. Or every minute spent exercising increases your life expectancy by so many minutes. Or every time you do some activity you increase or decrease your risk of cancer by so much. First of all, these kinds of statements are linear extrapolations on situations that are not linear. Second, they may be observations that do not describe what will happen when you change something. They may be no more true than the idea that gaining weight makes you taller.

Here’s an example of how observation and intervention differ. Lottery winners often go bankrupt within a couple years of receiving their prize. If you suddenly make someone a millionaire, they’re not a typical millionaire.

Related posts

Numerator-only data

I learned a useful new phrase today: numerator-only data. This is data without anything to compare it to, no denominator. I ran across the term in Frederick Mosteller’s autobiography. He illustrates the problem with the following old joke.

“Why do the white horses eat more than the black horses?”
“Don’t know. Why?”
“Because we have ten times as many white horses as black horses.”

Numerator-only data is data that leaves you asking “compared to what?” If I tell you the NASDAQ stock index closed at 2368 today, is that good or bad? The number by itself means nothing. Is that up or down compared to last week? Last year? If I tell you, for example, that the record high value was 5047, that gives you a denominator to compare it to.

Yahoo translation fail

Allen from the Wave Behind blog translated my blog post Just in case versus just in time into Chinese. I appreciate that Allen went to the trouble of doing the translation. I can’t read Chinese, but people who can told me he did a good job.

Mark Biek pointed out the quality of the Google and Yahoo translations from Chinese back into English. The Google translation is awkward but understandable. The Yahoo translation, however, is a total failure. First of all, the translation is illegible in Firefox:

Using Internet Explorer 8, the text is legible, but it doesn’t make sense:

The two screen shots focus on different parts of the text. I chose a swatch near the top of the Firefox version where the text was most illegible. I chose the IE8 swatch to showcase the phrase “the smelly spicy jiao raccoon dog” that Mark had pointed out.

A childhood question about heat

When I was a little kid, I asked some adults the following question.

If hot things cool, and cool things warm up, could something hot cool down and warm back up?

The people I asked didn’t understand my question and just laughed. I have no idea how old I was, but I wasn’t old enough to articulate what I was thinking.

Here’s what I had in mind. I knew that hot things like a cup of coffee grew cold. And I knew that cold things, say a glass of milk, get warm. Well, could the coffee get so cold that it becomes a cold thing and start to warm back up?

Could the coffee become as cold as the glass of milk? Common sense suggests that can’t happen. When we say coffee grows cold, we mean that it becomes relatively colder, closer to room temperature. And when we say the milk is getting warm, we also mean it is getting closer to room temperature. We’ve never left a hot cup of coffee on a table and come back later to find that it has cooled off so much that it is colder than room temperature. But could there be small fluctuations?

As the coffee and milk head toward room temperature, could they overshoot the target, just by a little bit? Say room temperature is 70 °F, the coffee starts out at 150 °F, and the milk starts out at 40 °F. We don’t expect the coffee to cool down to 40 °F or the milk to warm up to 150 °F. But could the coffee cool down to 69.5 °F and then go back up to 70 °F? Could the milk warm up to 70.5 °F and then cool back down to 70 °F?

I didn’t get a satisfactory answer to my childhood question until I was in college. Then I found out about Newton’s law of cooling. It says that the rate at which a warm body cools is proportional to the difference between its current temperature and the ambient temperature. This law can be written as a differential equation whose solution shows that the temperature of a warm body decreases exponentially to the ambient temperature. The temperature curve always slopes downward. It doesn’t wiggle even a little on its journey to room temperature. Cold bodies warm up the opposite way, exponentially approaching room temperature but never exceeding it.

In case this seems obvious, think about thermostats. They don’t work this way. Say the temperature in a room is 85 °F and you’d like it to be 72 °F, so you turn on the air conditioning. Will the temperature steadily lower to 72 °F? Not exactly. If you were to plot the temperature in the room over time and look at the graph from far enough away, it would look like it is steadily going down to the desired temperature. But if you look at the graph more closely, you’ll see wiggles. The AC may cool the room to a little below 72 °F, maybe to 70 °F. The AC would cut off and the temperature would rise to 72 °F. Unlike the cup of hot coffee, the AC will often overshoot its target, though not by too much. The temperature may feel constant, but it is not. It oscillates around the desired temperature.

RelatedConsulting in differential equations

A note to new subscribers

Thank you for subscribing to my blog. I wanted to say a little about the blog for those of you who have just subscribed recently.

I post a little more than one article a day on average on a variety of topics. Here’s a list of some of the most popular posts by category.

This blog is also available as a podcast. The audio is automatically generated. The quality is good for ordinary prose but not as good for other content.

Here’s my contact info. If you submit a comment that never appears, please send me a note. I get thousands of spam comments, and so I filter spam aggressively. Sometimes a legitimate comment gets blocked. I enjoy hearing from you. I learn a lot from the comments.

I have several Twitter accounts, one personal account and six daily tip accounts. I keep the volume low on the daily tip accounts: one scheduled tip per day plus an occasional unscheduled tweet.

Interview with Clojure author

Simple-talk has an interview with Rich Hickey, author of the programming language Clojure (pronounced “closure”). Clojure is a dialect of Lisp designed to run on top of the Java Virtual Machine. The language is also being ported to the .NET framework as Clojure CLR.

Two things stood out to me in the interview: a comparison of Lisp with C++, and a discussion of complexity.

You’ll often hear a programmer argue that language X is better than language Y.  To support their argument, they’ll say they wrote a program in Y, then wrote it in X in less time. For example, someone might argue that Ruby is better than Python because they were able to rewrite their website using Ruby in half the time it took to write the original Python version. Such arguments are weak because you can write anything faster the second time. The first implementation required analysis and design that the second implementation can reuse entirely or at least learn from.

Rich Hickey argues that he can develop programs in Lisp faster than in C++. He offers as support that he first wrote something in Lisp and then took three times longer to rewrite it in C++. This is just a personal anecdote, not a scientific study, but it carries more weight than the usual anecdote because he’s claiming the first language was more efficient than the second.

In his discussion of incidental complexity, complexity coming from ones tools rather than from the intrinsic complexity of the problem being solved, Hickey says

I think programmers have become inured to incidental complexity, in particular by confusing familiar or concise with simple. And when they encounter complexity, they consider it a challenge to overcome, rather than an obstacle to remove. Overcoming complexity isn’t work, it’s waste.

The phrase “confusing familiar or concise with simple” is insightful. I never appreciated the arguments about the complexity of C++ until I got a little distance from the language; C++ was so familiar I didn’t appreciate how complex it is until I had a break from writing it. Also, simple solutions are usually concise, but concise solutions may not be simple. I chuckle whenever I hear someone say a problem was simple to solve because they were able to solve it in one line — one long stream of entirely mysterious commands.

Thanks to Omar Gomez for pointing out the interview article.

Related posts

Edward Tufte, Ron Howard, and government consulting

Edward Tufte fans are understandably excited about President Obama’s announcement last Friday that Tufte has been asked to serve on the Recovery Independent Advisory Panel.

Tufte is a widely respected expert in data visualization. I attended one of his seminars years ago and thoroughly enjoyed it. I wish him well. I’m sure he will do a good job. However, there are limits on any statistician working for politicians.

I recommend listening to Ron Howard’s explanation for why he no longer consults for government. (Ron Howard the Stanford University professor, not Ron Howard the actor/director.) Howard produced a decision analysis of nuclear fuel reprocessing for the Carter administration, but his hands were tied for political reasons. He concludes

If this were the only case where I had this dispiriting result … perhaps I could treat it as an exception. But what I’ve found is every time I did a study like this … there was nobody home in terms of really wanting to know the result.

Howard’s interview is available from the here. The remarks above run from 5:00 to 8:15.

Does lightning prefer metal or wood?

The video below features a demonstration that lightning is as likely to strike wood as metal.

I want to focus on one line from the video. After showing simulated lightning strikes that hit a wooden rod five times and a copper rod five times, the narrator says

It’s five all, proof that metal does not attract lightning.

No, such an experiment would prove no such thing. I imagine the researchers conducted a much larger experiment and selected a representative sample. And I’m willing to accept their conclusion that metal does not attract lightning. But I would not accept such a conclusion from an experiment with 10 samples. What the experiment proves is that, under their experimental conditions, lightning will sometimes strike wood even while a metal rod is nearby.

I have two complementary criticisms of this made-for-video science.

  1. The results could easily happen if their conclusion were not true.
  2. The results could easily not have happened if there conclusion were true.

Suppose in reality, lightning will not always strike the metal rod, but will prefer the metal. Suppose in the long run, lightning will strike the metal rod 60% of the time. It would not be unusual in that case to do an experiment with 10 strikes and find that half or more of the strikes hit wood.

Now suppose the researchers are exactly correct. In the long run, lightning has no preference for one rod or the other. What would viewers have thought if they showed a clip of 10 strikes, of which 6 hit metal and 4 hit wood? Many would have howled in protest. If lightning really had no preference for metal, the result should have been an even split, right? This is an example of the Law of Small Numbers. People underestimate the variability of small samples.

If the probability of lightning striking each rod is 50%, then in a sequence of experiments each containing 10 strikes, most will not have an exact 5-5 split. If you flip 10 fair coins, the most likely outcome is a 5-5 split, but this will happen only about 1/4 of the time. It’s more likely that you’ll get near a 5-5 split, sometimes with more heads and sometimes with more tails.

The exact 5-5 split in the video is good showmanship, but it’s misleading science.

Related posts