pm21-dragon/lectures/lecture-12/3 Bayes' theorem.ipynb
2025-01-17 08:33:02 +01:00

70 lines
2.5 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bayes' theorem\n",
"\n",
"\n",
"$ \\newcommand{\\thetavec}{\\boldsymbol{\\theta}} \\newcommand{\\pr}{\\textrm{p}}$\n",
"\n",
"Bayes' theorem with $\\thetavec$ the vector of parameters we seek.\n",
"\n",
"$$\n",
" \\overbrace{\\pr(\\thetavec \\mid \\textrm{data})}^{\\textrm{posterior}} =\n",
" \\frac{\\color{red}{\\overbrace{\\pr(\\textrm{data} \\mid \\thetavec)}^{\\textrm{likelihood}}} \\times\n",
" \\color{blue}{\\overbrace{\\pr(\\thetavec)}^{\\textrm{prior}}}}\n",
" {\\color{darkgreen}{\\underbrace{\\pr(\\textrm{data})}_{\\textrm{evidence}}}}\n",
"$$\n",
"\n",
"If we view the prior as the initial information we have about $\\thetavec$, summarized as a probability density function, then Bayes' theorem tells us how to <em>update</em> that information after observing some data: this is the posterior pdf.\n",
"\n",
"\n",
"We will go through [this post, \"Bayes' Theorem with Lego\"](https://www.countbayesie.com/blog/2015/2/18/bayes-theorem-with-lego).\n",
"\n",
"## Discussion: the Bayesian Brain hypothesis.\n",
"\n",
"Here is an [interesting article](https://towardsdatascience.com/the-bayesian-brain-hypothesis-35b98847d331), which might serve as a starting point, about this idea.\n",
"\n",
"## Further material\n",
"\n",
"* [Bayesian Statistics the Fun Way](https://katalog.ub.uni-freiburg.de/opac/RDSIndex/Search?lookfor=Bayesian%20Statistics%20the%20Fun%20Way%20&source=homepage)\n",
"\n",
"* [Doing Bayesian Data Analysis : A Tutorial with R, JAGS, and Stan\n",
"John Kruschke](https://katalog.ub.uni-freiburg.de/opac/RDSIndex/Search?lookfor=Bayesian+Data+analysis+Kruschke&type=AllFields&limit=10&sort=py+desc)\n",
"\n",
"* https://www.3blue1brown.com/, especially https://www.youtube.com/watch?v=HZGCoVF3YvM\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
}
},
"nbformat": 4,
"nbformat_minor": 4
}