Mark’s Bookshelf: Digital Dice by Paul Nahin

Many people use computers to exchange email or pictures, to shop, or even to program for a living. I do all that kind of stuff, but one of the most pleasurable things I do with computers is to use them to answer questions or to gain insight into problems which are too difficult for pen-and-paper analysis.

Digital Dice is a book of probability problems which can be attacked via computer simulation. For the flavor of the sort of problems contained within, consider The Appeals Court Paradox presented in Chapter 16. Quickly, imagine five judges (A, B, C, D, E) who must arrive at a majority decision to overturn a conviction or let it stand. Each justice votes independently, with a probability of yielding the correct decision. For instance, let’s say that A gives the correct decision 95% of the time, with the remaining justices voting correctly 95%, 90%, 90%, and 80%. What is the likelihood that the panel returns the correct decision?

Now, imagine that justice E (who seems to get things wrong much more often than his colleagues) decides to just be lazy and vote along with A (after all, he’s pretty smart, he gets the answer write 95% of the time). What is the probability that the panel returns the correct decision now?

Such problems are fairly hard tedious to work through analytically, but are quite easy to code up as simulations. By tossing dice, and running millions of trials, we can quickly gain insight into a wide variety of problems.

I find this book to be clearly written, and anyone with even a modest amount of programming and mathematical knowledge should be able to complete the projects detailed within. Nahin’s books have been (in my opinion unfairly) criticized by some on Amazon for having the odd typo. I think if that your criticism, you are missing the forest for the trees: the book isn’t meant to be full of code that you type in, it’s meant to challenge you to write your own implementations and experiment. I’ve got several other books by Nahin, and I generally find his style and choice of subject matter to be interesting.

If this is the kind of thing that floats your boat, check it out. Recommended.

One thought on “Mark’s Bookshelf: Digital Dice by Paul Nahin

  1. kiwimonster

    For the case you cite, while the analysis may be a bit “tedious”, it is just as easy to code the analysis as it is to code the simulation. I did have to dust off one of the books on my bookshelf, “The Cartoon Guide to Statistics”. http://www.amazon.com/Cartoon-Guide-Statistics-Larry-Gonick/dp/0062731025

    For the first case, my analysis code says 3177424/3200000 or 99.2945% of the time, the correct decision is reached. After 100000 trials, my simulation says 99.2980%.

    For the second case, my analysis code says 158080/160000 or 98.8% of the time, the correct decision is reached. After 100000 trials, my simulation says 98.7880%.

    It’s a bit funny because just the day before I did a simulation of a particular tournament structure to try and understand how often ties would occur. I didn’t even try to think about it analytically…

Comments are closed.