[' # 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    mu = alpha + beta * r\n    likelihood = pm.Normal(\'likelihood\', mu=mu, sigma=sigma, observed=n)\n    \n    # Sample the posterior\n    trace = pm.sample(1000, tune=1000, chains=4, return_inferencedata=True, idata_kwargs={"log_likelihood": True})\n\n# Print the posterior samples\nprint(trace.posterior)\n\n# Plot the posterior distributions\naz.plot_trace(trace)\nplt.show()\n\n# Plot the posterior predictive distribution\naz.plot_posterior_predictive_glm(trace, samples=1000, eval=np.linspace(0, 1, 100), hdi_prob=0.95)\nplt.show()']