Session Ready
Exercise

Conditioning on the data (again)

Let's resurrect the zombie site example where you tested text ads. Out of a 100 impressions of the text ad, 6 out of a 100 clicked and visited your site.

To the right is roughly the code you developed in the last exercise. pars is currently the joint distribution over all combinations of proportion_clicks and n_visitors.

Instructions
100 XP
  • Condition on the data and keep only the rows in pars where n_visitors == 6.
  • Normalize pars$probability again, to make sure it sums to 1.0.
  • Plot the posterior pars$probability using plot(x = , y = , type = "h") with pars$proportion_clicks on the x-axis and pars$probability on the y-axis.