Bayes' Theorem
- Bayes' Theorem
-
새로운 정보를 기반으로 사전 확률에 대한 신뢰도 갱신
(a method to update belief on the basis of new information)
- \(H\): Hypothesis (가설), \(E\): Evidence (증거, 새로운 정보)
- \(P(H)\): Prior (사전확률), \(P(H|E)\): Posterior (사후확률, 새로운 정보를 받은 후 갱신된 신뢰도)
- \(P(E|H)\): Likelihood (우도, 가설 \(H\)가 참일 때 증거 \(E\)가 발생할 확률)
- 연역적 추론 → 귀납적 추론
- Steve:
- Steve is a librarian? or Steve is a farmer? Steve에 대한 설명은 librarian이 가진 고정관념에 부합함
- According to Kahneman and Tversky, people do not hold correct or biased views about the personalities of librarians or farmers. It's that almost no one thinks to incorporate information about the ratio of farmers to librarians into their judgments.
- In their paper, Kahneman and Tversky said that in the US there are about 20 farmers for every 1 librarian.
- This overwhelmingly large ratio of farmers to librarians greatly increases the chances that Steve is a farmer, even though his description seems librarian
- 합리성은 사실을 아는 것이 아니라 어떤 사실이 관련성이 있는지 인식하는 것
- Thinking about a sample
- Say, 200 farmers and 10 librarians.
- meek and tidy하다는 description이 librarians의 40%가, farmers의 10%가 들어맞는다고 가정했을 때,
- \(\text{matching librarians} = P\,(\text{Description} \,|\, \text{Librarian}) = 10 \times 0.4 = 4\)
- \(\text{matching farmers} = P\,(\text{Description} \,|\, \text{Farmer}) = 200 \times 0.1 = 20\)
- About 40% of librarians fit the description, but only 10% of farmers do. But that's still more farmers than librarians.
- librarian이 farmer 보다 description 적합도가 4배 더 높을 것이라고 가정하더라도 농부일 가능성이 더 높음.
- \(P\,(\text{Librarian}) \approx 4.761 \%\) (prior)
- \(P\,(\text{Description} \,|\, \text{Librarian}) = 40\%\) (likelihood)
- \(P\,(\text{Farmer}) \approx 95.238 \% \)
- \(P\,(\text{Description} \,|\, \text{Farmer}) = 10\%\)
-
\(P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)} \quad ↘ \)
\[P\,(\text{Librarian} \,|\, \text{Description}) = \frac{P\,(\text{Description} \,|\, \text{Librarian}) \, \cdot \, P\,{(\text{Librarian})}}{P\,(\text{Description})}\] - \(P(E) = \sum_i{P(E|H_i) \cdot P(H_i)}\) (전체 확률)
- Sum of the \(\text{Likelihood} \times \text{Prior Probability}\)
- \(H_1 = \text{Librarian}\)
- \(H_2 = \text{Farmer}\)
- \(P\,(\text{Description}) \approx 0.40 \cdot 0.04761 + 0.10 \cdot 0.95.238 = 0.114 \)
- \(P\, (\text{Librarian} \,|\, \text{Description}) = \frac{0.40 \cdot 0.04761}{0.114} \approx 16.7\% \) (posterior)
- Maybe the numbers you'd estimate would be different, but what matters is how you fit the numbers together to update a belief based on evidence. That process of updating beliefs is what Bayes' theorem describes mathematically.
- When to use Bayes' rule
- 베이즈 정리는 어떤 가설(Steve is a librarian)이 있는 상황과 어떤 증거(Steve is a "meek and tidy")를 보고 증거가 참일때 가설이 성립할 확률을 알고싶은 상황에 적합 (새로운 정보-증거를 기반으로 사전 확률에 대한 신뢰도 갱신)
- In the standard notation, this vertical bar '\( | \)' means "given that". (Evidence가 주어진 상황에서의 확률로 제한) \[ \,\\ P(H|E) = P(\text{Hypothesis} \, \text{given} \, \text{the Evidence}) \,\\ \]
- likelihood \(P(E|H)\): 가설이 참이라고 가정할 때 증거를 볼 확률
- \(P(E|\neg H)\) = 가설이 거짓일 확률 즉 이 예시에서는 \(P\,(\text{Description} \,|\, \text{Farmer})\)
- Thinking the posterior as a ratio of areas
- \(1 \times 1\) 정사각형으로 놓고 모든 사건은 이 공간의 일부 하위 집합을 차지하고, 그 사건의 확률은 그 하위 집합의 면적비로 생각
- https://www.skobelevs.ie/BayesTheorem
-
\[
\,\\
P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}
\,\\
\]
스티브는 매우 수줍고 내성적이며, 변함없이 도움을 주지만 사람이나 현실 세계에 대한 관심은 거의 없습니다.
온순하고 깔끔한 영혼인 그는 질서와 구조에 대한 필요성과 디테일에 대한 열정을 가지고 있습니다.