第2章準備
2.6.5. An Example2.6.5 一つの例
Let’s put our skills to the test. Assume that a doctor administers an HIV test to a patient. This test is fairly accurate and fails only with 1% probability if the patient is healthy but reported as diseased, i.e., healthy patients test positive in 1% of cases. Moreover, it never fails to detect HIV if the patient actually has it. We use to indicate the diagnosis ( if negative and if positive) and to denote the HIV status.
英語のヒント
技能を試してみよう。医師が患者にHIV検査を行うとする。この検査はかなり正確で、失敗するのは、患者が健康なのに病気と報告される場合の1%の確率だけである。つまり、健康な患者が陽性になるのは1%の場合である。しかも、患者が実際にHIVにかかっていれば、検出に失敗することはない。診断(陰性なら、陽性なら)を示すのにを、HIVの状態を表すのにを使う。
| Conditional probability条件付き確率 | ||
|---|---|---|
| 1 | 0.01 | |
| 0 | 0.99 |
Note that the column sums are all 1 (but the row sums do not), since they are conditional probabilities. Let’s compute the probability of the patient having HIV if the test comes back positive, i.e., . Intuitively this is going to depend on how common the disease is, since it affects the number of false alarms. Assume that the population is fairly free of the disease, e.g., . To apply Bayes’ theorem, we need to apply marginalization to determine
英語のヒント
列の和はどれも1である(行の和はそうではない)ことに注意してほしい。これらは条件付き確率だからである。検査が陽性で返ってきた場合に患者がHIVにかかっている確率、つまりを計算しよう。直観的には、これは病気がどれほどありふれているかに依存する。それが誤警報の数に影響するからである。人々のあいだで病気がかなり少ない、たとえばだとしよう。ベイズの定理を当てはめるには、周辺化を使って次を求める必要がある。
(2.6.7)
This leads us to
英語のヒント
これにより、次が得られる。
(2.6.8)
In other words, there is only a 13.06% chance that the patient actually has HIV, despite the test being pretty accurate. As we can see, probability can be counterintuitive. What should a patient do upon receiving such terrifying news? Likely, the patient would ask the physician to administer another test to get clarity. The second test has different characteristics and it is not as good as the first one.
英語のヒント
言い換えれば、検査がかなり正確であるにもかかわらず、患者が実際にHIVにかかっている見込みはたった13.06%しかない。このように、確率は直観に反することがある。このような恐ろしい知らせを受けたら、患者はどうすべきだろうか。おそらく、はっきりさせるために、医師に別の検査をしてもらうよう頼むだろう。2回目の検査は特性が違い、1回目ほど優れてはいない。
| Conditional probability条件付き確率 | ||
|---|---|---|
| 0.98 | 0.03 | |
| 0.02 | 0.97 |
Unfortunately, the second test comes back positive, too. Let’s calculate the requisite probabilities to invoke Bayes’ theorem by assuming conditional independence:
英語のヒント
残念ながら、2回目の検査も陽性で返ってくる。条件付き独立を仮定して、ベイズの定理を使うのに必要な確率を計算しよう。
(2.6.9)
Now we can apply marginalization to obtain the probability that both tests come back positive:
英語のヒント
これで、周辺化を当てはめて、両方の検査が陽性で返ってくる確率を求められる。
(2.6.10)
Finally, the probability of the patient having HIV given that both tests are positive is
英語のヒント
最後に、両方の検査が陽性のときに患者がHIVにかかっている確率は次のとおりである。
(2.6.11)
That is, the second test allowed us to gain much higher confidence that not all is well. Despite the second test being considerably less accurate than the first one, it still significantly improved our estimate. The assumption of both tests being conditionally independent of each other was crucial for our ability to generate a more accurate estimate. Take the extreme case where we run the same test twice. In this situation we would expect the same outcome both times, hence no additional insight is gained from running the same test again. The astute reader might have noticed that the diagnosis behaved like a classifier hiding in plain sight where our ability to decide whether a patient is healthy increases as we obtain more features (test outcomes).
英語のヒント
つまり、2回目の検査によって、何かがおかしいという確信がずっと高まった。2回目の検査は1回目よりかなり不正確であるにもかかわらず、推定を大きく改善した。二つの検査が互いに条件付き独立であるという仮定は、より正確な推定を出すうえで決定的だった。同じ検査を2回行う極端な場合を考えよう。この状況では両方で同じ結果を期待するので、同じ検査をもう一度行っても新たな洞察は得られない。鋭い読者は、この診断が、目の前に隠れた分類器のように振る舞っていたことに気づいたかもしれない。より多くの特徴量(検査結果)を得るほど、患者が健康かどうかを判断する能力が高まるのである。