Get startedGet started for free

Clicks per day instead of clicks per ad

When you put up a banner on your friend's site you got 19 clicks in a day, how many daily clicks should you expect this banner to generate on average? Now, modify your model, one piece at a time, to calculate this.

This exercise is part of the course

Fundamentals of Bayesian Data Analysis in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Replace proportion_clicks with mean_clicks and change the parameters
n_draws <- 100000
n_ads_shown <- 100
proportion_clicks <- runif(n_draws, min = 0.0, max = 0.2)
n_visitors <- rbinom(n_draws, size = n_ads_shown, 
                     prob = proportion_clicks)
                     
prior <- data.frame(proportion_clicks, n_visitors)
posterior <- prior[prior$n_visitors == 13, ]
Edit and Run Code