Bayesian probability

3 minute read

Bayesian Probability, or how certain..uhum..uncertain are those results?

When dealing with probabilites and chances of events happening, for almost all cases we wear the frequentist hat; which is if we roll the dice 12 times,assuming it is a fair dice, the chances are we would get 2 "number 5"s (1/6) and for the most cases this is sufficient enough.

Another good example is the infamous roulette game. We have all heard this one before: "The house always wins", Still if you wonder around a casino, you most certainly will see a huge crowd gathered around the table, and more often than not they have a system. However, just a simple probability calculation shows that the chances of winning is just a tiny bit less than 50-50 and since this is a frequency or rather numbers again, as the number of games increases, that tiny fraction edge, return huge some of cash.

Let's get back to the point, not every matter is a frequency problem, sometimes the certainty or the uncertainty of an event is important. the most famous problem whebn defining the bayesian probability is the cancer problem. before jumping into that and regurgitating what everyone else has copy pasta-ed from math books or from Wikipedia, let's look at it from a different perspective.

Let's assume that, we work in a laboratory and we perform the cancer tests. We could come to a conclusion such as "in performing tests, 2 tests out of 1000 test turn out to be a positive!". in this kind of inference we are dealing with long term frequencies. Only repeatable random events are worthy of attaching probabilities to them, and these probabilities are not related or attached to any hypotheses. We have come to the conclucsion that the prbability of a test being positive, is 2 / 1000.

However, in Bayesian inference, we use probabilities to represent certainty or lack of it in our hypotheses or events. In Bayesian inferencing, prior knowledge plays an important role. If we know for example that Calgary Flames hockey team hasn't been able to get to the quarter finals for the last 10 years, and no significant management changes had occured, we would have a higher certainty in claiming that we are not so optimistic about Flames getting to the finals this year. A frequentist inference related to hockey could be 1 out of the 4 quarter finalists is a canadian team.

Now, going back to the infamous cancer problem. So someday you decide to do a check up and your doctor becomes suspicious of some results and makes you take a screening test and sadly to your horror, the test comes positive ("I still can't get my head around the idea, that they decided to use the word positive to describe such a horrible outcome, anyways..."). What now? is this the end of the world? certainly not....

Thanks to the bayesian inference and our prior knowledge that getting cancer is a rare incident, and doing some math, we would be relieved to find out the chances of you having a canacer is less than 10%.

The prior knowledge is something like this: only 1 out of every 10,000 people have cancerous cells. P(cancerous) = 0.01 %. Now, we have taken a test and this test, like any other tests have precision issues. if you still doubt this, you could do some research to know how accurate breathalizers are and how some unlucky (and irrsponsible) people, end up with a DUI because of a false positive (Don't drink and Drive!!!)

Even a good laboratory with state of the art testing tools are prone to failure or ``Uncertainty``! Aha!!! Uncertainty....looks like something a bayesian expert could helps us with. The most used example uses a 5% false postive and a 10% false negative. I will use these numbers as well.

When it is stated that this unit has a 5% false positive rate, it means 5 out 100 times it will show something that is not there!!!!. Consequently, a 10% false nagative rate states that 10 out of 100 tests, our testing unit will fail to detect the outcome!

now, let's roll up our sleeves and calculate the chances and see how good (read certain)our tests were in giving us the shocking news?

To be continued, testing the format now.....

Updated: