1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to A/B Testing in R

Exercise

Conversion rate between years

In the video, I computed the conversion rate between our no-hat condition and our hat condition for the most recent year. We should also check if conversion rates have changed between years for our no-hat condition. The dataset with both years worth of data summarized by month and year and any packages are pre-loaded for you. You can find the data in no_hat_data_sum.

Instructions

100 XP
  • Fill in year and conversion_rate in spread() to make one column per year.
  • Create a new column called year_diff that is the difference between the columns `2017` and `2018`.
  • Take a look at the data. Notice that there are missing values for 2018.
  • Compute the mean() for the year_diff column and update the sd() function to be sure you're not including the months with missing data for 2018.