41 lines
3.1 KiB
XML
41 lines
3.1 KiB
XML
<svg width="700" height="300" xmlns="http://www.w3.org/2000/svg">
|
|
<text x="350" y="25" fill="#333" font-size="14" font-weight="bold" text-anchor="middle">Bayes' Theorem Components</text>
|
|
|
|
<!-- Main formula -->
|
|
<rect x="120" y="45" width="460" height="50" rx="8" fill="#f5f5f5" stroke="#333" stroke-width="1"/>
|
|
<text x="350" y="77" fill="#333" font-size="16" text-anchor="middle" font-weight="bold">P(A | B) = P(B | A) · P(A) / P(B)</text>
|
|
|
|
<!-- Arrows from formula to labels -->
|
|
<!-- Posterior -->
|
|
<line x1="195" y1="95" x2="120" y2="135" stroke="#e74c3c" stroke-width="1.5"/>
|
|
<rect x="40" y="140" width="160" height="65" rx="6" fill="#e74c3c" opacity="0.1" stroke="#e74c3c" stroke-width="1.5"/>
|
|
<text x="120" y="160" fill="#e74c3c" font-size="12" text-anchor="middle" font-weight="bold">Posterior P(A|B)</text>
|
|
<text x="120" y="178" fill="#666" font-size="10" text-anchor="middle">Updated belief about A</text>
|
|
<text x="120" y="193" fill="#666" font-size="10" text-anchor="middle">after seeing evidence B</text>
|
|
|
|
<!-- Likelihood -->
|
|
<line x1="310" y1="95" x2="290" y2="135" stroke="#3498db" stroke-width="1.5"/>
|
|
<rect x="210" y="140" width="160" height="65" rx="6" fill="#3498db" opacity="0.1" stroke="#3498db" stroke-width="1.5"/>
|
|
<text x="290" y="160" fill="#3498db" font-size="12" text-anchor="middle" font-weight="bold">Likelihood P(B|A)</text>
|
|
<text x="290" y="178" fill="#666" font-size="10" text-anchor="middle">How probable is the</text>
|
|
<text x="290" y="193" fill="#666" font-size="10" text-anchor="middle">evidence if A is true?</text>
|
|
|
|
<!-- Prior -->
|
|
<line x1="420" y1="95" x2="460" y2="135" stroke="#27ae60" stroke-width="1.5"/>
|
|
<rect x="380" y="140" width="160" height="65" rx="6" fill="#27ae60" opacity="0.1" stroke="#27ae60" stroke-width="1.5"/>
|
|
<text x="460" y="160" fill="#27ae60" font-size="12" text-anchor="middle" font-weight="bold">Prior P(A)</text>
|
|
<text x="460" y="178" fill="#666" font-size="10" text-anchor="middle">Initial belief about A</text>
|
|
<text x="460" y="193" fill="#666" font-size="10" text-anchor="middle">before seeing any evidence</text>
|
|
|
|
<!-- Evidence -->
|
|
<line x1="490" y1="95" x2="600" y2="135" stroke="#9b59b6" stroke-width="1.5"/>
|
|
<rect x="540" y="140" width="140" height="65" rx="6" fill="#9b59b6" opacity="0.1" stroke="#9b59b6" stroke-width="1.5"/>
|
|
<text x="610" y="160" fill="#9b59b6" font-size="12" text-anchor="middle" font-weight="bold">Evidence P(B)</text>
|
|
<text x="610" y="178" fill="#666" font-size="10" text-anchor="middle">Total probability of</text>
|
|
<text x="610" y="193" fill="#666" font-size="10" text-anchor="middle">observing B (normaliser)</text>
|
|
|
|
<!-- Bottom intuition -->
|
|
<text x="350" y="240" fill="#333" font-size="12" text-anchor="middle">Intuition: start with a prior belief, update it with new evidence, get a posterior belief.</text>
|
|
<text x="350" y="260" fill="#666" font-size="11" text-anchor="middle">Strong evidence shifts the posterior far from the prior.</text>
|
|
<text x="350" y="278" fill="#666" font-size="11" text-anchor="middle">Weak evidence leaves the posterior close to the prior.</text>
|
|
</svg> |