🎲 贝叶斯定理Bayes Theorem
P(A|B) = P(B|A)P(A) / P(B)。本地处理。可设置「P(A)」、「P(B given A)」、「P(B)」。P(A|B) = P(B|A)P(A) / P(B). Processed locally. Settings: P(A), P(B given A), P(B).
使用说明与常见问题How-to & FAQ
「贝叶斯定理」是什么?What is the Bayes Theorem tool?
P(A|B) = P(B|A)P(A) / P(B)。本地处理。可设置「P(A)」、「P(B given A)」、「P(B)」。P(A|B) = P(B|A)P(A) / P(B). Processed locally. Settings: P(A), P(B given A), P(B).
如何使用「贝叶斯定理」?How do I use the Bayes Theorem tool?
在「贝叶斯定理」中,填写「P(A)」、「P(B given A)」、「P(B)」等参数,结果会随输入实时计算并显示在下方。In the Bayes Theorem: Fill in "P(A)", "P(B given A)", "P(B)"; results are recalculated instantly as you type.
P(B) 不知道怎么办?What if I don't know P(B)?
需要先用全概率公式算出来:P(B) = P(B|A)·P(A) + P(B|非A)·P(非A),再填入。本页按 P(A|B) = P(B|A)·P(A) ÷ P(B) 计算,P(B) 必须大于 0。Work it out first with the law of total probability: P(B) = P(B|A)·P(A) + P(B|not A)·P(not A), then enter it. The page computes P(A|B) = P(B|A)·P(A) ÷ P(B), and P(B) must be above 0.
概率范围?Probability range?
P(A)、P(B|A)、P(B) 均须在 (0,1]。若算出的 P(A|B)>1,页面会警告输入可能不一致。P(A), P(B|A) and P(B) must each be in (0,1]. If P(A|B) comes out above 1, the page warns that the inputs may be inconsistent.
能举个计算实例吗?Can you show a worked example?
例如在「贝叶斯定理」中填 P(A) = 0.01,P(B given A) = 0.9,P(B) = 0.1,结果区显示:P(A|B):0.09For example, entering P(A) = 0.01, P(B given A) = 0.9, P(B) = 0.1 in the Bayes Theorem gives: P(A|B): 0.09
哪些输入会被检查?Which inputs are validated?
「贝叶斯定理」会检查这些输入——「P(A)」、「P(B given A)」、「P(B)」:必须填写;绝对值超过 10¹⁵ 的数也会被拒绝。不符合时结果区显示具体提示,不会给出数字。The Bayes Theorem checks its inputs — "P(A)", "P(B given A)", "P(B)": required; numbers above 10¹⁵ in absolute value are rejected too. When a value fails, the result area names the problem instead of showing a number.
有哪些选项可以调整?What options can I adjust?
「贝叶斯定理」的设置:「P(A)」默认 0.01;「P(B given A)」默认 0.9;「P(B)」默认 0.1。每次生成结果都按当前设置处理。Settings in the Bayes Theorem — "P(A)" default 0.01; "P(B given A)" default 0.9; "P(B)" default 0.1. The result always uses the current settings.
计算精度如何?How precise are the results?
「贝叶斯定理」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Bayes Theorem uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「贝叶斯定理」免费吗?需要注册吗?Is the Bayes Theorem free? Do I need an account?
「贝叶斯定理」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Bayes Theorem is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.