Tuesday, May 12, 2009

The Drunkard’s Walk

The Drunkard's Walk
Recently, we both finished reading The Drunkard’s Walk: How Randomness Rules Our Lives by Leonard Mlodinow. It is a thought provoking book about how much randomness impacts our lives and how we often attribute its effects to a host of other causes. The book was a bit difficult at times to understand and the misprints (in our particular edition) didn’t help.

There are just two concepts I’ll point out form the book (for now). The first is a calculation doctors were asked to make of breast cancer. In a nutshell the question is what is the probability that an asymptomatic woman between the ages of 40 and 50 who has a positive mammogram actually has breast cancer if 7% of mammograms show cancer when there is none, the actual incidence is 0.8%, and the false-negative rage is 10%. This problem is discussed in Chapter 6 False Positives and Positive Fallacies. After many hours we were able to calculate that a positive mammogram is due to cancer in only about 9 percent of the cases. I suppose it was an exercise left to the reader. The 9% comes from the following logic (we believe). The sample space of (test, actual) is (Postive, P), (P,Negative), (N,N), (N,P). Let’s say 1,000 women is the sample group size. (P,N) = 7% of 1,000 or 70. (P,P) = 0.8% - 10% of 0.8% of 1,000 or 7.2. (The false-negative rate means that if 0.8% out of 1,000 or 8 have it, there will be 10% of those or 0.8 that are (N,P)). (N,P) = 0.8. So 7.2/(7.2 + 70) = 9%.
Pascal's Triangle

The second concept is Pascal’s Triangle. I never had been exposed to this before and found it fascinating and an easy way to calculate how many ways to select a subset of items from a larger set where order of the items is not important. Suppose you want to know how many ways to extract a subset of 4 items from a total set of 6 items. Just go to 7th row (or the 6th row if you start counting from the top at zero). Starting at the left square you find there is 1 way to arrange 0 items of 6 total, 6 ways to arrange 1 item, 15 ways to arrange 2 items, 20 ways to arrange 3 items, and 15 ways to arrange 4. So the answer is 15. This is also called a “n choose k” problem – how to find how many combinations thare are of n items taken k at a time. If you don’t want to write out the Pascal’s Triangle for larger number you can use the binomial coefficent (which the Pascal Triangle entries represent). The binomial coefficient is n! / (k! (n-k)!). So for the problem above we have 6! / (4! (6-4)!) = 6! / (4! 2!) = 6*5 * 4! / (4! * 2!) = 15.

1 comment:

  1. stop making me think please and post some silly photos with funny captions. or maybe another plant photo with a weird name... damn...now i have to re-read this and think about it all... i hate that you're my big brother who challenges me to use my brain.


All comments go through a moderation process. Even though it may not look like the comment was accepted, it probably was. Check back in a day if you asked a question. Thanks!