統計で英語多読 3-3: ベイズの定理 — 結果から原因の確率を求める
ベイズの定理を題材にした英語多読ユニット。約670語の英文と全文日本語訳で、結果から原因の確率をさかのぼる考え方を医療診断の例でたどります。
「大人のための英語多読図書館」へようこそ。今回は、結果から原因をさかのぼって推測する「ベイズの定理」を、医療診断の有名な例とともに、英語の文章でたどっていきます。
📊 このユニットの情報 語数: 約670語 / 推定読了時間: 5〜7分 / 難易度: ★★☆☆☆(初中級)
Learning Objectives
みなさんこんにちは。大人のための英語多読図書館へようこそ。
今回は、統計学の中でも特に強力で、考え方が面白い「ベイズの定理」について学びます。これまでの確率では、「原因(例:サイコロを振る)から結果(例:1の目が出る)の確率」を考えてきました。ベイズの定理は、その逆の発想をします。つまり、「結果(例:検査で陽性だった)がわかったときに、その原因(例:本当に病気である)の確率」を求めることができるのです。
この「結果から原因を推測する」という考え方は、私たちの身の回りでたくさん使われています。例えば、迷惑メールフィルタがある単語を見て「これは迷惑メールだ」と判断したり、お医者さんが症状から病気を診断したりするのも、ベイズの定理の考え方が応用されています。
この記事では、新しい情報を使って、もともと持っていた確率の考えを更新していくプロセスを学びます。少し難しく感じるかもしれませんが、具体例と一緒にゆっくり理解していきましょう。
それでは今回も多読を楽しんでいきましょう。
Summary
- Core Idea: Bayes' theorem allows us to update our belief about a hypothesis (the cause) based on new evidence (the result). It calculates a conditional probability in reverse.
- The Formula: The theorem is stated as: \(P(A|B) = \frac{P(B|A)P(A)}{P(B)}\)
- Key Terms:
- \(P(A|B)\) - Posterior Probability: The updated probability of A after considering the evidence B. This is what we want to calculate.
- \(P(A)\) - Prior Probability: The initial probability of A before we have any evidence.
- \(P(B|A)\) - Likelihood: The probability of observing the evidence B if our hypothesis A is true.
- \(P(B)\) - Evidence: The overall probability of observing the evidence B.
- Application: It is widely used in medical diagnostics, spam filtering, machine learning, and many other fields where we need to make inferences from data.
Explanation
The Intuition: Updating Your Beliefs
Imagine you are looking for your keys. You think there's a 50% chance they are in your jacket pocket. This is your initial belief, or prior probability. Then, you hear a jingle from your jacket as you pick it up. This new information, or evidence, makes you more confident. You might now update your belief to, say, a 90% chance.
Bayes' theorem is the mathematical rule that tells you exactly how to perform this update. It provides a logical way to move from a prior probability to a posterior probability when new evidence becomes available.
Deriving the Theorem
The theorem itself is derived directly from the rules of conditional probability we've already learned.
We know the general multiplication rule can be written in two ways: 1. \(P(A \cap B) = P(A|B) \times P(B)\) 2. \(P(A \cap B) = P(B|A) \times P(A)\)
Since both right-hand sides are equal to \(P(A \cap B)\), we can set them equal to each other: \[P(A|B) \times P(B) = P(B|A) \times P(A)\]
Now, we just need to solve for \(P(A|B)\) by dividing both sides by \(P(B)\): \[P(A|B) = \frac{P(B|A)P(A)}{P(B)}\]
This is Bayes' theorem. It connects \(P(A|B)\) (the probability of cause A given result B) with \(P(B|A)\) (the probability of result B given cause A).
A Classic Example: Medical Diagnosis
Let's see how this works with a famous example. Suppose there is a rare disease that affects 1% of the population. There is a test for this disease which is 99% accurate. This means: - If a person has the disease, the test will be positive 99% of the time (true positive rate). - If a person does not have the disease, the test will be negative 99% of the time (true negative rate).
Now, imagine you take the test and the result is positive. What is the probability that you actually have the disease?
Let's define our events: - A: You have the disease. - B: Your test result is positive.
We want to find \(P(A|B)\).
Let's break down what we know: - Prior Probability, \(P(A)\): The probability of having the disease before the test. This is the prevalence in the population, so \(P(A) = 0.01\). - Likelihood, \(P(B|A)\): The probability of a positive test given that you have the disease. This is the test's accuracy, so \(P(B|A) = 0.99\). - Probability of the Evidence, \(P(B)\): The overall probability of getting a positive test result. This is the trickiest part. A positive result can happen in two ways: 1. You have the disease AND test positive: \(P(A \cap B) = P(B|A)P(A) = 0.99 \times 0.01 = 0.0099\). 2. You don't have the disease AND test positive (a false positive). - The probability of not having the disease is \(P(A^c) = 1 - 0.01 = 0.99\). - The probability of a positive test given you don't have it is \(P(B|A^c) = 1 - 0.99 = 0.01\). - So, \(P(A^c \cap B) = P(B|A^c)P(A^c) = 0.01 \times 0.99 = 0.0099\).
The total probability of a positive test, \(P(B)\), is the sum of these two possibilities: \[P(B) = 0.0099 + 0.0099 = 0.0198\]
Now we have all the pieces for Bayes' theorem: \[P(A|B) = \frac{P(B|A)P(A)}{P(B)} = \frac{0.99 \times 0.01}{0.0198} = \frac{0.0099}{0.0198} = 0.5\]
The result is surprising. Even with a 99% accurate test, a positive result only means you have a 50% chance of actually having the disease! This is because the disease is so rare. The number of healthy people getting false positives is equal to the number of sick people getting true positives. Bayes' theorem helps us see through our intuition and make a more accurate judgment based on all the evidence.
まとめ
今回は、結果から原因の確率をさかのぼって求める「ベイズの定理」\(P(A|B) = \frac{P(B|A)P(A)}{P(B)}\) を学びました。事前確率・尤度・エビデンスといった部品が、条件付き確率の式からどう組み上がるかを確かめ、医療診断の例で計算しました。精度99%の検査でも陽性が出たときに本当に病気である確率はわずか50%という結果は、病気がまれであるほど直感が外れることを教えてくれます。
次回は、確率変数と確率分布を取り上げ、期待値と分散の計算について見ていきます。
日本語訳(全文)
英文を最後まで読み終えてから、答え合わせ用にお使いください。多読の原則として、まずは訳を見ずに英文だけで理解を試みることをおすすめします。
Summary
- 核となる考え方: ベイズの定理は、新しいエビデンス(結果)にもとづいて、ある仮説(原因)についての確信を更新することを可能にします。条件付き確率を逆向きに計算するものです。
- 公式: 定理は次のように表されます。\(P(A|B) = \frac{P(B|A)P(A)}{P(B)}\)
- 重要な用語:
- \(P(A|B)\) - 事後確率(Posterior Probability): エビデンスBを考慮したあとの、更新されたAの確率。これが私たちが計算したいものです。
- \(P(A)\) - 事前確率(Prior Probability): エビデンスを得る前の、Aの最初の確率。
- \(P(B|A)\) - 尤度(Likelihood): 仮説Aが正しいとした場合に、エビデンスBが観測される確率。
- \(P(B)\) - エビデンス(Evidence): エビデンスBが観測される全体としての確率。
- 応用: ベイズの定理は、医療診断、迷惑メールフィルタリング、機械学習など、データから推論を行う必要がある多くの分野で広く使われています。
直感: 確信を更新する
鍵を探していると想像してください。鍵がジャケットのポケットに入っている可能性は50%だと思っています。これがあなたの最初の確信、すなわち事前確率(prior probability)です。そして、ジャケットを手に取ったときに、ジャラッという音が聞こえます。この新しい情報、すなわちエビデンス(evidence)によって、あなたはより確信を強めます。いまや、たとえば90%の確率へと確信を更新するかもしれません。
ベイズの定理は、この更新をどう行えばよいかをまさに教えてくれる数学的なルールです。新しいエビデンスが手に入ったとき、事前確率から事後確率(posterior probability)へと進むための論理的な方法を与えてくれます。
定理を導く
定理そのものは、すでに学んだ条件付き確率のルールから直接導かれます。
一般化された乗法定理は、2通りの書き方ができることを私たちは知っています。 1. \(P(A \cap B) = P(A|B) \times P(B)\) 2. \(P(A \cap B) = P(B|A) \times P(A)\)
どちらの右辺も \(P(A \cap B)\) に等しいので、両者を等号で結ぶことができます。 \[P(A|B) \times P(B) = P(B|A) \times P(A)\]
あとは、両辺を \(P(B)\) で割って \(P(A|B)\) について解くだけです。 \[P(A|B) = \frac{P(B|A)P(A)}{P(B)}\]
これがベイズの定理です。これは \(P(A|B)\)(結果Bが与えられたときの原因Aの確率)と \(P(B|A)\)(原因Aが与えられたときの結果Bの確率)を結びつけます。
古典的な例: 医療診断
有名な例で、これがどう働くかを見てみましょう。人口の1%が罹患するまれな病気があるとします。この病気には99%の精度を持つ検査があります。これは次のことを意味します。 - ある人が病気にかかっている場合、検査は99%の確率で陽性になる(真陽性率)。 - ある人が病気にかかっていない場合、検査は99%の確率で陰性になる(真陰性率)。
さて、あなたがこの検査を受けて、結果が陽性だったと想像してください。あなたが実際に病気にかかっている確率はいくらでしょうか。
事象を定義しましょう。 - A: あなたは病気にかかっている。 - B: あなたの検査結果は陽性である。
私たちは \(P(A|B)\) を求めたいのです。
わかっていることを整理しましょう。 - 事前確率 \(P(A)\): 検査の前に病気にかかっている確率。これは人口における有病率なので、\(P(A) = 0.01\) です。 - 尤度 \(P(B|A)\): 病気にかかっているという条件のもとで陽性となる確率。これは検査の精度なので、\(P(B|A) = 0.99\) です。 - エビデンスの確率 \(P(B)\): 陽性という結果が出る全体としての確率。これが一番やっかいな部分です。陽性という結果は、2通りの起こり方があります。 1. 病気にかかっていて、かつ陽性になる: \(P(A \cap B) = P(B|A)P(A) = 0.99 \times 0.01 = 0.0099\)。 2. 病気にかかっていないのに、陽性になる(偽陽性)。 - 病気にかかっていない確率は \(P(A^c) = 1 - 0.01 = 0.99\) です。 - 病気にかかっていないという条件のもとで陽性となる確率は \(P(B|A^c) = 1 - 0.99 = 0.01\) です。 - したがって、\(P(A^c \cap B) = P(B|A^c)P(A^c) = 0.01 \times 0.99 = 0.0099\) です。
陽性という結果が出る全体の確率 \(P(B)\) は、これら2つの可能性の和です。 \[P(B) = 0.0099 + 0.0099 = 0.0198\]
これでベイズの定理に必要な部品がすべてそろいました。 \[P(A|B) = \frac{P(B|A)P(A)}{P(B)} = \frac{0.99 \times 0.01}{0.0198} = \frac{0.0099}{0.0198} = 0.5\]
この結果は意外なものです。99%の精度を持つ検査でさえ、陽性という結果が意味するのは、実際に病気にかかっている確率がたった50%だということなのです。これは、この病気が非常にまれだからです。偽陽性となる健康な人の数が、真陽性となる病気の人の数と等しくなるのです。ベイズの定理は、私たちが直感を見抜き、すべてのエビデンスにもとづいてより正確な判断を下す助けになってくれます。