Project Instruction
Mobile Games A/B Testing with Cookie Cats
Result
First, import the pandas module and read the Cookie Cats A/B-test data from datasets/cookie_cats.csv into a DataFrame called df. Take a look at the first few rows of df. Count and display the number of players in each A/B-group defined by the 'version' column. Group the data by 'sum_gamerounds', count the 'userid', and assign the result to plot_df. Plot a histogram of the first 100 rows of plot_df with 'sum_gamerounds' on the X-axis and 'userid' on the Y-axis, assigning the plot to ax. Optionally, set informative X and Y labels. Calculate and display the overall 1-day retention as the proportion of True values in the df['retention_1'] column.
Next, calculate and display the 1-day retention for each A/B-group. Perform 500 bootstrap replications to resample from df and calculate the mean retention for each A/B-group, appending the results to boot_1d. Convert boot_1d into a DataFrame and plot it as a Kernel Density Plot. Calculate the bootstrap % difference in 1-day retention between the two A/B-groups by finding the difference between gate_30 and gate_40, dividing by gate_40, and converting it to a percentage. Assign this to boot_1d['diff'] and plot it as a Kernel Density Plot.
Calculate the probability that a gate at level 30 gives higher 1-day retention by finding the proportion of boot_1d['diff'] above 0.0, and format it as a percentage. Calculate and display the 7-day retention for each A/B-group, and then perform a bootstrap analysis for the difference in 7-day retention using the same method as for the 1-day retention, but using the column df['retention_7'] and storing results in boot_7d. Finally, decide whether to move the gate to level 40 or keep it at level 30 by setting move_to_level_40 to either True or False.
Address: Portland, Oregon
Email: balandi.antonio@gmail.com