[' # 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 * X\n    y_obs = pm.Normal(\'y_obs\', mu=mu, sigma=sigma, observed=y)\n    \n    # Sample posterior\n    trace = pm.sample(1000, tune=1000, chains=4, return_inferencedata=True, idata_kwargs={"log_likelihood": True})\n    \n# Print summary of posterior samples\nprint(trace.posterior.summary())\n\n# Plot posterior distributions\naz.plot_posterior(trace, var_names=[\'alpha\', \'beta\', \'sigma\'])\nplt.show()\n\n# Plot posterior predictive distribution\naz.plot_posterior_predictive(trace, var_names=[\'y_obs\'], num_pp_samples=1000)\nplt.show()\n\n# Plot scatter plot of data and posterior predictive distribution\nplt.scatter(X, y, label=\'Data\')\nplt.plot(X, trace.posterior[\'alpha\'].values + trace.posterior[\'beta\'].values * X, label=\'Posterior Predictive\')\nplt.legend()\nplt.show()\n\n# Print summary of posterior samples\nprint(trace.posterior.summary())\n\n# Plot posterior distributions\naz.plot_posterior(trace, var_names=[\'alpha\', \'beta\', \'sigma\'])\nplt.show()\n\n# Plot posterior predictive distribution\naz.plot_posterior_predictive(trace, var_names=[\'y_obs\'], num_pp_samples=1000)\nplt.show()\n\n# Plot scatter plot of data and posterior predictive distribution\nplt.scatter(X, y, label=\'Data\')\nplt.plot(X, trace.posterior[\'alpha\'].values + trace.posterior[\'beta\'].values * X, label=\'Posterior Predictive\')\nplt.legend()\nplt.show()\n\n# Print summary of posterior samples\nprint(trace.posterior.summary())\n\n']