Tuesday, November 28, 2006

Applied Mathematics

A good article in about the perils of mass-screenings (for security, disease, etc.) appears in Slate today. It points out the proverbial sharpness of the other edge of the Sword of Inference (please don't strain yourself going after that metaphor. It's not worth it). There are perils trying to make discrete inferences based on larger trends and there are perils trying to apply a trend as a discrete principle to large sets of data.

I took one applied math course in college, and in it I learned a bunch of things I have never since applied to anything, anywhere, ever. I really liked the professor, though; his name was Dr. Elderkin and he had these enormous hands that he would flap open and closed while he was lecturing, creating gale force winds that blew chalk dust around the room. Mrs. T.G. recently pointed out that I do this myself sometimes, so apparently the habit had quite an effect on me.

One of the useful things I learned from Dr. Elderkin is why screening for, e.g., diseases across populations is counter-productive and makes for bad social policy. Here's an example of the painfully stretched metaphor I tried to construct above.
  • Say the test for HIV antibodies in the blood test correctly identifies the presence of the antibodies 99% of the time, and 99% of the time it will correctly tell an uninfected person that he or she is not infected. Let's further guess that one million people in the US are infected with HIV (I'm making all these numbers up, but they're reasonably close to the actual numbers).
  • We test all adults--say, 100 million people, for HIV, and again we'll estimate that 1 million people are actually HIV positive.
  • The test is 99% effective, so (.99 * 1,000,000 = ) 990,000 HIV positive people learn that they are HIV positive. But it also gives a false positive 1% of the time, so of the remaining population, (.01 * 99,000,000 = ) 990,000 are given false positive diagnoses. That's 1,980,000 positive results, half of which are wrong.
  • Your HIV test, which is quite accurate for the individual, turns out to be only 50% accurate across an entire population.
In actuality, the HIV test is only something like 96% accurate, so the results aren't even going to be as accurate as my example. Moral of the story? Applied math: not generally applicable.

Next: inference vis à vis implication!

Wednesday, November 15, 2006

This Post Is Not About Veronica Mars

Here is something about which the only response I can muster is: holy, holy God, there are stupid people in the world, and they're all apparently in government. The Missouri State legislature decreed that the reason we have a problem with illegal immigrants coming and working in the US is that we have aborted some 80,000 potential Missourians. Apparently right now these potential humans would be in their working prime, eager to snap up those positions in abbatoirs and rendering plants that pay three dollars an hour with no health insurance. In addition, unlike those foreign illegals, these red-blooded Hypothetical Americans would be patriotic and not demand services of any kind for themselves or their myriad hypothetical children.

If the a prioris of the conservatives on the panel that produced this report (the panel had ten Republicans, all of whom signed the report, and six Democrats who a) didn't, and b) were apparently extremely embarrassed about its conclusions) weren't transparent enough (Abortion is bad! Illegal immigration is bad! If only there were some way we could unify the two...), they also managed to throw in there that "liberal social welfare policies" are to blame for Americans in general not working, and that all income taxes should be abolished in favor of sales taxes. Missouri: Punishing the Poor for Being Poor Since 1821.

I really can't, you know, possibly address all the flawed social policy here. Nor could I possibly ever cover all the fallacious logic that this one piece of policy analysis manages to stir up. And realistically I don't expect everyone to be able to root out flaws when trying to construct arguments that attempt to assign cause to observed phenomena by positing historical counter-factuals--those arguments are difficult at best. But Mother of God, who on Earth could possibly think that the source of America's social ills is that IT DOESN'T HAVE ENOUGH POOR PEOPLE?

</rant>

Next: Veronica Mars: The Nancy Drew of historical counter-factuals?

Sunday, November 12, 2006

The Ur Web 2.0 Post

In the comments of Tarn's blog, Dan asks apropos of nearly nothing, what Amazon EC2 is. While on the one hand, I'm slightly stunned that anybody outside a very small collective of developers has heard of Amazon EC2, Dan also says that he doesn't really understand what I talk about when I talk about Web Services. This is always true of everything I write about. But I'll try again anyway.

Most of the populace that throws around the term "Web 2.0" tends to mean things like YouTube, Flickr, MySpace, and Blogger--things where the content is user-generated. This ilk of websites, while being "new" in some sense, has never struck me as a particular innovation in and of themselves (though the technology that runs them, in many cases, is). To me, Web 2.0 is the process of opening up the platforms on which the web is built, so that the software that powers applications that have heretofore only existed in the browser can be used everywhere--the desktop, your mobile devices, your television, and so on.

When I explain what a web service is at parties, I use the following example. If you, a person, want to know some piece of information about any book out there, you'd go to your browser and surf to Amazon.com and look it up. There you'll find the cover image, all the bibliographic information, some reviews, etc. Now say you're a computer program and you want that same information about a book (because, e.g., you're a library program and you want to be able to display information about a book when somebody scans the barcode). You, alas, do not know how to use a web browser. You could be programmed to read web pages, but web pages come in all sorts of formats and change all the time, and computer programs have to be taught to read each one individually, because they're just that stupid sometimes. So web services are like web pages for software applications--sets of functions that they can call in order to get information that will be returned in a format that they, the software applications, will understand. In the example I just gave, the web service would have a function that, when you send it a book's ISBN, returns a formatted set of information about that book, with its title, author, number of pages, and so on, in a format that the software has been programmed to understand.

