Python for analytics and A/B testing
Python for merging and cleaning analytics data, running Bayesian A/B tests and calculating sample sizes before a test launches.
Python takes web analytics and A/B testing past the limits of standard dashboards. It handles very large datasets, automates complex statistical tests, and supports custom attribution models that GA4 can’t build out of the box.
Data acquisition and cleaning

Python merges data from different sources, such as GA4 session data with internal CRM sales data. It handles missing values, filters out bot traffic and aligns timestamps so funnel analysis is accurate.
Bayesian A/B testing

Standard (frequentist) A/B testing gives you a p-value, which is hard to interpret. A Bayesian test gives you the number people actually want: the probability that variant B is better than variant A.
Sample size and power calculation
Most people guess how long a test should run. It can be calculated exactly.
I built Python scripts for power analysis that set the minimum sample size and minimum detectable effect (MDE) before launch. That optimizes traffic allocation and prevents underpowered tests.
See how this fits into a wider experimentation program.
- Stack
-
- Python
- Bayesian statistics
- GA4