I’ve been thinking about writing an introductory book on linear classifiers. All the math bits are easy, but how do I introduce naive Bayes with a simple example? (Suggestions appreciated!)

While at home over the holidays, my parents (mom‘s a huge British mystery fan) rented Dr. Bell and Mr. Doyle: The Dark Beginnings of Sherlock Holmes (it’s pretty good if you like that sort of thing). That got me thinking about my favorite fictional detective, Encyclopedia Brown. Combined with my love of Martin Gardner‘s mathematical games column in *Scientific American*, I thought a little puzzle might be in order.

Here’s my first attempt — it could use some help in the story part. Or is this just too undigified for a textbook?

### The Case of Who’s Laughing Now?

Mr. and Mrs. Green had very different senses of humor and somewhat distinctive laughs. Only one of them ever laughs at a time. But they both laugh by saying “hee” or “haw”, sometimes using a mix of the two sounds in succession, such as “hee hee haw hee haw”. Over time, Sherlock has observed that when Mr. Green laughs, 20% of the utterances are “hee” and 80% are “haw”; Mrs. Green is more ladylike, with 60% “hee” and only 40% “haw”.

One day, Sherlock was walking by the Green house, and heard the laugh “hee haw haw” from a window. He had no knowledge of whether Mr. or Mrs. Green was more likely to be laughing, but knew it had to be one of them.

What odds should Sherlock post to create a fair bet that the laugh was Mr. Green’s?

### Hint

I did mention naive Bayes, didn’t I?

### The Answer

Coming soon…

January 7, 2009 at 4:51 pm |

How about using Bayes’ Theorem to prove that God exists?

Sex Ratio Theory, Ancient and Modern

Elliott Sober

http://tinyurl.com/7kjts9

God of Chance

David J. Bartholomew

Click to access godofchance_ch3.pdf

http://www.godofchance.com/

This was one of the first applications of Bayes’ Theorem:

The Reverend Thomas Bayes, FRS: A Biography to Celebrate the Tercentenary of His Birth

D. R. Bellhouse

Click to access bayesbiog.pdf

(I’m an atheist with an interest in the history of ideas.)

January 7, 2009 at 5:52 pm |

I knew about Pascal’s decision theory arguments (aka Pascal’s Wager), but not Bayes’s.

I’d hate to be arguing about priors in a theological context!

My first year at Edinburgh Uni (1984/85) I lived in the international dorm, which is next to New College, the seat of Presbyterianism. Bayes and I pounded the same pavement!

January 7, 2009 at 11:06 pm |

Given that you haven’t specified the priors on each person laughing, we’re left with just choosing the person based on the product of the probabilities of the (assumed independent) observations.

P(“hee haw haw”|Mr) = P(hee|Mr)*P(haw|Mr)*P(haw|Mr) = .2*.8*.8 = 8/125

P(“hee haw haw”|Mrs) = P(hee|Mrs)*P(haw|Mrs)*P(haw|Mrs) = .6*.4*.4 = 12/125

So the odds for the Mr are 12:8 == 3:2 (since he’s the underdog).

January 9, 2009 at 1:18 pm |

As you’ll see in the next post, there’s a mistake in Rich W’s calculation that I just copied over; it should be .2*.2*.8=16/125, making the result a bit more intuitive.