Example — Drug trial: from the counts to the three representations

A medical trial reports: 3535 patients took the drug (AA), of whom 1010 had a headache (BB); 2222 patients did not take it (A\overline{A}), of whom 1515 had a headache.

Step 1 — Counts \to Table. The data are already in tabular form:

AA (drug)A\overline{A} (no drug)Tot
BB (headache)101015152525
B\overline{B} (healthy)2525773232
Tot353522225757

Marginals in probability: P(A)=35/570,614P(A)=35/57\approx 0,614, P(A)=22/570,386P(\overline{A})=22/57\approx 0,386, P(B)=25/570,439P(B)=25/57\approx 0,439.

Step 2 — Table \to Venn. The four joint probabilities are the fractions of the cells over the total:

P(AB)=1057,P(AB)=2557,P(AB)=1557,P(AB)=757.P(A\cap B)=\tfrac{10}{57},\quad P(A\cap\overline{B})=\tfrac{25}{57},\quad P(\overline{A}\cap B)=\tfrac{15}{57},\quad P(\overline{A}\cap\overline{B})=\tfrac{7}{57}.

The Venn diagram with the absolute counts: in the intersection the 1010 patients with drug and headache, outside the ovals the 77 without drug and healthy.

Step 3 — Table \to Tree. We compute the conditionals for each row of AA:

P(BA)=1035=270,286,P(BA)=15220,682.P(B\mid A)=\tfrac{10}{35}=\tfrac{2}{7}\approx 0,286,\qquad P(B\mid\overline{A})=\tfrac{15}{22}\approx 0,682.

So among those who take the drug only 28%28\% have a headache, among those who do not take it 68%68\%: the drug is protective (negative correlation between AA and BB).

The tree conditioned on AA: on the branches the conditionals, on the leaves in red the products (the joint probabilities).

Check of the total probability (sum over the paths): P(B)=355727+22571522=1057+1557=2557P(B) = \tfrac{35}{57}\cdot\tfrac{2}{7} + \tfrac{22}{57}\cdot\tfrac{15}{22} = \tfrac{10}{57}+\tfrac{15}{57}=\tfrac{25}{57} ✓, in agreement with the marginal of the table.

Seventh conversion: tree \to inverted tree. We want the tree conditioned on BB (BAB\to A instead of ABA\to B). We proceed with the three steps seen for the inversion of the tree:

joint probabilities already computed: 1057, 2557, 1557, 757;\text{joint probabilities already computed: }\tfrac{10}{57},\ \tfrac{25}{57},\ \tfrac{15}{57},\ \tfrac{7}{57};

marginals: P(B)=2557, P(B)=3257;\text{marginals: }P(B)=\tfrac{25}{57},\ P(\overline{B})=\tfrac{32}{57};

P(AB)=10/5725/57=1025=25,P(AB)=25/5732/57=2532.P(A\mid B)=\frac{10/57}{25/57}=\tfrac{10}{25}=\tfrac{2}{5},\qquad P(A\mid\overline{B})=\frac{25/57}{32/57}=\tfrac{25}{32}.

The inverted tree has first level B,BB,\overline{B} with weights 25/5725/57 and 32/5732/57, second level A,AA,\overline{A} with 2/52/5 and 25/3225/32 (and the complements).

Reading. Given that the patient had a headache, the probability that they had taken the drug is P(AB)=2/5=40%P(A\mid B)=2/5=40\%: the majority of those who have a headache did not take the drug (negative correlation, as expected).

Topics: Probability
Concepts: Tree diagram · Venn diagram · Tree inversion · Moving between representations · Contingency table
Methods: Tree diagram · Moving between representations · Conditional probability · Contingency table
Skills: Probability calculation · Modelling