Amazon has a free web service called ECS that does exactly what I've just described, as well as many other things. You can sign up for it (and encounter some of my handiwork) here. Then you too could write software applications that are web-integrated and feature-rich and blah blah blah Web 2.0 blah. You are, in fact, using web services all the time--most of the widgets in OSX Dashboard, for instance, make web service calls to get their information. iTunes, when you pop in a CD, is querying a webservice to figure out what album it is so that it can populate the album information.

The nice thing about web services is that they allow you (for a definition of the word "you" that involves "you" being a "software developer") to use the software that Amazon wrote in more ways than just browsing their web site. ECS, for instance, allows you to use their shopping cart software, so that if you're running your own e-commerce website, you can use Amazon's shopping cart instead of writing your own (if written by a more business-oriented person, that sentence would have contained the word "leverage," and probably "synergy," and "core competencies," but I would have had to shoot myself in the head afterwards). The point is, Amazon sells things. They started out with books, then music, then pretty much everything that was a thing, and now they're selling (or in some cases, just giving away) the use of the software that they wrote to sell those things in the first place.

Amazon S3 and Amazon EC2 are the next phase of that: selling something that Amazon has in excess most of the year (hard drive space and server time--Amazon has to have enough hardware on hand to run the website at Christmas when we get vastly more traffic, but the rest of the time these servers are just sitting around). EC2 (or "Elastic Compute Cloud"--which, by the way, was called "Amazon Execution Service" at first, until someone finally noticed that the name was liable to give people the wrong idea about what the product did) allows you to create computer jobs (e.g. you need to render some massive 3-D images, or sift through a mass of data from SETI looking for patterns) and rent time on Amazon servers to perform them, which means you don't have to buy and maintain your own server. And like S3 (which, to review, is a virtual harddrive), it's also a web service, so you can do this from a computer program. Which in turn means you could, e.g., run a website that renders massive 3-D images or analyzes SETI data, host the actual website on your tiny slow machine in your basement, and farm out all the labor and storage out to Amazon, thereby changing the world. Or at least that's the way it looked on paper.

Thursday, November 09, 2006

We Used To Be Friends (A Long Time Ago)

Tarn alerted me to the possibility that there might, out there in the universe, be a dashboard widget that would allow me to post to The Odds Are One from OSX Dashboard. And indeed, such a widget exists. Here I am, using it. And lo, the world is made new. Surely this is the technological advance that will foment my creative breakthrough, allowing me the freedom to blog every day, to dash off some brilliant paragraph or two just before I head off to bed. Surely the only thing that was standing in the way betwixt me and Great Art was better UI.

What with the Forces of Evil having been (temporarily) defeated yesternight, The Gadflies have, this night, gone out for a celebratory evening involving sushi and lots of alcohol with our compatriot Mita. Somewhere last evening, after the votes were cast but while the Webb/Allen election was still in doubt (it's been called for Webb as of this writing. For the leftist radicals that live in the Gadfly household, Webb is absolutely nothing to write home about, but being that he's Number 51, for tonight he's one of us. In summation: hurrah!), I conceived of an OaO post about cause, wherein I would talk about how pundits would, in the future, attribute some manner of cause to Webb's or Allen's defeat. In the event of the latter, of course, they'd talk about his "Macaca Moment," and how this brought into stark relief the fact that George Allen is a fucking lunatic. If he had won (which he didn't. I'm quoting myself here: "Hurrah!"), somehow, that factor would no longer achieve the golden label of "Cause." This in spite of the fact that it would have influenced the exact same number of votes (in review, all votes have already been cast in this post-hoc estimation of voter intent)--in that case they'd be talking about how Webb's overt sexism and failure to articulate a position other than one of anti-party-in-power weren't enough for him to take the crown. The thing is, we exist in a state of superposition of Webb/Allen election. It happens that Webb has 7200 more votes out of 4 million or so, and so he takes office, but as with the Presidential elections of 2000 and 2004, somebody has to take office despite the fact that nobody won. So suddenly, and for the rest of time, "Macaca" becomes a political cliche for that moment of political implosion, in spite of the fact that Allen ended the race in a virtual tie with the bass-ackwards anti-feminist ex-Republican running against him. Narrative is funny that way.

There are so many problems here that I can't even being to describe them. One, the Blogger Dashboard widget doesn't have a scrollbar, so instead of taking the hint that I had to write shorter posts, I posted this and am editing it in a browser. Second, I just blogged about the thing I meta-didn't-blog-about. But the real problem here, in true Chambersian form (I'd have a better href for you there, but I'm too drunk right now), is that I have already blogged this post 10,000 times in 10,000 different ways, and you read it and understood it the first time, and indeed recognized the phenomenon of Odds-Are-Oneness in whatever discipline you came from already, and were already going to subconsciously apply the principle every time you read about politics and "Macaca Moments" for the rest of your life. Yet I just wrote this post anyway. So what the hell am I doing?