I bought a container of dates (fruit) (containing $57$ dates in total). I started opening them to see if they're good or bad (do have warms inside or not), and after opening $7$ of them I found that the first $5$ were bad whereas the $2$ last were good.
I usually buy these dates' containers and I would estimate that one third of it are bad dates$^{(*)}$.
How can I estimate (or rather improve my estimation, I guess using Bayes' theorem) the number of bad dates I have in the container considering the evidence I have (i.e. $5$ first opened dates are good and last $2$ bad).
$^{(*)}$: I still buy them though because they're cheap ;-)
Spoiler alert: I can check the real numbers after I open all dates :-)
It depends on how strongly you believe in your prior knowledge. Say $k$ represents the strength of your belief. The higher $k$ is, the more you believe in your prior. Using beta distribution as the conjugate prior, $B(\alpha=k/3, \beta=2k/3)$ and modeling with binomial, the posterior distribution is proportional to $p^{5+\alpha-1}(1-p)^{2+\beta-1}$.
Your new estimate for proportion of bad dates becomes $\frac{5+\alpha}{7+\alpha+\beta}=\frac{5+k/3}{7+k}$. In other words, it's like you're adding imaginary dates ($k/3$ good ones and $2k/3$ bad ones) to your samples and use the frequentist method.