Files
maths-cs-ai-compendium-zh/images/hypothesis_test.svg
T

48 lines
2.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg width="620" height="280" xmlns="http://www.w3.org/2000/svg">
<!-- Baseline axis -->
<line x1="40" y1="220" x2="580" y2="220" stroke="#333" stroke-width="1.5"/>
<!-- Bell curve (null distribution) -->
<path d="M 50,218 C 80,216 130,200 180,160 C 220,128 260,68 310,55 C 360,68 400,128 440,160 C 490,200 540,216 570,218" fill="#3498db" opacity="0.12" stroke="#3498db" stroke-width="2"/>
<!-- Mean label -->
<line x1="310" y1="50" x2="310" y2="220" stroke="#333" stroke-width="1" stroke-dasharray="4,3"/>
<text x="310" y="240" fill="#333" font-size="11" text-anchor="middle">μ₀ (null value)</text>
<!-- Right rejection region shading -->
<path d="M 460,185 C 475,195 500,210 520,215 C 540,218 560,218 570,218 L 570,220 L 460,220 Z" fill="#e74c3c" opacity="0.35"/>
<!-- Left rejection region shading -->
<path d="M 160,185 C 145,195 120,210 100,215 C 80,218 60,218 50,218 L 50,220 L 160,220 Z" fill="#e74c3c" opacity="0.35"/>
<!-- Critical value lines -->
<line x1="160" y1="180" x2="160" y2="225" stroke="#e74c3c" stroke-width="2"/>
<text x="160" y="250" fill="#e74c3c" font-size="10" text-anchor="middle">-z_crit</text>
<line x1="460" y1="180" x2="460" y2="225" stroke="#e74c3c" stroke-width="2"/>
<text x="460" y="250" fill="#e74c3c" font-size="10" text-anchor="middle">+z_crit</text>
<!-- Rejection region labels -->
<text x="90" y="200" fill="#e74c3c" font-size="10" font-weight="bold" text-anchor="middle">Reject H₀</text>
<text x="530" y="200" fill="#e74c3c" font-size="10" font-weight="bold" text-anchor="middle">Reject H₀</text>
<!-- Fail to reject region label -->
<text x="310" y="170" fill="#3498db" font-size="11" font-weight="bold" text-anchor="middle">Fail to reject H₀</text>
<!-- Test statistic marker -->
<line x1="490" y1="165" x2="490" y2="225" stroke="#27ae60" stroke-width="2.5"/>
<circle cx="490" cy="165" r="4" fill="#27ae60"/>
<text x="490" y="265" fill="#27ae60" font-size="11" font-weight="bold" text-anchor="middle">test statistic</text>
<!-- p-value annotation -->
<path d="M 490,175 C 510,195 540,212 570,218 L 570,220 L 490,220 Z" fill="#27ae60" opacity="0.3"/>
<path d="M 510,190 C 520,180 535,172 545,172" fill="none" stroke="#27ae60" stroke-width="1.5"/>
<text x="555" y="170" fill="#27ae60" font-size="11" font-weight="bold">p-value</text>
<text x="555" y="183" fill="#27ae60" font-size="10">(area in tail)</text>
<!-- Alpha labels -->
<text x="90" y="178" fill="#e74c3c" font-size="10" text-anchor="middle">α/2</text>
<text x="530" y="178" fill="#e74c3c" font-size="10" text-anchor="middle">α/2</text>
<!-- Title -->
<text x="310" y="25" fill="#333" font-size="14" font-weight="bold" text-anchor="middle">Two-Tailed Hypothesis Test</text>
</svg>