I know that: $P(c|o) = \frac{P(o|c) P(c)}{P(o)}$
My question is why can't one calculate $P(c|o)$ directly and not use this formula?
I know that: $P(c|o) = \frac{P(o|c) P(c)}{P(o)}$
My question is why can't one calculate $P(c|o)$ directly and not use this formula?
Bayes' formula should be written using the law of total probability as $ P(B|A) = \frac{P(A|B)P(B)}{P(A|B)P(B)+P(A|B^c)P(B^c)} $ which emphasizes that the numerator is one of the terms in the denominator. If $P(B|A)$ can be computed directly, then there is no need to use Bayes' formula. But, when $P(B|A)$ is not easy to compute directly but $P(A|B)$ and $P(A|B^c)$ can be determined more easily, then Bayes' formula is used to "turn the conditioning around, getting $P(B|A)$ from $P(A|B)$".
Example: The experiment consists of picking one coin at random from three coins, two of which are fair and one is biased, turning up Heads with probability $p \neq \frac{1}{2}$, and tossing it. Let $A$ be the event that the coin turn up Heads, and $B$ the event that the coin picked is fair. What is $P(B|A)$? This is a bit tricky to get directly, while $P(A|B) = \frac{1}{2}$, $P(A|B^c) = p$, $P(B) = \frac{2}{3}$, and $P(B^c) = \frac{1}{3}$ are all known. Thus, $P(B|A) = P\{\text{fair}\mid \text{Heads}\} = \frac{\frac{1}{2}\times\frac{2}{3}}{\frac{1}{2}\times\frac{2}{3} + p\times\frac{1}{3}} = \frac{1}{1+p}. $
Often you can calculate the conditional probability directly. For example, if you're given the following table of frequencies
| Positive | Negative | --------+----------+----------+ Group A | 100 | 200 | Group B | 500 | 200 |
Then you can easily calculate P(positive|A) = 1/3 and P(A|positive) = 1/6.
Bayes' rule still applies, although it's not the easiest way to compute the conditional probabilities. A quick calculation shows that
and you can check that
1/6 = P(A|positive) = P(positive|A) P(A) / P(positive) = 1/3 * (3/10) / (6/10)
However, in a more complicated situation it may not be obvious what the conditional probabilities are. In this case you can use Bayes' rule to describe a conditional probability in terms of its inversion, if you also know the unconditional probabilities. One way to view Bayes' rule is simply as a method to calculate one of the quantities given the other three (although that's not the most sophisticated point of view).