What & Why
What is a conjugate prior?
- When the posterior is in the same family as the prior distribution they are called conjugate distributions, and the prior is called a conjugate prior for the likelihood function.
- That means that if the prior distribution for x is a beta distribution, the posterior is also a beta distribution. (Tb)
![conjugate priors Table](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F3e5a43b1-ad92-444a-aa3c-79017188a910%2FUntitled.png%3Ftable%3Dblock%26id%3D652c804a-d61b-4b1a-b66b-d0cb3c14ca70%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DEL5MfrS6mfUaJrs3Qsho8A44tnBc22Wz1ESn5prg__4?table=block&id=652c804a-d61b-4b1a-b66b-d0cb3c14ca70&cache=v2)
What is The beta distribution?
How does that look like?
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F8d6adcf5-e3f2-436f-aca0-5edd4d78f4d5%2F8gx7ezgn.bmp%3Ftable%3Dblock%26id%3D61ab4f60-31f7-414b-80d5-11c296b30830%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DQubewKz_UGo-gv6kT76vbvYlOW3ATIkAtzAjKzrFStw?table=block&id=61ab4f60-31f7-414b-80d5-11c296b30830&cache=v2)
- frequently used in Bayesian statistics (Wiki)
- The shape of it depends on two parameters, written α and β, or alpha and beta.
- is uniform from 0 to 1 when alpha=1 and beta=1. (TB p39)
- If the prior is a beta distribution with parameters and , and we see data with h heads and t tails, the posterior is a beta distribution with parameters and .
- Or Dan Simpson called it :
- Under Uniform(0, 1) prior, if y = 8 Heads from n = 10 tosses, posterior is Beta(9, 3)
- In other words, we can do an update with two additions. (TB p39)
- It is great that we can leverage this advantage :
- ∵ many realistic priors there is a beta distribution that is at least a good approximation, and for a uniform prior there is a perfect match. (TB p39)
How
图解教材:概率机器学习(Murphy)_哔哩哔哩_bilibili 第69 教你如何adjust prior
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F85b9f774-7ac8-47d7-b173-00c9a9a612fc%2FUntitled.png%3Ftable%3Dblock%26id%3Dc34517d2-07d6-47ba-8ce4-09033e98a0af%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DFC4Pzw2tKOAakN9dkJIwsu4WkFifyjEo_eSIqqO2648?table=block&id=c34517d2-07d6-47ba-8ce4-09033e98a0af&cache=v2)
Example : Drug efficacy (Lambert p237)
Reference
(TB) — The best source to get the gist. thinkbayes.pdf (amazonaws.com)