
https://xkcd.com/1132/
Bayes’ theorem may be derived from the definition of conditional probability: \[P(A\mid B)={\frac {P(B\mid A)\,P(A)}{P(B)}},\;\text{if}\; P(B)\neq 0\] because \[P(B\cap A) = P(A\cap B)\] \[\Rightarrow P(A\cap B)=P(A\mid B)\,P(B)=P(B\mid A)\,P(A)\] \[\Rightarrow P(A\mid B)={\frac {P(B\mid A)\,P(A)}{P(B)}},\;\text{if}\; P(B)\neq 0\]
When can we skip it?


| Likelihood | Conjugate prior distribution | Prior hyperparameter | Posterior hyperparameters |
|---|---|---|---|
| Bernoulli | Beta | \(\alpha, \beta\) | \(\alpha + \sum x_i, \beta + n - \sum x_i\) |
| Multinomial | Dirichlet | \(\alpha\) | \(\alpha + \sum x_i\) |
| Poisson | Gamma (shape \(\alpha\), rate \(\beta\)) | \(\alpha, \beta\) | \(\alpha + \sum x_i,\; \beta + n\) |
| Situation | Prefer Bayesian | Prefer Frequentist/MLE |
|---|---|---|
| Sample size | Small | Large |
| Prior knowledge | Strong and defensible | Weak or absent |
| Goal | Uncertainty quantification, full posterior | Point estimates, hypothesis tests |
| Computation | Available | Constrained |
| Interpretability | Credible intervals, probability statements | p-values, confidence intervals |
A natural setting for Bayesian inference: updating beliefs about disease status given a test result.
Facts:
Questions: