Posterior click rates
After a successful career episode at the Department for Health, you switch to marketing. Your new company has just run two pilot advertising campaigns: one for sneakers, and one for clothes. Your job is to find out which one was more effective as measured by the click-through rate and should be rolled out to a larger audience.
You decide to run A/B testing, modeling the data using the binomial likelihood. You found out that a typical click-through rate for the previous ads has been around 15% recently, with results varying between 5% and 30%. Based on this, you conclude that \(Beta(10, 50)\) would be a good prior for the click-through rate.
The ads
data, the simulate_beta_posterior()
function you saw in the video, and numpy
(as np
) are available in your workspace.
This exercise is part of the course
Bayesian Data Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Generate prior draws
prior_draws = ____(____, ____, 100000)
# Plot the prior
sns.kdeplot(____, shade=True, label="prior")
plt.show()