Product teams are constantly making decisions about what to build, what to change and what to remove. Opinions and intuition are poor guides when it comes to user behaviour. What may appear to be an improvement to a designer can in fact confuse or frustrate the actual users. That’s where A/B testing and experimental design come in.
A/B testing is the process of comparing two versions of a product element (a webpage, a button, a checkout flow, a notification etc.) to see which one performs better against a given metric. Done properly it’s a very powerful method of providing clear evidence for a product decision. For anyone doing a data scientist course in Chennai it’s absolutely fundamental that you understand A/B testing as it’s applicable in every single industry you can imagine (e-commerce, SaaS, fintech, healthcare etc).
Understanding the Foundations of A/B Testing
At its most basic level an A/B test splits the users into two groups. One group (Group A) gets the current version of the feature (the control). The other group (Group B) gets the new version (the variant). The users in both groups then interact with the product as normal and we measure their behaviour over the course of the test.
The result of the test is assessed using statistical methods to establish whether the difference between the two groups is real or just due to chance.
Several foundational concepts underpin every well-designed experiment:
Hypothesis generation is the starting point. A good hypothesis is specific and testable. Example: “Changing the CTA button from grey to blue will result in a 5% increase in click through from new users.” That’s a very clear hypothesis in that it defines exactly what is being changed, who it’s going to impact and what the outcome is going to be.
Randomisation ensures that users are assigned to the control and variant groups in a unbiased manner. Good randomisation means that any differences in behaviour between the two groups can be attributed to the feature change rather than to pre-existing differences in the user groups.
Statistical significance is the yardstick by which we judge whether a test result is worth trusting. The vast majority of teams will use a 95% significance level (i.e. there’s only a 5% chance that the difference we’ve observed is due to chance).
Sample size calculation is what tells you how many users you need before the test actually produces any reliable results. If you run the test on too few users you’re going to end up with either no results at all or results that are completely inconclusive and misleading.
Designing a Rigorous Experiment
A well structured A/B test goes through a very clear process from beginning to end.
Define the metric. Every test requires a primary metric i.e. the one specific measure that will determine whether the test has been a success or a failure. Conversion rate, session duration, feature adoption rate and revenue per user are all common examples of primary metrics. You can of course also track a number of secondary metrics to monitor any unintended side effects.
Isolate the variable: only one thing should be changed in any given test. If you change more than one thing at a time you simply can’t work out which one of the changes has had any effect. That’s the basic principle.
Determine test duration. Running a test for too short a period is a recipe for capturing noise rather than the actual underlying behaviour. Most tests will run for at least one to two full business cycles to allow for the weekly patterns in user behaviour.
Don’t peek! One of the most frequent errors in A/B testing is to stop a test early because the early results look good. That’s known as “peeking” and it massively increases the false positive rate. You should only look at the results when you’ve reached your pre-determined sample size.
These are the principles that are covered in depth in any proper data scientist course in Chennai (where you’ll be working through real datasets and a raft of simulated experiments to build up your practical testing skills).
Common Pitfalls and How to Avoid Them
Even well experienced teams can make mistakes in the design of an experiment. It’s important to be aware of the most common errors so as to ensure the validity of the results.
Selection bias arises when the randomisation process itself favours one group of users over another. This can be avoided by using appropriate randomisation tools and stratified sampling.
Network effects occur in products where users are interacting with each other. If a user in the control group is influenced by a user in the variant group then the experiment is compromised. In that situation cluster randomisation (where whole groups or cohorts are randomised together) is the preferred approach.
Multiple testing issues arise when a team are running a number of experiments at the same time and then interpreting each one independently. This leads to an increased probability of false positives. The use of multiple testing corrections (e.g. Bonferroni) or FDR control can help deal with this.
Novelty effects can cause a new feature to look more effective than it actually is simply due to the fact that people are interested in it. The longer you run the test the less impact novelty will have.
Conclusion
A/B testing is one of the most reliable tools we have for making product decisions on the basis of evidence. If you get it right (clear hypotheses, proper randomisation, appropriate sample sizes, disciplined analysis) it turns what would otherwise be a very subjective debate into an objective answer.
For anyone looking to build a career in data and product analytics this is absolutely essential. A good data scientist course in Chennai will give you the statistical underpinning as well as the practical judgement to be able to design experiments that will give you reliable, useful insights.