• Dogs and Bayes Theorem

    On Tuesday morning, I heard a piece on Morning Edition about human bias and drug-sniffing dogs. Sometimes there is the Clever Hans effect. Sometimes the person really wanted to find something, so the person decided to intepret the dog’s behavior as a signal. Sometimes the dog would signal when there were no drugs. (I will not speculate about dogs’ motives.)

    Were I still teaching college students – or if I were still teaching in an environment in which long contextual tangents were part of the schtick – I would add this to my repertoire for the Bayes Theorem unit. For those who don’t know Bayes Theorem, what it pretty much comes down to is that if the rate of true positives is less than the rate of false positives, then most of your positive results are going to be false positives.

    Say what you will about “Math across the curriculum” initiatives, I really like this problem, especially for college students. When it comes to probability problems, most students are not going to do math at a casino. And the casino-math is pretty boring: it says that if you are going to Vegas just to have fun, you are pretty likely to lose money. But these days everyone on Facebook is a Constitutional scholar! You can entertain yourself for hours arguing about the Fourth Ammendment with strangers. Also, you might know someone who has been stopped by cops for some less-than-justified reason.

    And that brings us to the Supreme Court. Over 10 years ago, in my teaching heyday, the Supreme Court ruled on Illinois vs. Caballes. Roy Caballes was stopped by police for some reason. A drug-sniffing dog signalled that there were drugs in the car. His car was searched, and the police found drugs. Caballes argued that the dog-sniff was a search under the Fourth Ammendment and required probable cause. The state argued that the dog-sniff was not a search and not subject to Fourth Ammendment scrutiny, but that it could establish probable cause for a search.

    The arguments tend to stay pretty constitutitonal. Is a dog-sniff a search? What are your rights with respect to contraband?

    And Justice Scalia gets into the Bayes Theorem side of things, noting:

    I mean, surely you’d concede that the search is unreasonable if, for every – every one time, you – you make somebody open his bag because the dog actually smells narcotics, 99 times you make somebody open his bag because he has apples in it.

    But the reliability of the dog is not at question in this case, as the attorney for the state points out:

    You do not have the probable cause question before you. This dog was determined to be reliable by the trial court and the Illinois Appellate Court, and it was not part of the Illinois Supreme Court’s decision.

    So Bayes Theorem did not make its way into the Supreme Court at the time.

    I would be interested in seeing the reliability rates for the dogs being certified in the program described in the radio piece as well as their reliability in the field.

    Technology note: To those who are reading this blog via the RSS feed (which might only be me at this point), every time I change certain general settings for the pages, the entire feed republishes itself. Apologies in advance for any annoyance.


  • Mapping and Updates

    Instead of installing and configuring various tools to add more to this site (Disqus comments, pretty links in the footer to my airplane photos on Instagram and Tumblr, updating the DNS resources for my domains I don’t use so that they point here, etc.), I should be reminding myself of what I was going to talk about when I was going to talk about maps back in August (but then had to cancel). We’ll see how much housekeeping I can get done on this site over the coming weekend.

    On Tuesday, December 12 I am going to be giving a tutorial about mapping in R at R-Ladies San Diego. The organizer has put all of my materials on the GitHub repo, so you can see what I’m planning on talking about. (And if you are in San Diego, then you should come to the talk.) As you can’t help but notice if you read the narrative outline of the tutorial, installing all the required tools can be a bit of a nightmare, so I have tried very hard not to update anything important on my laptop since then so that the tutorial will still work.

    What you might also see from the tutorial is that the points on the map follow the tracks of airplanes taking off from San Diego International Airport. Since this blog is pretty new, I haven’t yet had the opportunity to write much about airplanes and the airport. I really love the absurdity of our airport. If this city had any real weather ever, it would be impossible to get here.

    Speaking of airplanes, last night I took my new camera and lens to the airport to try to get photos of airplanes under low-light conditions. We get a 747 direct from London every evening right around sunset.


  • Terminal

    One of the reasons that I moved from Knoxville to San Diego is because the sun never rose early enough in Knoxville. Knoxville is roughly \(84^\circ\) west of Greenwich, and \(84 > 7.5 + 5 \cdot 15\), so it should have been six time zones west of GMT. That is, it should have been in central time (like Nashville is). But, no, Knoxville is in eastern time. And there are times of the year when the sun doesn’t rise until crazy-late in the morning. Like today, sunrise is at 7:31am. Waking up before sunrise is a way of life in Knoxville.

    I would rant and assert that this made it impossible for me to live in Knoxville. I would emphatically argue that my circadian rhythm was so inexorably linked to the sun that it was impossible for me to function during standard clock-time in Knoxville. I needed to use an alarm clock in order to be places on time in the morning. Barbaric.

    The earliest possible sunrise in Knoxville is roughly 6:20am. When I summered in Cambridge, MA, I would wake up early because Cambridge is so far north and so far east that the sun comes up so very early in the morning. I would have early morning meetings with my night-owl colleagues. The only real power I had over the students in my charge was waking them up at 6am. Early morning sun made everything possible.

    San Diego is \(117.16^\circ\) west of Greenwich, and safely within the pacific time zone. Even today, on our way into winter, the sun will rise around 6:30am.

    And, yet, here I am awake before 4am. For the past several months I have been waking up at roughly this time without an alarm clock. The internet tells me that this is called “Terminal Insomnia.” It is unclear to me whether this is a vestige of my neurological adventures this summer or whether I am living in some sort of folk tale, and my before-sunrise awakenings are some sort of literary device to undermine one of my justifications for leaving Knoxville.


  • Nonlinearity

    It might be time to pick things up in media res.

    My favorite passage from today’s New York Times:

    [Richard] Peto sent the paper back, but with a prank buried inside. The clinical subgroups were there, as requested — but he had inserted an additional one: “The patients were subdivided into 12 … groups according to their medieval astrological birth signs.” When the tongue-in-cheek zodiac subgroups were analyzed, Geminis and Libras were found to have no benefit from aspirin, but the drug “produced halving of risk if you were born under Capricorn.” Peto now insisted that the “astrological subgroups” also be included in the paper — in part to serve as a moral lesson for posterity.

    Other notes:

    • There is no weather today in San Diego.
    • My neurological situation has stopped being interesting to anyone.
    • Sophie the cat has lived with us for almost a year and a half.

    cat photo


subscribe via RSS