Click to See Complete Forum and Search --> : [RESOLVED] very simple probability problem (A or B or C)
wossname
Oct 27th, 2009, 06:24 AM
Can someone please verify that I've got my head on straight and see if I've got the right answer to the following probability calculation...
Three completely unrelated events have the following probabilities...
A has a probability of 0.14
B has a probability of 0.47
C has a probability of 0.71
What is the probability of 1 OR MORE of those events happening?
My working so far is to rewrite the expression as ((A or B) or C) ...
OR is calculated for 2 independent events thus: (a+b)-(a*b)
Therefore for (A or B or C)...
probtemp = ((A+B)-(A*B))
probtemp = (probtemp+C)-(probtemp*C)
For which I get a final answer of 0.867818.
This isn't very elegant really, assuming this is the right result, is there a nicer way to calculate OR probabilities for a list of events (eg without having to iterate through an array, acumulating the probability as I go)?
The internet really doesn't do a good job of explaining this kind of thing, not taht i've seen anyway, does anyone know any good online resources for probability math?
jemidiah
Oct 28th, 2009, 01:43 AM
Your formula is right (for completely unrelated events). One way to think of probabilities is as circle diagrams. If you're interested in what I mean I'll write something up.
Using your calculation, you've got
P(A or B or C) = P((A or B) or C) = ((a+b)-(a*b)+c)-(((a+b)-(a*b))*c)
= (a + b + c - ab) - (ac + bc - abc)
= a+b+c - ab-ac-bc + abc
This pattern can be extended in general to alternately add and subtract the possible (unique) combinations of elements, via the inclusion-exclusion principle (http://en.wikipedia.org/wiki/Inclusion-exclusion_principle) (the Wiki writeup is not good for beginners, unfortunately, though it does have a section specifically on probability). I would imagine that your algorithm is orders of complexity faster than actually using inclusion-exclusion, even if it's not very pretty.
I find it unfortunate how badly explained probability usually is. I'm sorry, I don't have a nice site to refer you to. In the right light, probability is really simple... but only in the right light. Otherwise it's incredibly obtuse.
wossname
Oct 28th, 2009, 07:11 AM
Thank you for that, I hate having to guess at things like this, it's good to get confirmation :)
I seem to remember probability as they taught it in my school as rather difficult to understand. To me it semed like just a bunch of arbitrary formulas that "you just have to use because they work". They didn't explain why they worked. I think that if they had explained why then it would have made more sense to everyone at the time. I still find it difficult but at least I'm making some headway at the moment, even if I forget it all by next week :D
Thanks for your help :thumb:
jemidiah
Oct 28th, 2009, 06:56 PM
I decided to formalize my notion of probability with circles. I was able to derive the first few weeks of an intro probability course (depending on the difficulty) in a couple pages. I ran out of room to state Bayes' theorem, but it's a very simple extension of what I did derive. It also shows relatively rigorously how your (a+b)-ab formula came into being, if you combine results 1 and 3. The Inclusion-Exclusion principle just extends the formula I give [P(A or B) = P(A) + P(B) - P(A and B)] by adding many circles instead of just 2.
http://img94.imageshack.us/img94/992/probability1.th.jpg (http://img94.imageshack.us/i/probability1.jpg/)
http://img688.imageshack.us/img688/4930/probability2.th.jpg (http://img688.imageshack.us/i/probability2.jpg/)
zaza
Oct 31st, 2009, 12:15 PM
Some might say that the probability of one or more events occurring is 1- (probability of none of them occurring).
The probability of none of them occurring is clearly just the individual probabilities multiplied: 0.86 x 0.53 x 0.29
QED.
jemidiah
Oct 31st, 2009, 05:24 PM
Yup, there's another way to go (which can be proven with circle diagrams if you add a "universe" box with size 1 and prove a lemma about complements and independent events). That algorithm should have the same order as the original algorithm, but I suppose you might call it "cleaner".
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.