142

Complete Guide to A/B Testing Design, Implementation and Pitfalls

“The world is a big A/B test” Sean Ellis if you want to learn or refresh your knowledge in the essential statistical concepts you can check this article: Fundamentals of statistics for Data Scientists and Data Analysts notes: Fundamentals Of Statistics For Data Scientists and Analysts

What is A/B testing and when to use it?

The idea behind A/B Testing is that you show the variated version of the product to a sample of customers (the experimental group) and the existing version of the product to another sample of customers (the control group). Then, the difference in product performance in experimental/treatment versus the control group is tracked, to identify the effect of this new version(s) of the product on the performance of the product.

Benefits of A/B testing

  • Allows to learn what works and what doesn’t in a quick manner
  • You get feedback directly from actual/real product customers
  • Since the users are not aware that they are being tested, the results will be unbiased

Demerits of A/B testing

  • Presenting different content/price/features to different customers especially in the same geolocation might potentially be dangerous resulting in Change Aversion (we will discuss how this can be addressed later on)
  • Requires a significant amount of Product, Engineering, and Data Science resources
  • Might lead to wrong conclusions if not conducted properly

Questions to clarify before any A/B test

  • What does a sample population look like and what are the customer segments for the target product?
  • Can we find the answer to our business question using exploratory/historical data analysis (e.g. by using causal analysis)?
  • Do we want to test single or multiple variants of the target product?
  • Can we ensure truly randomized control and experimental groups s.t. both samples are an unbiased and true representation of the true user population?
  • Can we ensure the integrity of the treatment vs control effects during the entire duration of the test?

Choice of Primary metric

for the A/B test, we need to tie up the primary metric to the direct and the higher-level goals of the product.

Metric validity question: If this chosen metric were to increase significantly while everything else stays constant, would we achieve our goal and address the problem?

Common A/B test metrics

Click-Through Rate (CTR)

