aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
Currently there is an error here because the len function returns 1 for any N - change N to see how the "Probability Estimate" changes as 1/N.
Running my corrected version gives a much closer estimate of the true probability (~0.08208).
Also just to point out this TFP code is anyway different from the PyMC3 version because numpy use the scale rather than rate parameterisation of the exponential distribution. Thus the equivalent is shown below too.
Currently there is an error here because the
len
function returns1
for anyN
- changeN
to see how the "Probability Estimate" changes as1/N
.Running my corrected version gives a much closer estimate of the true probability (~0.08208).
Also just to point out this TFP code is anyway different from the PyMC3 version because numpy use the scale rather than rate parameterisation of the exponential distribution. Thus the equivalent is shown below too.