Bayes Theorem


## Bayes's rule
**사후확률을 사전확률과 likelihood를 이용하여 계산하는 방법**
확률적 사고방식을 표현하는 공식일 뿐 [Conditional probability](https://texonom.com/conditional-probability-89f109f0347b4a68b7f31e27dcd0794d), [Joint Probability](https://texonom.com/joint-probability-ddefdc8d4f8d4b3eb3d8dafb5706b8e5), [Marginalization](https://texonom.com/marginalization-de8a54419bb842ba8bbb0ecb951caae7) 정의로 유도되는 한 형태
관측되기 전과 후에 모델의 파라미터에 대한 확률 분포가 어떻게 변하는지에 따라 차이
그래서 자동차 열기 예시가 베이즈 확률을 잘 설명해주는 사례
prior probability과 새로운 증거evidence에 따른 업데이트된 믿음의 정도를 계산하는 공식
사후확률을 계산하기 위해 조건부확률을 사용
likelihood is probability that fits evidence among target prior
$$posterior = \frac{prior * marginal \; likelihood}{data \; prior}$$
$$P(A|B) := \frac{P(B|A)P(A)}{P(B)} = P(B|A)P(A) (if B \ne P(A))$$
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F61a64894-440b-46b9-8a3f-b0b5776bb8e2%2FUntitled.png?table=block&id=2fae2c26-69f7-4006-938d-f5dbc13ac16a&cache=v2)
We can chain $\alpha, \beta$ is [Hyperparameter](https://texonom.com/hyperparameter-ef7e34566add4e98b673d4cef59fca90) used to determine prior and $P(D|\theta )$ not $P(D|\theta, \alpha, \beta)$ is the reason that 하이퍼파라미터 알파와 베타가 사전확률 분포를 결정하는 데 사용되지만, 데이터 D와 모델 파라미터 theta 간의 관계에는 영향을 미치지 않는다
$$P(\theta|D, \alpha, \beta) = \frac{P(\theta|\alpha, \beta)P(D|\theta)}{P(D|\alpha, \beta)}$$

### Bayes Theorem Notion
|Title|
|:-:|
|[Posterior](https://texonom.com/posterior-87e0f5df288140c7ba475b0629bdda05)|
|[Prior Probability](https://texonom.com/prior-probability-34585174a5cd42bbae9094138713932b)|
|[Odds](https://texonom.com/odds-fc52380a1eb842c8b76a1089ae85311c)|
|[Bayes Factor](https://texonom.com/bayes-factor-d73be6d93c004384b454957f98e13aad)|
|[Likelihood](https://texonom.com/likelihood-7a4315f7502440cfbb93b4a469cfe55b)|
|[Evidence](https://texonom.com/evidence-80ff49d6ff4f44d8a0a212a75012908f)|



![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F05ba0e17-74d6-44c3-94aa-e5cf0c9544bf%2FScreenshot_20191226-002240_YouTube.jpg?table=block&id=dd6553b3-8d59-4ac7-a73b-8caf44072aea&cache=v2)
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F2933798d-3a5d-47d8-8801-5320e1fa3a03%2FScreenshot_20191226-002138_YouTube.jpg?table=block&id=46afb5bb-de49-4736-a73b-64b05d94c285&cache=v2)


> [Bayes theorem, the geometry of changing beliefs](https://www.youtube.com/watch?v=HZGCoVF3YvM)





