Last updated
Analyze whether a new subscription pricing page improves conversion rate using Python, statistics, and business interpretation.
Analyze whether a new subscription pricing page improves conversion rate using Python, statistics, and business interpretation.
A subscription business launched a Treatment pricing page against the old Control page and wants to compare conversion and revenue outcomes.
| Column | Type | Key / Notes |
|---|---|---|
| user_id | INT | Unique user ID |
| variant | VARCHAR(20) | Pricing page shown to the user |
| visits | INT | Number of visits by the user |
| converted | INT | Whether the user purchased subscription |
| revenue | FLOAT | Revenue generated from the user |
| device_type | VARCHAR(30) | Device used by the user |
| traffic_source | VARCHAR(50) | Source of traffic |
pricing_experiment — 12 rows
| user_id | variant | visits | converted | revenue | device_type | traffic_source |
|---|---|---|---|---|---|---|
| 1001 | Control | 2 | 0 | 0 | Mobile | |
| 1002 | Control | 1 | 1 | 999 | Desktop | Direct |
| 1003 | Control | 3 | 0 | 0 | Mobile | |
| 1004 | Control | 2 | 1 | 999 | Desktop | |
| 1005 | Control | 1 | 0 | 0 | Mobile | |
| 1006 | Treatment | 2 | 1 | 1199 | Mobile | |
| 1007 | Treatment | 1 | 1 | 1199 | Desktop | Direct |
| 1008 | Treatment | 3 | 0 | 0 | Mobile | |
| 1009 | Treatment | 2 | 1 | 1199 | Desktop | |
| 1010 | Treatment | 1 | 0 | 0 | Mobile | |
| 1011 | Control | 2 | 0 | 0 | Desktop | Direct |
| 1012 | Treatment | 2 | 1 | 1199 | Mobile |
Calculate conversion rate for Control and Treatment. Calculate revenue per visitor for both groups. Calculate absolute and relative uplift in conversion rate. Test whether Treatment is statistically better than Control. Calculate the 95% confidence interval for uplift. Recommend whether the business should roll out the new pricing page.
Your output should look like this (partial example):
| variant | total_users | conversions | total_revenue | conversion_rate | revenue_per_visitor |
|---|---|---|---|---|---|
| Control | 6 | 2 | 1998 | 0.3333 | 333.00 |
| Treatment | 6 | 4 | 4796 | 0.6667 | 799.33 |