Click-Through Rate ==CTR = {# total clicks * 100%} / {# total clicks + # total veiws}==

Click-Through Probability (CTP)

Click-Through Probability ==CTP = {# poeple with at least 1 ciclk * 100%} / {# number of unique visitors per page}==

Conversion Rate

Conversion Rate defined as the proportion of sessions ending up with a transaction. ==CR = {# converted} / {# converted + # not converted}==

Hypothesis of the test

A/B test should always be based on a Hypothesis that needs to be tested.

For example, if the KPI of the product is to improve the quality of the recommender system’s recommendations and this can be done for example by adding Impression Discounting or building a Re-ranker model for the recommender.

Do not merge multiple ideas into one hypothesis and also limit the variables introduced in the test so that you can understand their individual impact.

Design of the test (Power Analysis)

keeping in mind that it’s not really about testing — it’s about learning.

Step 1: Statistical Hypothesis

Step 2: Power Analysis

To make sure that our results are repeatable, robust, and can be generalized to the entire population we need to avoid p-hacking, to ensure real statistical significance and to avoid biased results, we want to make sure we collect “enough” amount of observations and we run the test for a minimum predetermined amount of time. Therefore, before running the test we need to determine the sample size of the control and experimental groups and for how long we need to run the test. This process is often referred to as Power Analysis and it includes 3 specific steps: determining the power of the test, determining the significance level of the test, and determining a Minimum Detectable Effect.

Power of the test

Power of a Test is the probability of correctly rejecting the Null Hypothesis. The power, often defined by (1-beta) is equal to the probability of not making a Type II Error, where Type II error is the probability of not rejecting the null hypothesis while the null is false.

It’s common practice to pick 80% as the power of the A/B test, that is 20% Type II error which means that we are fine with not detecting (failing to reject the null) a treatment effect while there is an effect.

Significance level of the test

Significance Level which is also the probability of Type I Error is the likelihood of rejecting the null, hence detecting a treatment effect, while the null is true and there is no statistically significant impact.

Generally, we use the significance value of 5% which indicates that we have a 5% risk of concluding that there exists a statistically significant difference between the experimental and control variant performances when there is no actual difference.

Minimum Detectable Effect (delta)

Minimum Detectable Effect what is the substantive to the statistical significance that the business wants to see as a minimum impact of the new version to find this variant investment-worthy?

MDE is a proxy that relates to the smallest effect that would matter in practice for the business and is usually set by stakeholders.

It’s common practice to pick 80% as the power and 5% as the significance level of the A/B test, that is 20% Type II error and 5% Type I error. However, the choice of a value of this parameter depends on the nature of the test and the business constraints.

Step 3: Calculating minimum sample size

Calculation of the sample size depends on the underlying primary metric that you have chosen for tracking the progress of the control and experimental versions.

Case 1: Sample Size Calculation with Binary Metric

When we are dealing with a primary performance tracking metric that has two possible values such as the Click Through Rate where the user can either click (success) or not click (failure) and if the users’ responses to the product can be defined as “independent” events then we can consider this as Bernoulli Trials where the click event (success) occurs with probability p_con in case of the Control Group and p_exp in case of the Experimental Group.

Then the sample size needed to compare these two Binomial Proportions, using a two-sided test with prespecified significance level, power level, MID can be calculated as follows:

where we need to use A/A testing (an A/B test except assigning the same treatment to both groups) to obtain the estimates for p_bar and q_bar.

Case 2: Sample Size Calculation with Continuous Metric

When we are dealing with a primary performance tracking metric that is in the form of an average such as the mean order amount where we intend to compare the means of the Control and Experimental Groups, then we can use the Central Limit Theorem and state that the mean sampling distribution of both Control and Experimental Groups follow Normal Distribution.

Hence, the sample size needed to compare the means of two Normally Distributed Samples, using a two-sided test with prespecified significance level, power level, MID can be calculated as follows:

where we can run an A/A test to obtain the sample variances, σ²_con, and σ²_exp.

Step 4: Determining A/B test duration

To determine the baseline of a duration time, a common approach is to use the following formula: Duration = {N} / {# visitors per day}

Too small test duration: Novelty Effects

when picking a test duration we need to make sure we don’t run the test for too short a time period otherwise we can have a Novelty Effects.

Too large test duration: Maturation Effects

the longer the test period the larger is the likelihood of external effects impacting the reaction of the users and possibly contaminating the test results, Maturation Effects.

Running the A/B test

Analysing A/B test results in Python

This set includes:

  • Choosing an appropriate statistical test
  • Calculating the test statistics (T)
  • Calculating the p-value of the test statistics
  • Reject or fail to reject the statistical hypothesis (statistical significance)
  • Calculate the margin of error (external validity of the experiment)
  • Calculate confidence interval (external validity and practical significance of the experiment)

Choosing an appropriate statistical test

Once the interaction data of the Control and Experimental groups are collected, you can test the statistical hypothesis earlier by choosing an appropriate statistical test that is usually categorized in Parametric Statistics and Non-Parametric Statistics tests. The choice of the test depends on the following factors:

  • format of the primary metric (underlying pdf)
  • sample size (for CLT)
  • nature of the statistical hypothesis (show that a relationship between two groups merely exists or identify the type of relationship between the groups)

The most popular Parametric Statistics tests that are used in A/B testing are:

  • 2 Sample T-test (when N < 30, metric follows student-t distribution, and you want to identify whether there exist a relationship and the type of relationship between control and experimental groups)
  • 2 Sample Z-test (when N > 30, metric follows asymptotic Normal distribution and you want to identify whether there exist a relationship and the type of relationship between control and experimental groups)

The most popular Non-Parametric Statistics tests that are used in A/B testing are:

  • Fisher’s Exact Test (small N, identify and you want to identify whether there exist a relationship between control and experimental groups)
  • Chi-squared Test (large N, identify and you want to identify whether there exist a relationship between control and experimental groups)
  • Wilcoxon Rank Sum/Mann Whitney test (small N or large N, skewed sampling distributions, testing the difference in medians between control and experimental groups)

2 Sample T-test

<<<2 Sample T-test>>> If you want to test whether there is a statistically significant difference between the control and experimental groups’ metrics that are in the form of averages (e.g. average purchase amount), metric follows student-t distribution and when the sample size is smaller than 30, you can use 2-sample T-test to test the following hypothesis:

import numpy as np from scipy.stats import t

N_con = 20 df_con = N_con - 1 # degrees of freedom of Control N_exp = 20 df_exp = N_exp - 1 # degrees of freedom of Experimental

Significance level

alpha = 0.05

data of control group with t-distribution

X_con = np.random.standard_t(df_con,N_con)

data of experimental group with t-distribution

X_exp = np.random.standard_t(df_exp,N_exp)

mean of control

mu_con = np.mean(X_con)

mean of experimental

mu_exp = np.mean(X_exp)

variance of control

sigma_sqr_con = np.var(X_con) #variance of control sigma_sqr_exp = np.var(X_exp)

pooled variance

pooled_variance_t_test = ((N_con-1)sigma_sqr_con + (N_exp -1) * sigma_sqr_exp)/(N_con + N_exp-2)(1/N_con + 1/N_exp)

Standard Error

SE = np.sqrt(pooled_variance_t_test)

Test Statistics

T = (mu_con-mu_exp)/SE

Critical value for two sided 2 sample t-test

t_crit = t.ppf(1-alpha/2, N_con + N_exp - 2)

P-value of the two sided T-test using t-distribution and its symmetric property

p_value = t.sf(T, N_con + N_exp - 2)*2

Margin of Error

margin_error = t_crit * SE

Confidence Interval

CI = [(mu_con-mu_exp) - margin_error, (mu_con-mu_exp) + margin_error]

print(“T-score: ”, T) print(“T-critical: ”, t_crit) print(“P_value: ”, p_value) print(“Confidence Interval of 2 sample Z-test: ”, np.round(CI,2)) return T, t_crit, p_value, np.round(CI,2)

#+RESULTS[d4e8a8fb20443ebb125d788946f4d41a02331fa1]: | -0.9332906095291454 | 2.024394164575136 | 1.643437434527514 | array | ((-0.89 0.33)) |

Bootstrapping and Bootstrap Quantile Method for SE and CI

Statistical Significance vs Practical Significance

Quality of A/B test (Reliability, Validity, Potency)

Common problems and pitfalls of A/B testing

Ethics and privacy in A/B testing

阅读原文 永久链接

140

Experimental Template

Experiment summary

We believe that… {describe your hypothesis in one sentence}

To verify that, we will… {describe your test in one sentence}

And we’ll measure the impact on… {metrics}

Hypothesis

Business problem

Supporting data

Expected outcome

Experiment design & implementation

ICE score

ImpactConfidenceEaseScore
value 1value 2value 3Average(1:3)

Known assumptions

Results, lessons learned, next steps

Checklist

[ ] Fill in the experiment summary and write more about the details of the experiment in the rest of the issue description. Some of these may be filled in through time (the “Result, learnings, next steps” section for example) but at least the experiment summary should be filled in right from the start.

[ ] Add the label of the group:: that will work on this experiment (if known).

[ ] Mention the Product Manager, Engineering Manager, and at least one Product Designer from the group that owns the part of the product that the experiment will affect.

[ ] Fill in the values in the ICE score table ping other team members for the values you aren’t confident about (i.e. engineering should almost always fill out the ease section). Add the ~“ICE Score Needed” label to indicate that the score is incomplete.

[ ] Replace the ~“ICE Score Needed” with an ICE low/medium/high score label once all values in the ICE table have been added.

[ ] Mention the [at]gitlab-core-team team and ask for their feedback.

永久链接

139

Product Handbook

Welcome to the Product Team Handbook

Contributing to the product handbook

Informing team members about the changes

Product Team Mission

Product Principles

Product Processes

Product Categorization

About the GitLab Product

Product Manager Responsibilities

Being a Product Manager at GitLab

Product Performance Indicators

Product OKRs

Our Product Leadership Team

  • Data for Product Managers
  • Internal Product Handbook (must access through OKTA)
  • Learning and Development for Product Management
  • Product Budgeting Process
  • Product Development Flow
  • Product Development Timeline
  • Product Intelligence Guide
  • Product Management CDF and competencies
  • Product Manager Onboarding
  • Product Manager Responsibilities
  • Product Manager SAFE (legal) Guidance
  • Product Operations Releases
  • Product Pricing Model
  • Release Posts
  • Tiering Guidance for Features

阅读原文 永久链接

137

The GIST Framework

GIST

Not every metrics are matters. 2 types of metrics:

  • Impact Metrics
    • Revenue
    • Number of Customers
    • Number of Active Users
    • North Star Metric
  • Outcome Metrics
    • Funnel metrics
    • User behaviors
    • System performance
    • Quality metrics

User Value will help you reach the North Star Metric Business Value will help to reach the Top Key Performance Indicators

North Start Metric Examples

  • Facebook: Daily Active User
  • Whatsapp: Send Messages
  • YouTube: Minutes watched
  • Airbnb: Nights booked -eBay: GMV

Metric Trees

“If you want to have good ideas you must have many ideas. Most of them will be wrong, and what you have to learn is which ones to throw away.“ Linus Pauling

GIST Idea Flow

Steps

AFTER Framwork

Context

永久链接

135

Testing Product Ideas

The AFTER Framework

AFTER:

  • Assessment - Quick and rough evaluation of the potential and risk of an idea with no external research
  • Fact Finding - Actively looking for data and facts that may support or refute the validity of the idea
  • Tests - Putting increasingly more evolved versions of the idea in front of users and measuring their reactions.
  • Experiments - Conducting quantitative tests that control against false results.
  • Release results - Gradually releasing the product to more users and customers while monitoring the reaction.

Assessment

Goals Alignment

ICE analysis

ICE, invented by growth expert, Sean Ellis

Business Modeling

by using Business Model Canvas

Assumption Mapping

<<>>, invented by David J. Bland, is a team brainstorming technique to surface assumptions and risks in your bigger ideas.

Stakeholder Reviews

Fact Finding

Data Analysis

User/Customer Interviews

Field Research

Surveys

Competitor Analysis

Tests

Minimum Viable Product (MVP)

The term Minimum Viable Product was first used by aeronautical engineer turned business consultant, Frank Robinson in 2001. Robinson argued that companies should develop a product that is “big enough to cause adoption, satisfaction and sales, but not so big as to be bloated and risky.”[3] The MVP was designed to create “maximum ROI divided by risk.” In other words, he defines an MVP is a fully-fledged product that maximizes outcomes yet minimizes output.

Smoke Tests

Usability Tests

Human Operated Tests

Longitudinal User Study

Early Adopter Programs

Internal Company Tests

Labs

Beta Programs and Preview Versions

Experiments

A/B Tests

The A/B Testing

A/B/n tests

Multivariate tests

Release

Release Tests

Interpreting Results

Testing Ideas As Part of a System

Summary

  1. Introduction: Emphasizes the importance of validating product ideas due to the high failure rate of untested concepts and the necessity of evidence-based decision-making.
  2. What to Validate: Focuses on validating value, usability, feasibility, and viability to ensure ideas meet market needs and are practical to implement.
  3. The AFTER Framework: Introduces a structured approach to validation using Assessment, Fact Finding, Tests, Experiments, and Release results.
  4. Assessment Techniques: Encourages quick evaluations to filter out weak ideas early without extensive research.
  5. Goals Alignment: Stresses the need for product ideas to align with company goals, using tools like OKRs for clarity and focus.
  6. ICE Analysis: Utilizes the ICE method to score ideas based on Impact, Confidence, and Ease to provide a structured evaluation.
  7. Business Modeling: Ensures ideas are financially viable and supported by necessary resources and partnerships using business model canvases.
  8. Assumption Mapping: Identifies and prioritizes risks and assumptions to focus validation efforts effectively.
  9. Stakeholder Reviews: Engages internal stakeholders early to identify potential risks and opposition, aiming for collaborative mitigation strategies.
  10. Fact Finding and Data Analysis: Gathers data from various sources to support or refute the validity of an idea, using user behavior analytics and feedback.
  11. User/Customer Interviews: Conducts interviews to gain qualitative insights into user needs and validate assumptions through direct interaction.
  12. Field Research: Observes users in their natural environment to understand behavior and context, employing methods like ethnographic interviewing and contextual inquiry.
  13. Surveys: Uses online surveys to quickly gather broad user feedback, being cautious of biases and ensuring questions are clear and concise.
  14. Competitor Analysis: Analyzes competitors to learn from their successes and mistakes, but cautions against blindly copying their strategies .
  15. Testing Methods: Implements various tests, including Minimum Viable Products (MVPs), smoke tests, and usability tests, to iteratively validate ideas with users .
  16. Human Operated Tests: Simulates functionality manually before automation to quickly validate concepts with minimal development .
  17. Longitudinal User Studies: Measures user reactions over time to assess the sustained value and satisfaction of a product .
  18. Early Adopter Programs: Engages early adopters for feedback and support, building advocacy and refining the product before a wider release .
  19. Internal Company Tests: Tests products internally (dogfooding) to identify bugs and usability issues early, fostering internal support .
  20. Labs and Beta Programs: Uses labs and beta versions to test incomplete features with users who opt-in, gathering early feedback and refining the product .
  21. Experiments and A/B Tests: Conducts controlled experiments to compare user responses and validate changes, ensuring statistical significance .
  22. Release Tests: Monitors user reactions during gradual rollouts to ensure stability and user satisfaction, making adjustments as needed .
  23. Interpreting Results: Analyzes test results critically to decide on the next steps, using the Gilad Confidence Meter to gauge the strength of evidence .
  24. Systematic Validation with GIST: Advocates for a structured system (GIST framework) to guide idea collection, validation, and implementation .

阅读原文 永久链接

134

OKRs Done Right

About

The OKR Challenge

Book Structure

Goals — Start With Why

Management By Intent

The OKR Construct

OKR break goals into two parts:

  • Objective—An aspirational short statement that explains the intent — where we want to be
  • Key results—2-5 measurable results that explain how we’ll measure success

阅读原文 永久链接

133

ICE Prioritization Done Right

What is ICE?

With ICE we assign each idea three values:

  • Impact – how much does this idea stand to improve the key metric we want to grow. I explain below what this key metric is.
  • Confidence – how sure are we that we will have this impact? Another way to put this— how strong is the evidence in support of our impact assessment.
  • Ease – how easy is it going to be to build and launch this idea in full. Usually this is the opposite of person/weeks.

Understanding Confidence

Calculating Confidence

Not Just Easy or Safe Ideas

When to ICE-Score

Choosing the Key Metric for Impact

The Life Cycle of an Idea

Frequently Asked Questions

Doesn’t All of This Take a Lot of Work and Time?

Why Do We Need Idea Banks?

Would My Managers and Stakeholders Accept ICE?

How Strictly Do We Have to Follow The ICE Order?

The Bottom Line

阅读原文 永久链接

132

First principles: Your product is your GTM strategy

Your Product Is Your Go-to-Market Strategy. Here’s Why.

Atlassian, a maker of tools that help software developers collaborate with each other, grew from nothing to $100 million in revenue without ever hiring a salesperson.

The Evolution of Tech Marketing

Field Sales: Oracle mastered this in the 1980s and 1990s, with an enormous, aggressive, highly competent field sales force that spent most of its time on the road, calling on customers, wining and dining them until there was enough trust and mutual understanding to close six- and seven-figure contracts.

Inside Sales: more telephone-based…pioneered by Oracle and others in the late 1990s and embraced by Salesforce.com in its earliest days, salespeople spend less time on the road. The focus shifts to the inside sales force, calling lists of cold and warm prospects and closing many sales on the phone.

Marketing: As sales organizations began to understand the virtues of large numbers of prospects, the industry evolved into a third, more marketing-driven stage. HubSpot (content marketing), ExactTarget (broad marketing mix) Constant Contact (broad marketing mix including radio spots), and Barracuda Networks (creative marketing including the use of airport billboards) exemplify this approach.

Product-Led Growth: In this stage, the product itself is the go-to-market strategy for your company. Atlassian is probably the most successful example of this, but there are many others including OpenView portfolio investments Expensify, Datadog, FieldLens and Lesson.ly to name a few.

Dramatic Simplification

But the old ways of selling have never disappeared: They’ve simply become equally valid options on an increasingly broad spectrum of possibilities.

If you have a complex product and multiple/high level buyers, it generally requires field sales to educate the buyers and help them move down their buying journey over multiple meetings.

The buying process is one of being convinced that the value of using the product, net of what you’re going to pay, is positive. The sales team does this by communicating value. If the product itself can communicate its own positive value, then that equation works with very little additional sales effort needed.

阅读原文 永久链接

131

THE ZERO MOMENT OF TRUTH

The Zero Moment of Truth is a mental model developed by Google to try and explain the changing nature of traditional marketing methods on the purchase funnel. In this way, it attempts to highlight the way digital technologies have changed the mindset to how we need to approach marketing as a whole.

The Traditional Marketing Model

We create a stimulus, which drives a person to the shelf (usually a physical store), where they purchase the product. The customer then goes home to experience the product, and if it behaves as advertised, the customer is satisfied.

The Zero Moment of Truth

ZMOT activities include: Searched online via a search engine or social community Talked with friends of family about the product Comparison shopped the products online Sought information from a product / brand / manufactures website Read product reviews or endorsements online Sought information from a retailer / store website Read comments following an article or opinion piece online Become a friend / follower / “liked” a brand Asked an online community or forum for their opinion of the product

阅读原文 永久链接

加载更早的文章