Ivy Professional School
Rating
Learning/Python Data Drill #12

Subscription Pricing A/B Test Analysis

Last updated

Analyze whether a new subscription pricing page improves conversion rate using Python, statistics, and business interpretation.

PythonIntermediatePandasStatisticsA/B TestingHypothesis TestingConfidence Interval

Your Objective

Analyze whether a new subscription pricing page improves conversion rate using Python, statistics, and business interpretation.

The Setup

A subscription business launched a Treatment pricing page against the old Control page and wants to compare conversion and revenue outcomes.

Table Schema

pricing_experiment
ColumnTypeKey / Notes
user_idINTUnique user ID
variantVARCHAR(20)Pricing page shown to the user
visitsINTNumber of visits by the user
convertedINTWhether the user purchased subscription
revenueFLOATRevenue generated from the user
device_typeVARCHAR(30)Device used by the user
traffic_sourceVARCHAR(50)Source of traffic

Sample Data

pricing_experiment — 12 rows

user_idvariantvisitsconvertedrevenuedevice_typetraffic_source
1001Control200MobileGoogle
1002Control11999DesktopDirect
1003Control300MobileInstagram
1004Control21999DesktopGoogle
1005Control100MobileFacebook
1006Treatment211199MobileGoogle
1007Treatment111199DesktopDirect
1008Treatment300MobileInstagram
1009Treatment211199DesktopGoogle
1010Treatment100MobileFacebook
1011Control200DesktopDirect
1012Treatment211199MobileGoogle

Your Task

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):

varianttotal_usersconversionstotal_revenueconversion_raterevenue_per_visitor
Control6219980.3333333.00
Treatment6447960.6667799.33

Statistics Hint

  • →Use a two-proportion z-test for conversion rate comparison, but discuss sample size risk in the business recommendation.
Explore Enterprise Solutions