Skip to content
Graphviz (DOT) templates

Math — Probability Tree

A two-stage tree of conditional outcomes.

Template previewGraphviz (DOT)
ProbTree Start Start A A Start->A P(A) A' A' Start->A' P(A') A then B A then B A->A then B P(B|A) A then B' A then B' A->A then B' P(B'|A) A' then B A' then B A'->A' then B P(B|A') A' then B' A' then B' A'->A' then B' P(B'|A')

What this template contains

Graph
Directed
Edges
6
Source
10 lines

Make it your own.

digraph ProbTree {
  rankdir=LR;
  node [shape=box, style=rounded];
  Start -> A [label="P(A)"];
  Start -> "A'" [label="P(A')"];
  A -> "A then B" [label="P(B|A)"];
  A -> "A then B'" [label="P(B'|A)"];
  "A'" -> "A' then B" [label="P(B|A')"];
  "A'" -> "A' then B'" [label="P(B'|A')"];
}