Skip to content

isachenko-andrii/Subscription-screen-conversion-optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project-logo

Subscription screen conversion optimization
(A/B Test)

Project Description

This project analyzes A/B testing results. The goal of the study is to test the hypothesis that visually highlighting a benefit (adding a "50% Off" banner) will increase conversion to a weekly subscription, even if the actual price ($4.99) remains unchanged.

Problem Statement

It is necessary to determine whether the difference in user behavior between the control and test groups is statistically significant. The business objective is to make a data-driven decision: implement the new payment screen design for 100% of traffic or maintain the current version.

Data used

Source: ab_test_data.csv
Sample size: 20,000 users
Data composition:
The dataset contains granular information about user interactions during an A/B testing experiment, including unique user identifiers, precise event timestamps, experimental group assignments (Control vs. Variant), and binary conversion outcomes.

Key data attributes

User Identification: Unique user IDs to ensure sample integrity and track repeat interactions.
Temporal Data: Timestamps that allow you to analyze test duration, seasonality, and conversion dynamics over time.
Experimental Grouping: Dividing the audience into segments (Group A and Group B) for comparative analysis of the effectiveness of changes.
Conversion Metrics: Binary indicators of success (completion or failure of the target action), which is the basis for the statistical calculation of Conversion Rate.

Technology stack

Language: Python 3.12
Libraries: Pandas, NumPy (data processing), Matplotlib & Seaborn (visualization), SciPy (Statistical Analysis).
Environment: Jupyter Notebook / Google Colab.

Methodology and Implementation Steps

- Pre-test Analysis: Calculating the required sample size to achieve 80% power and a 5% significance level.
- Data Cleaning: Cleaning the dataset (20,000 records), removing duplicates, checking for missing data, and converting data types.
- Hypothesis Testing:

  • Conducting a Z-test to compare hypotheses.
  • Conducting a T-test to verify mean values.

- Visual Interpretation: Plotting density distribution graphs (PDF), confidence intervals, and conversion dynamics.

Key results

Conversion of group A: 6.10%
Conversion of group B: 8.90%
P-value: 0.000000000000054 (the result is statistically significant).
Relative growth: +45.9%
Statistics: The resulting p-value (0.00000000000005) is significantly less than the threshold of 0.05.
Z-statistic: 7.52 (above the critical value of 1.96).

Conclusion: Test variant B showed a steady increase in conversion. The test result is positive. Hypothesis H1 is confirmed. It is recommended to implement a new design of the Subscription screen for all users.

Visualizations

The project includes:

  • Probability distribution conversion rate.

Probability-distribution-Conversion-Rate

  • Probability distribution density.

Probability-distribution-Conversion-Rate

  • Conversion dynamics

Probability-distribution-Conversion-Rate

Project structure

Subscription-screen-conversion-optimization/ β€” project directory
β”œβ”€β”€ data/ β€” project data
β”‚ β”œβ”€β”€ raw/ β€” raw data
β”‚ └── processed/ β€” cleaned data
β”œβ”€β”€ notebooks/ β€” main file with analysis code
β”œβ”€β”€ results/ β€” saved graphs and final tables
β”œβ”€β”€ reports/ β€” report of project
β”œβ”€β”€ Project-logo.png β€” project cover
β”œβ”€β”€ LICENSE β€” MIT License
β”œβ”€β”€ requirements.txt β€” list of libraries to run the project
└── README.md β€” project description.

How to Use

How to use this project
To run this analysis locally, follow these steps:

1. Download the project file

project.ipynb

File location: https://github.com/isachenko-andrii/Subscription-screen-conversion-optimization/blob/main/notebooks/

2. Download the dataset

ab_test_data.csv

File location:
https://github.com/isachenko-andrii/Subscription-screen-conversion-optimization/blob/main/data/raw/

CSV file content:

Detailed description of columns:

user_id (Object/String):
Type: Unique User Identifier (UUID).
Purpose: Used to identify each test participant and track duplicates. Each ID must be unique within the entire test.

timestamp (Datetime):
Type: Date and time (YYYY-MM-DD HH:MM:SS).
Purpose: Records the exact moment when the user interacted with the test variant. Required for analyzing test dynamics and checking duration.

test_group (Categorical/String):
Type: Categorical variable.
Values:
a β€” Control group (current version of the product).
b β€” Test group (new version with changes).
Purpose: Divides the sample into two parts for comparison.

Conversion (Binary/Integer):
Type: Binary variable (Boolean-like).
Value:
0 - The target action was not performed (the user did not make a purchase/register).
1 - The target action was performed (successful conversion).

3. Running the analysis

You can open the notebook in Jupyter Notebook, VS Code, or upload it to Google Colab:

β€’ For Jupyter: jupyter notebook notebooks/project-notebook.ipynb
β€’ For Colab: simply upload the project-notebook.ipynb file to your Google Drive.

To connect the dataset to the project locally in step 1. "Data acquisition" of the project, replace the path:

Was:
df_url = '/content/ab_test_data.csv'

Now:
df_url = 'path to file.. /ab_test_data.csv'

Contact

Name: Andrii Isachenko
LinkedIn: Andrii Isachenko
E-mail: isao.datastudio@gmail.com

Acknowledgments


Project Status: Completed.

License: MIT License.

About

🐍 A/B Test on on Python / Jupyter Notebook / Colab

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors