1. Learn
  2. /
  3. Courses
  4. /
  5. Fundamentals of Bayesian Data Analysis in R

Connected

Exercise

Calculating the posterior difference

The posterior proportion_clicks for the video and text ad has been put into a single posterior data frame. The reason for [1:4000] is because these proportion_clickss are not necessarily of the same length, which they need to be when put into a data frame.

Now it's time to calculate the posterior probability distribution over what the difference in proportion of clicks might be between the video ad and the text ad.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Add a new column posterior$prop_diff that should be the posterior difference between video_prop and text_prop (that is, video_prop minus text_prop).
  • Plot posterior$prop_diff as a histogram using hist().