# Visualising Bayes theorem

Can some please explain me the tree diagrams from here. Left of the diagrams it says

"The role of Bayes' theorem is best visualized with tree diagrams, as shown to the right. The two diagrams partition the same outcomes by $A$ and $B$ in opposite orders, to obtain the inverse probabilities. Bayes' theorem serves as the link between these different partitionings."

But I don't understand what exactly is partitioned there and how. What does the root of the tree signify ? And what is $\overline{B}$ ? Is it the complement of $B$, $B^c$ ?

-
To clear up a small part of the question - you are correct that $\overline{B}=B^{\mathsf{c}}$. –  Matthew Pressland Dec 29 '12 at 12:04
I have added what I think you mean by the diagram –  Henry Dec 29 '12 at 15:45
@Henry Yes, that is the diagram, thanks. –  user26698 Dec 29 '12 at 16:13
@Henry Thank you so much for adding the diagram! I will edit my answer somewhat, now that I can see the diagram clearly. –  Ellie Kesselman Dec 29 '12 at 16:22
TO EVERYBODY: This question still needs some answers please (see the comments I made below Feral Oinks answer; this is what really interests me). –  user26698 Dec 30 '12 at 16:24

What does the root of the tree signify?
There are two roots, assuming that we are referring to the same diagram. In the upper half of the image, the root is an experiment whose possible outcomes are either $A$ or $not$ $A$. In the lower half of the image, the same is true i.e. the root is an experiment whose possible outcomes are either $B$ or $not$ $B$. In using the word "experiment", the article likely is describing an $i.i.d.$ random variable. Thus the top tree branches into $Prob$ ${[A]}$ and $Prob$ ${[not A]}$, or according to the diagram, $Prob$ $[\overline{A}]$.

Complementary
Yes, you are correct. $\overline{A}$ is $A^c$, the complement of $A$. Similarly, $\overline{B}$ is the complement of $B$, otherwise known as $B^c$.

Puzzling partition
Given that the more casual word "experiment" is used instead of "$i.i.d.$ random variable", I was surprised to see "partition" later in the article. I think it is being used as a word, not as a term. Yes, I realize that it is internally linked ("Wikilinked") to the formal definition of partition in some parts of the article, but I am not convinced that is appropriate or necessary. I would suggest concentrating on the text that is incorporated as part of the illustration itself, rather than the verbiage written to the left in the article.

Understanding the diagram
I would suggest perusing this page about Bayes's Theorem and probability tree representations as it gives both proofs and three numeric problems, including the solutions. It was included as a link in the talk page for the Wikipedia article, by the same person who contributed the tree diagram. It includes a corresponding tree diagram for each of the three problems too.

*EDIT
Here's another way of understanding the diagram. I still believe that the verbiage containing "partition", is referring to the word and not the definition. The article describes Bayes's Theorem in the context of epidemiology throughout, rather than theoretically.

Let's assume that we are using the frequentist interpretation of Bayes's Theorem to study a single population. The diagram separates (or "partitions") this population in two different ways. The upper diagram stratifies the population into two groups, with and without property A, and then further stratifies into the two groups, with and without property B. The lower diagram is the reverse. First it stratifies by property B, then by property A.

The article said that A might be the situation of having a risk factor, and B might be a confirmed diagnosis for the actual condition possibly associated with that risk factor.

The idea is to find the probability of condition B. If we pick every member of a population with property A (the risk factor), and ask "what proportion of these have property B (the condition)?", this gives the probability of B given A. Conversely, if we pick every member of the same population with property B and ask "what proportion of these have property A?" this gives the probability of A given B. One is the overall proportion with B, and the other is the overall proportion with A. Bayes' theorem links these probabilities, which are in general different from each other.

Please note that I am not denigrating the overall content or worth of the article! Remember that Wikipedia is written collaboratively, often by several individuals for a given article, thus some parts may not be perfectly consistent with other sections within the same article. In fact, THIS (see below) was the earlier version of the diagram that you referenced in your question!

I found it more confusing, but perhaps it will be helpful to you.

-
Could also please give me a hint what all of this has got to do with Bayes theorem ? And how suddently the $B$ creeps into the upper diagram (resp. $A$ into the lower) if these are different experiments ? –  user26698 Dec 29 '12 at 16:30
I'm sorry for taking so long to respond! My browser hung while editing this, maybe it was due to too much notation? Anyway, I didn't want to lose everything, finally got it back! I tried to address what you asked about in your comment before you asked, as I thought similarly i.e. WHAT does this have to do with Bayes's Theorem?! The Wikipedia talk page comments mention that lack of clarity too ;o) Tell me if this remains unclear, okay? –  Ellie Kesselman Dec 31 '12 at 13:11

I am suggesting to use tree diagrams together with venn pie charts. If events A and B presented as overlapping sectors - their relations and ratios become intuitive and make a lot of sense. http://dl.dropbox.com/u/133074120/venn_pie_solver.html

-