# What is Baye's Theorem in simplest way

I am currently planning to take a course on artificial intelligence, there Bayes theorem is the basic. Now I tried to understand bayes theorem so many times. But to understand that I have to understand conditional probability, joint probability and total probability. So can anyone answer my following questions in a simplest way?

1. What is difference between conditional probability and joint probability? I would be glad if someone can explain intuitively in real life problems and mathematically also.

2. What is Total probability?

3. Explain bayes theorem in simple logic and where I can use them? Real life examples would be better....

-

## 2 Answers

I think Bayes' theorem is intuitive if you just multiply through with the denominator. The formula is

$$P(A, B) = P(A|B)P(B) = P(B|A)P(A).$$

This is, in a way, the definition of conditional probability. Look at the first one:

$$P(A, B) = P(B|A)P(A).$$

There are many equivalent ways to interpret this. Let me give you one example.

Let $A$ be the event "I am hungry", and $B$ the event "I go to a restaurant". Note that it's possible for me to be hungry and not go to a restaurant, and it's also possible for me to go to a restaurant without being hungry. But there is a correlation like this: The chance of me going to restaurant increases if I'm hungry. That means $P(B|A) > P(B)$. (This is only true in this example!) $P(B|A)$ is called the conditional probability because it is conditioned on $A$. It is the probability of $B$ happening given the knowledge that $A$ happens.

The joint probability is $P(A, B)$, the chance of both $A$ and $B$ happening. If I know $P(A)$ and $P(B|A)$, I can compute $P(A, B)$ as follows. First, think about how probable $A$ can happen. That is $P(A)$. And assuming $A$ happens, how probable is it that $B$ also happens? That is $P(B|A)$ by definition. Multiplying them together, I get the probability that both $A$ and $B$ happen.

-

What does this have to do with Bayes' theorem? – Dilip Sarwate Aug 31 '12 at 11:52
It's just the first equation. – Tunococ Sep 1 '12 at 0:09

I believe that the following article on Wikipedia answers your Question 3 quite nicely: http://en.wikipedia.org/wiki/Bayes'_theorem (see the Introductory Example).

Bayes Theorem is about "reversing" the conditional probability, i.e. finding $P(A\mid B)$ given $P(B\mid A)$. This is sometimes easier than directly finding $P(A\mid B)$.

Another nice website is : http://betterexplained.com/articles/an-intuitive-and-short-explanation-of-bayes-theorem/.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 23, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9507700800895691, "perplexity_flag": "head"}