Sunday, July 8, 2012

Conditional Probability

I was trying to rekindle my interest over the weekend in Text Classification and hence wanted to revisit my probability skills. I would like to document it so in future I don't have to spend time understanding the basics.

Simply stated, conditional probability is given an event "A" what is the chance another event "B" can occur. As with anything, this statement can be further explained in depth with a example.

Consider 5 marbles (2 red, 3 blue), what it the probability of having 2 blue marbles taken from a bag in consecutive attempts. Key thing to understand is the second event is dependent on the first. The first event should draw a blue marble, followed by the second marble drawn to be blue.

So the chance that first event of drawing blue ball is 2/5. Now, the remaining marbles in the bag are 4, hence the chance of drawing another blue ball is 1/4. Conditional probability is multiplying the dependent events, hence we get: (2/5) * (1/4) = (1/10).

Thus the chance of having two blue balls 10%.

More at:
1) http://www.mathsisfun.com/data/probability-events-conditional.html
2) Shared Birthday puzzle.

How is this related to Document Text Classification?
What is the chance that a given document belongs to a classification (good/bad/unknown)?
I have been progressing through Programming Collective Intelligence and in Chapter 6, Document Classification has a nice description on how to find one!

No comments:

Post a Comment