FINAL TOOLBOX
04 // インタラクティブ数式・公式辞典 // 確率分布・回帰分析・情報エントロピーの公式集P(A | B) = [ P(B | A) · P(A) ] / P(B)

ベイズの定理の公式 — 事前確率から事後確率への更新

新しい検査結果や観測データ B が得られたときに、元の見込みである事前確率 P(A) を正確な事後確率 P(A|B) へと更新する確率論の基本公式です。

公式リファレンス
基本公式
P(A | B) = [ P(B | A) · P(A) ] / P(B)
変形した式
P(B) = P(B|A)·P(A) + P(B|¬A)·(1 − P(A))
Posterior Odds = Likelihood Ratio × Prior Odds
変数と単位
変数と単位 — Bayes' Theorem Conditional Probability Formula
SymbolNameUnit
postPosterior Probability P(A|B)probability (0–1)
priorPrior Base Rate P(A)0–1
sensSensitivity P(B|A)0–1
fprFalse Positive Rate P(B|¬A)0–1
入力値・パラメータ
[0–1]
[0–1]
[0–1]
計算結果 (Posterior Probability P(A|B))
post =0.166667probability (0–1)

公式の解説・背景

  • By definition of conditional probability, P(A ∩ B) = P(A|B)P(B) = P(B|A)P(A); dividing by marginal P(B) expanded via the Law of Total Probability yields Bayes' rule.
  • Demonstrates the base-rate fallacy: when prevalence P(A) is rare, even a 99% sensitive / 95% specific test yields a modest single-test positive predictive value.

具体的な計算例

#1: Medical screening for a 1% prevalence condition (P(A)=0.01) using a test with 99% sensitivity and 5% false-positive rate (95% specificity).
P(A) = 0.01P(B|A) = 0.99P(B|¬A) = 0.05
P(A|+) = (0.99 × 0.01) / (0.0099 + 0.05 × 0.99) = 0.0099 / 0.0594
→ P(A|+) = 0.1667 (16.67% Positive Predictive Value)
#2: Running a second independent confirmatory test with the same 99% sensitivity / 5% FPR using 16.67% as the updated prior.
Updated Prior = 0.1667
P(A|++) = (0.99 × 0.1667) / (0.1650 + 0.05 × 0.8333) = 0.1650 / 0.2067
→ P(A|++) = 0.7984 (79.84% after two positives)
このツールは役に立ちましたか?

よくある質問(FAQ)

ベイズの定理の公式 — 事前確率から事後確率への更新の使い方は?+

数値を入力するかスライダーを動かすだけで、ベイズの定理の公式 — 事前確率から事後確率への更新(数式: P(A | B) = [ P(B | A) · P(A) ] / P(B))をブラウザ上で即座に計算・視覚化できます。新しい検査結果や観測データ B が得られたときに、元の見込みである事前確率 P(A) を正確な事後確率 P(A|B) へと更新する確率論の基本公式です。

ベイズの定理の公式 — 事前確率から事後確率への更新の計算結果やグラフは保存できますか?+

はい。計算結果のワンクリックコピーに加え、高解像度のSVG・PNG画像、CSVデータ、印刷用ワークシートとして即座に出力できます。

ベイズの定理の公式 — 事前確率から事後確率への更新のサンプルデータを消去して白紙から入力できますか?+

はい。ツール上部のクリア(白紙から開始)ボタンを押すとすべての入力欄がリセットされ、いつでもサンプルデータを再読み込みできます。