[' # Define priors\n    alpha = pm.Normal(\'alpha\', mu=0, sigma=10)\n    beta = pm.Normal(\'beta\', mu=0, sigma=10)\n    sigma = pm.HalfNormal(\'sigma\', sigma=10)\n    \n    # Define likelihood\n    likelihood = pm.Normal(\'likelihood\', mu=alpha + beta * year, sigma=sigma, observed=N)\n    \n    # Sample posterior\n    trace = pm.sample(1000, tune=1000, chains=4, return_inferencedata=True, idata_kwargs={"log_likelihood": True})\n\n# Print the summary of the posterior distribution\naz.summary(trace)\n\n# Plot the posterior distribution of the model parameters\naz.plot_posterior(trace, var_names=[\'alpha\', \'beta\', \'sigma\'], hdi_prob=0.95)\n\n# Plot the posterior predictive distribution\naz.plot_posterior_predictive(trace, var_names=[\'likelihood\'], hdi_prob=0.95)\n\n# Plot the data and the posterior predictive distribution\nplt.scatter(year, N, label=\'Data\')\nplt.plot(year, trace.posterior[\'alpha\'].values + trace.posterior[\'beta\'].values * year, label=\'Posterior Predictive\')\nplt.xlabel(\'Year\')\nplt.ylabel(\'Population Count\')\nplt.legend()\nplt.show()']