Adding a prior to the model
You're not so sure that your ad will get clicked on exactly 10% of the time. Instead of assigning proportion_clicks
a single value you are now going to assign it a large number of values drawn from a probability distribution.
This exercise is part of the course
Fundamentals of Bayesian Data Analysis in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
n_samples <- 100000
n_ads_shown <- 100
# Update proportion_clicks
proportion_clicks <- 0.1
n_visitors <- rbinom(n = n_samples, size = n_ads_shown, prob = proportion_clicks)