CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Bayesian Data Analysis in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Generate prior draws
prior_draws = ____(____, ____, 100000)

# Plot the prior
sns.kdeplot(____, shade=True, label="prior")
plt.show()
Modifier et exécuter le code