Please Pimp Me Out to Complete Strangers

Bookmark and Share

28 June 2009

Superman vs Alien

Sometimes, it's not so bad when franchises collide:



I still rate Predator would whip Superman. Predator is the sickest alien out there.

Bayesian Analysis: To probably be, or probably not be, depending on something else's probability

That man of science, Urikalish, loves to torment us superstitious, intuitive mortals who adore the Secret and the Law of Attraction with logic. This is his latest riddle:

Urikalish's Riddle


Let’s assume there’s a deadly disease that affects 1 in every 10 people.

Let's say there’s a pretty good test for this disease which is 90% accurate (that means that if a person is sick – the test will say he’s sick in 90% of the cases, and if a person is healthy – the test will say he’s healthy in 90% of the cases).

Now, assuming you took this 90% accurate test, and got a positive result that implies that you are sick - what are the odds that you are really sick?


Bayes's Theorem


The key to solving this riddle is Bayes's Theorem. Don't ask me why. I'm an elitist and I don't need to explain myself to the likes of you. Especially when I have no idea what I'm talking about.

Bayes's Theorem from Wikipedia

  • P(A|B): This is the probability of A, given B. This is what you are looking for. This is the posterior or revised probability that you have the disease, given the fact that you test positive.

  • P(B|A): This is the conditional probability, or the probability of B given A. In other words, the probability that you test positive, given that you have the disease.

  • P(A): This is the prior probability of A, or the prior probability that you have the disease, regardless of whether your test is positive or not.

  • P(B): This is the prior probability of B, or the prior probability that you test positive, whether you have the disease or not.


Smart people can fill in the data directly from Urikalish's riddle into Bayes's Theorem and get a result. Unfortunately, I played more with the glue and crayons than with the abacus and the clay when I was a kid, so I need something simpler.

An Intuitive Explanation of Bayes's Theorem


Eliezer S. Yudkowsky, that boy genius who tells us about his AI (that is, Almost Implemented) research, has the remarkable ability to make some really, really smart stuff seem really, really simple. This is Yudkowsky's explanation of Bayes's Theorem, which still went over my head (must've been toxic glue), so I tried something that is even more simple and more familiar to me, namely decision trees.

Using Decision Trees in Bayesian Analysis


Start at the beginning and make a split for those who have the disease, and those who are healthy. Each level of the tree has to add up to 1, otherwise you're cooking Dutch books. Proceed up the tree, splitting each node into all the possible scenarios, and you'll eventually cover your entire sample space and thus have a visual representation of your full joint distribution.

decision tree Bayesian Analysis

Explanation


The probability of having the disease is equal to the amount of people who have the disease and test positive, divided by the total number of people who test positive.

If you said 90%, you are stating the probability that the test is right. This is a different probability than having the disease. If you said 10%, you are stating the probability that anybody has the disease, regardless of taking the test or not. The probability of having the disease is affected by both the probability that the test is right and the rarity of the disease.

The total number of people who have the disease here is 0,1 %, or 10 out of the 100. The total number of people who test positive is 0,1 x 0,9 for those who have the disease (or 9 out of the original 100), and 0,9 x 0,1 of those who do not have the disease (also 9 out of the original 100). This means the total amount of people who test positive in the original population is 18 out of 100.

Finally, your answer 0,5 ie 50%. You get this from the 9 who test positive and do have the disease divided by 18 who test positive in the total population. The decision tree makes it visible who tested positive, so you are less likely to get confused. How likely? I don't know, draw your own damn tree.

How to remove toolbars

Toolbars really annoy the manure out of me. It is simply poor interface design to have some junk from your previous page hover over your next page. Upon navigating to a new page, the user expectancy is to see a new page, not clutter from the old page.

Why toolbars are bad


Jakob Nielsen is the guru of user interface design. He offers some heuristics to guide interface design, which make the peasant user experience much more pleasant. You may cast an eye on that list and see for yourself how many heuristics are ignored because some social networking Mafia wants to spam your browser. Tsk, tsk, social networking sites. David Bowie is very disappointed in you.

How to make toolbars go away


Yet one of the most useful heuristics I've learnt from real-life is that there are two ways to solve a problem: the political way and the technical way. The political way to make toolbars go away is to grovel and beg the social networking Mafia until they make the toolbar disappear. The technical way is just to remove the toolbar.

Removing the toolbar on Facebook


I'm on a few social networking sites. The same basic method seems to work for all of them, but since the whole world and the kitchen sink seem to be on Facebook, I'll only include the procedure to remove the toolbar on that site:


Remove the tool and keep the bar, I always say. Except when I'm saying something else like jam out with your clam out, or get your yah-yah's out or something.

From now on, Facebook's annoying toolbar will no longer haunt your external links. Unfortunately, they still malform the URL sometimes. Bloody useless bunch.

Creative Commons License