A/B testing using a real marketing funnel dataset, plus a synthetic dataset I built myself to check whether my own testing method actually works.

Read implementation of A/B testing on a bigger, real data set here! [LINK]

Big-picture method

IMG_8A217EEB8489-1.jpeg

Loading and cleaning the data

The data comes as two separate files, not one combined file, so the first step was loading both, tagging each with which group it belongs to, and stacking them into one table. Then, cleaning them to make sure there are no incomplete rows.

test_raw <- read_delim("test_group.csv", show_col_types = FALSE)
control_raw <- read_delim("control_group.csv", show_col_types = FALSE)
test_raw$campaign <- "test"
control_raw$campaign <- "control"
df <- bind_rows(test_raw, control_raw)

One row in the control group was missing almost everything, just a date and a spend amount. I dropped it instead of letting it turn every downstream calculation into NA

This is the information available to us for both the groups: