Intuition out of counter-intuition

Source: Internet
Author: User
Intuition out of counter-intuition

Liu weipeng
C ++'s Luo Yun (http://blog.csdn.net/pongba)

Lately I stumbled into SS an interesting article about Bayes Theorem (you can find it here-Please read it first (it's a pretty enjoyable Article ), otherwise you might not know what I'm talking about ). the article is entitled "It's not so easy to predict murder, do the math ".

As interesting as the writing is, the most intriguing part of it is the application of Bayes Theorem to calculate the chance of a correct guess when deducing if someone is a potential murder.

It turns out that, when the percentage of people who're potential murders becomes low, the odds that the psychiatrist makes a wrong guess about whether one is a potential murder becomes high.

For instance, let's assume that the "specificity" of a murder-prediction made by a psychiatrists is 99.9%, and the "sensitivity" 99.9%, too, then for, say, 10,000 people, of which 150 are potential murders, the chance that one, when predicted as a murder, wocould actually be a murder is about 150/151, which is a pretty high one.

But then it dives into the counter-intuitive part.

Assume only 1 out of 10,000 people are actually potential murders, then the chance that a predicted murder is actually a potential one is 1/2 (50% ), which suggests a pretty high chance that the psychiatrist cold've been wrong.

However, the point is, when someone says that something is counter-intuitive, there's a good chance that we can find something underneath that is intuitive again. that is, the reason people are calling it counter-intuitive is just that they get something wrong along the line, which eventually leads to the counter-intuition.

In this special case. the confusion roots in the understanding of the specificity/sensitivity of a murder-prediction. as was told, the specificity and the sensitivity are both 99.9%. this can give us a false-belief that the prediction is a highly accurate one, which, because of the vagueness of human natural language, can in turn lead us to the belief that, whatever the context is, a predicted murder is, of the probability 99.9%, an actual potential murder. and therein lies the problem.

Let's recap the definition of "specificity" and "sensitivity": when we say that the sensitition of a prediction is 99.9%, that means that if one is actually something, then there's a pretty high chance (99.9%) that he/she is predicted as something. similarly, a specificity of 99.9% suggests that when one isn' t something, there's a pretty high chance (99.9%) that he/she isn' t predicted as something. I N terms of mathematic language, this is to say: P (PRED (a) | A) = 99.9% and P (~ PRED (a) | ~ A) = 99.9%.

Now recall that we thought of this differently. actually we thought that "a predicted murder is, of the probability 99.9%, an actual potential murder ". in terms of mathematics, this is to say: P (A | PRED (A) = 99.9%, which is of the reverse Form W. r. t. the definition of sensitivity. and this is exactly the source of all the counter-intuition.

Once we 've captured the essence of the definition of "specificity" and "sensitivity" (note that they cocould, if the same, be referred to as "accuracy" collectively ), the left job is easy-we just need to use the Bayes Theorem Mechanic:

Let a = "One is potentially a murder"; PRED (A) = "One is predicted as a potential murder ".

Preconditions:
P (PRED (a) | A) = 99.9%; P (~ PRED (a) | A) = 0.1%;
P (~ PRED (a) | ~ A) = 99.9%; P (PRED (a) | ~ A) = 0.1%;

Bayes Theorem application:
P (A | PRED (A) = (P (PRED (a) | A) * P (A)/P (PRED ());
Where p (PRED (A) = P (a) * P (PRED (a) | A) + P (~ A) * P (PRED (a) | ~ A ).

Now assume we have 10,000 people accepting the test, 1 of them is actually potentially a murder.
Then we 'd have P (A) = 0.0001; P (~ A) = 1-P (A) = 0.9999; plug them into the equation above, we have:

P (A | PRED (A) = (0.999*0.0001)/(0.0001*0.999 + 0.9999*0.001 )~ = 1/10;
This implies that, if one is predicted as a potential murder, then there's only a 1/10 probability that he/she is actually one. Pretty embarrassing result, isn' t it?

And if we adjust P (~ PRED (a) | ~ A)-The specificity-to 99.99%, which is the original setting of the article in question. This'll become:
P (A | PRED (A) = (0.999*0.0001)/(0.0001*0.999 + 0.9999*0.0001 )~ = 1/2;
Which is still pretty rough.

As it turned out, when the percentage of people who're actually potential murders becomes very low, the specificity becomes critical and it practically dominates the result. that's why in some scenarios where the samples that satisfy some particle conditions are rare, the specificity of the test is extremely important; straightly put, when the sample set is large and the percentage of the object samples is very low, one more (or fewer) '9' at the tail of the specificity wold' ve changed the result dramatically.

A related example comes from data-mining, where you may construct a predictor/classifier to predict if one has cancer. and because of the severe percentage of patients who actually have cancer, a seemingly high sensibility or specificity isn' t enough; it may classify those who doesn't have cancer correctly at a very high score, but as long as one or a few wrong predictions W. r. t. the cancer-having patients occur, the result wocould be bad. hence in those situations, often some other techniques are used as supplements.

But, you may ask, then why isn't the accuracy of a prediction defined as P (A | PRED (a) in the first place? This way we 'd never have to do such tedious calculation. the reason is actually a simple one: The sample set of PRED (a) is usually too small (for instance, how much of a general group of people have AIDS ?) To draw a reasonablly accurate P (A | PRED (A) from. the sample set of A, on the other hand, is usually large enough to draw a reasonably accurate approximation of P (PRED (a) | A) from.

Another way to look at this issue:

Consider the Bayes Theorem:

P (A | B) = (P (B | A) * P (A)/P (B ).

Let's rewrite it a little bit:

P (A | B) = P (B | A) * (P (A)/P (B )).

This way we can see clearly that P (A | B) is proportional to P (B | A), provided that P (B) and P (A) are fixed. an immediate conclusion is that, the higher/lower the accuracy of murder-detection is, the higher/lower the probability that one is actually a potential murder when predicted as one is; and vice versa. actually, this kinda conforms to our intuition-the higher the probability that B occurs when a occurs, the higher the probability that a occurs when B occurs.

The tricky part, though, lies in the proportion factor (I. e. P (B)/P ()).

Let's still take murder-detection as our example, then a wocould mean "one is actually a potential murder" and B "One is predicted as a potential murder" (I. e. PRED ()). if we're concerned about the precise number, we must take into account the proportion of actual potential murders as oppose to that of those who're not. given the original setting (I. e. 1 out of 10,000 people are actually potential murders), we can readily calculate P (B)/P (A), which is what has Ted the final result.

This wocould be even clearer if we draw a little ven digoal, though. But I lack the time and patience to do that. So you may draw it and see for it yourself.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.