Last active
August 30, 2020 10:58
-
-
Save MarcoGorelli/78f79288d49992b4fa7019699b257670 to your computer and use it in GitHub Desktop.
coin_tossing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arviz as az | |
import pymc3 as pm | |
N = 1000 | |
N_HEADS = 292 | |
with pm.Model() as model: | |
theta = pm.Beta("θ", alpha=1.0, beta=1.0) | |
y = pm.Binomial("y", n=N, p=theta, observed=N_HEADS) | |
trace = pm.sample(return_inferencedata=True) | |
az.plot_posterior(trace.posterior) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment