Data Interview Qs - A/B testing a new landing page

InterviewQs

A/B testing a new landing page

Python Product Questions Data Structures Pandas Data Analysis Statistics

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose you are working for an e-commerce company and the marketing team is trying to decide if they should launch a new webpage. They ran an A/B test and need help analyzing the results. They provided you with this dataset, which contains the following fields:

  • user_id: the user_id of the person visiting the website
  • timestamp: the time in which the user visited the website
  • group: treatment vs control, treatment saw the new landing page, control saw the old landing page
  • landing_page: new vs old landing page, labeled 'new_page'/'old_page'
  • converted: 0/1 flag denoted whether the user visiting the page ended up converting

Given this information, you're asked to come up with a recommendation for the marketing team -- should the marketing team adopt the new landing page? The team wants the landing page with the highest conversion rate.

Note: the control group should always align with the old landing page, and treatment group should always align with the new landing page. If these do not line up, you should drop the rows before doing the analysis.

To help get you started, the code below loads in the dataset. You can also make a copy of this Colab notebook to get started!

        

# Importing packages

import pandas as pd

import matplotlib.pyplot as plt

import numpy as np

# Reading in data

df = pd.read_csv('https://github.com/erood/interviewqs.com_code_snippets/blob/master/Datasets/ab_data.csv?raw=true', parse_dates=True)

df.head()

user_id timestamp group landing_page converted
0 851104 2017-01-21 22:11:48.556739 control old_page 0
1 804228 2017-01-12 08:01:45.159739 control old_page 0
2 661590 2017-01-11 16:55:06.154213 treatment new_page 0
3 853541 2017-01-08 18:28:03.143765 treatment new_page 0
4 864975 2017-01-21 01:52:26.210827 control old_page 1

Our solution will be written in Python for premium users.



 

You’ve accumulated 274 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Top online order locations by revenue

Wednesday, March 30, 2022

SQL, Database Querying, Window Function, Subquery, InterviewQs Top online order locations by revenue SQL Database Querying Window Function Subquery Forward this email to a friend or colleague and

Probability of sitting in the aisle based on the plane ticket's letter

Monday, March 28, 2022

Python, Probability, Data Structures, Pandas, Data Analysis, Data Visualization, InterviewQs Probability of sitting in the aisle based on the plane ticket's letter Python Probability Data

Words from keyboard rows

Friday, March 25, 2022

Python, Arrays, Data Structures, Algorithms, InterviewQs Words from keyboard rows Python Arrays Data Structures Algorithms Forward this email to a friend or colleague and challenge them to solve it. Hi

Selecting eggs from the grocery store

Wednesday, March 23, 2022

Statistics, Probability Theory, Bayes' Theorem, Conditional Probability, InterviewQs Selecting eggs from the grocery store Statistics Probability Theory Bayes' Theorem Conditional Probability

Flagging increasing stock prices in SQL

Monday, March 21, 2022

SQL, Database Querying, Window Function, Subquery, InterviewQs Flagging increasing stock prices in SQL SQL Database Querying Window Function Subquery Forward this email to a friend or colleague and

You Might Also Like

📈 Why Is My Ping So High While Gaming? — How to Keep Your Android From Overheating

Saturday, May 4, 2024

Also: Using ChatGPT to Craft a Resume, and More! How-To Geek Logo May 4, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

JSK Daily for May 4, 2024

Saturday, May 4, 2024

JSK Daily for May 4, 2024 View this email in your browser A community curated daily e-mail of JavaScript news The Power of React's Virtual DOM: A Comprehensive Explanation Modern JavaScript

Daily Coding Problem: Problem #1431 [Medium]

Saturday, May 4, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by MongoDB. Given a list of elements, find the majority element, which appears more than

Ranked | The World's Top Media Franchises by All-Time Revenue 📊

Saturday, May 4, 2024

From Pokémon to Star Wars, some media franchises are globally recognizable. How do media franchises compare in terms of all-time revenue? View Online | Subscribe Presented by Voronoi: The App Where

Noonification: Read Code Like a Hacker With the SAST

Saturday, May 4, 2024

Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech today, May 4, 2024? The HackerNoon Newsletter brings the HackerNoon

Weekend Reading — May the fourth

Saturday, May 4, 2024

This week we setup our new Minecraft server, play Spacewar, avoid burnout, wonder about Facebook AI spam, lose our passkeys, and claim stairs on the way back home. 😎 Labnotes (by Assaf Arkin) Weekend

Google lays off workers

Saturday, May 4, 2024

Plus: Tesla cans its Supercharger team and UnitedHealthcare reveals security lapses View this email online in your browser By Kyle Wiggers Saturday, May 4, 2024 Image Credits: Tomohiro Ohsumi / Getty

When It Rains, It Pours ☔

Saturday, May 4, 2024

Why the umbrella's design can't be beat. Here's a version for your browser. Hunting for the end of the long tail • May 04, 2024 Hey there, Ernie here with a refreshed piece about umbrellas

🐍 New Python tutorials on Real Python

Saturday, May 4, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: Python's unittest: Writing Unit Tests for

Microsoft Outlook Flaw Exploited by Russia's APT28 to Hack Czech, German Entities

Saturday, May 4, 2024

THN Daily Updates Newsletter cover Webinar -- Data Security is Different at the Petabyte Scale Discover the secrets to securing fast-moving, massive data sets with insights from industry titans