Monthly Archives: September 2008

Protestant PCs, Catholic Macs

Here’s a post that’s sure to be controversial. Not only am I bringing up religion, I’m comparing Macs and PCs. I heard someone refer to an article saying Macs are Catholic and PCs are Protestant. I haven’t seen the article

Tagged with:
Posted in Uncategorized

Quantifying the error in the central limit theorem

When I was preparing for a statistics class I’m teaching now, I wrote up some notes on the error in the central limit theorem (CLT) for a few common distributions. Under mild assumptions, the CLT says that if you take

Tagged with:
Posted in Math

Visualizing the size of bailouts

John Udell created the following visualization of the relative sizes of various government bailouts. See his post for details of how the graph was made and a link to a larger image.

Posted in Uncategorized

Programmer hit by a bus

Programmers often express their (over)dependence on each other by asking what would happen if one of their colleagues were hit by a bus. For example, “Who is going to maintain this code if Mike gets hit by a bus?” or

Tagged with:
Posted in Uncategorized

Theoretical explanation for numerical results

In an earlier post, I compared three methods of computing sample variance. All would give the same result in exact arithmetic, but on a computer they can give very different results. Here I will explain why the results were so

Tagged with: ,
Posted in Math

Wine and politics

Yesterday I ran across an interview with Tyler Colman, a.k.a. Dr. Vino. He discussed his book Wine Politics, subtitled How Governments, Environmentalists and Mobsters Influence the Wines We Drink. The book grew out of Colman’s PhD thesis in political economy.

Tagged with:
Posted in Uncategorized

Comparing three methods of computing standard deviation

On Tuesday I posted a note about computing sample variance or sample standard deviation. I was recommending a method first proposed by B. P. Welford in 1962 and described by Donald Knuth in his magnum opus. A comment on that

Tagged with: ,
Posted in Math

Computing the inverse of the normal CDF

Someone asked me this week for C++ code to compute the inverse of the normal (Gaussian) distribution function. The code I usually use isn’t convenient to give away because it’s part of a large library, so I wrote a stand-alone

Tagged with: , ,
Posted in Math

Five tips for floating point programming

I have a new article on CodeProject: Five tips for floating point programming The article discusses how to avoid some of traps that people often fall into when working with floating point numbers.

Tagged with: ,
Posted in Software development

R programming coming from other languages

The R programming language is fairly easy to learn once you get in the right mindset, but until you get in that mindset the language is bewildering. If you come to R from any popular programming language, you’re in for

Tagged with: ,
Posted in Software development

Houston power outage and the 80-20 rule

Houston is in the midst of the largest power outage repair project in history. After Hurricane Ike passed through, about 2.5 million customers were without electricity. Now I hear that they’re down to half a million customers without power. Let’s

Tagged with:
Posted in Uncategorized

Programmers aren't reading programming books

In the interview with Charles Petzold I mentioned in my previous post, Petzold talks about the sharp decline in programming book sales. At one time, nearly every Windows programmer owned a copy of Petzold’s first book, especially in its earlier

Tagged with: , ,
Posted in Software development

Free C# book

Charles Petzold is a highly respected author in Windows programming circles. For years, his book was THE reference for Win32 API programming. I knew he had since written several books on .NET programming but I didn’t realize until I listened

Tagged with: , , ,
Posted in Software development

How to compute standard deviation accurately

ThThe most convenient way to compute sample variance by hand may not work in a program. Sample variance is given by If you compute the two summations and then carry out the subtraction above, you might be OK. Or you

Tagged with: ,
Posted in Math

Designing a stop sign

Hillarious video on designing a stop sign. Hat tip: Todd Henry

Posted in Uncategorized