Mastering Product Analytics with Mixpanel & GA4Lesson 18 of 32
Lesson 18 of 32

Statistical Power, Sample Size Estimation & Minimum Detectable Effect (MDE)

Overview & Learning Objectives

Before you launch an A/B test, you must answer the most famous question in product analytics: "How many users do we need, and how many weeks must we run this test?" If you run the test with too few users, you won't be able to detect real improvements (low statistical power). If you run it too long, you waste valuable engineering time. In this lesson, you will master the mathematics of Sample Size Estimation, Type I (Alpha) errors, Type II (Beta) errors, and the Minimum Detectable Effect (MDE).

  • Understand Type I Error (Alpha = 5%: False Positive) vs Type II Error (Beta = 20%: False Negative).
  • Define Minimum Detectable Effect (MDE): the smallest percentage improvement the experiment is powered to reliably detect.
  • Calculate required sample sizes using Evan Miller / Optimizely sample size calculators.
Example

Real-World Example: The Metal Detector on the Sandy Beach

PRACTICAL CONTEXT
  • Scenario: Sweeping a sandy beach with a high-sensitivity metal detector vs an old pocket magnet.
  • Minimum Detectable Effect (MDE): The smallest percentage uplift your experiment is powered to reliably detect.
  • Sample Size Rule: Running tests with insufficient traffic produces false negatives and wastes engineering sprint cycles.
Corporate / Tech Term Everyday / Practical Metaphor Operational Meaning
Minimum Detectable Effect (MDE) How small of a treasure coin you want to find The smallest % change your test is designed to measure reliably.
Sample Size (N) How many footsteps you take across the beach Total number of unique users needed in each variant.
Type I Error (Alpha: False Alarm) Metal detector beeping loudly on a rusted bottle cap Thinking your new feature won when it was just pure random luck.
Type II Error (Beta: Missed Treasure) Walking past a real diamond without detector beeping A great feature actually works, but your sample size was too small to prove it.
Core Principle: The smaller the improvement you want to detect, the more users you need! Detecting a 1% lift takes 25x more users than detecting a 5% lift.

Visual Infographic: The Sample Size Trade-Off Formula

STATISTICS INFOGRAPHIC
Stage 1
1. Baseline Conversion

Our current checkout conversion is 5.0%.

Stage 2
2. Desired MDE

We want to be able to detect a +5% relative lift (from 5.0% to 5.25%).

Stage 3
3. Statistical Rules

Alpha = 5% (95% Confidence) | Power (1 - Beta) = 80%.

Stage 4
4. Required Sample

Requires 125,000 users per variant (Total: 250,000 users over 14 days).

Industry Standard & Framework

Standard: Statistical Power Analysis & Evan Miller Experimentation Standards.

Real-World Business Application: MakeMyTrip Flight Booking Price Label MDE Calculation

MakeMyTrip calculates how long to run an A/B test testing "Instant Refund" badge copy on domestic flight search cards.

Parameter NameIndustry Standard SettingValue in MakeMyTrip TestOperational Impact
Baseline Conversion Rate-8.2% of searchers book flightCurrent benchmark performance
Significance Level (Alpha)0.05 (95% Confidence)5% probability of false positiveStandard guard against random noise
Statistical Power (1 - Beta)0.80 (80% Power)80% probability of finding real liftStandard guard against false negatives
Minimum Detectable Effect (MDE)Between 2% and 10%3.5% Relative LiftPowers test to detect jump from 8.2% to 8.48%
Required Sample SizeCalculated via formula68,500 users per variantTakes exactly 11 days of traffic at 12,500 users/day

Step-by-Step UI Tutorial & Visual Workflow Guide

Below is the practical, non-technical walkthrough showing how Product Analysts design, review, and execute this capability inside real-world tools like Mixpanel, Google Analytics 4, BigQuery, and Google Tag Manager.

Step-by-Step Execution Workflow

EXECUTION PHASES
1 Product Analyst
Determine Baseline Conversion Rate

Pull historical conversion rate over the past 30 days (e.g., 8.2%).

2 Product Analyst & PM
Agree on Realistic MDE with PM

Ask PM: "What is the minimum lift that makes building this feature worth our engineering cost?" (e.g. +3.5%).

3 Product Analyst
Calculate Required Sample Size

Use sample size formula: $N = \frac{16 \cdot \sigma^2}{\Delta^2}$. Output: 68,500 users/variant.

4 Product Analyst
Estimate Test Duration

Divide sample size by daily traffic: $137,000 / 12,500 = 10.96$ days -> Round up to 14 days (2 full weeks).

5 Product Analyst
Lock Duration in Pre-Registration Plan

Write down sample size and duration in pre-experiment document to prevent premature peeking.

Evan Miller Sample Size Calculator & Statsig Pre-Test Planner

Step-by-Step UI Tutorial: Calculating Sample Sizes on Evan Miller

Step 1
Step 1: Open Calculator

Navigate to `evanmiller.org/ab-testing/sample-size.html`.

Step 2
Step 2: Enter Baseline Conversion

Type baseline conversion rate: `8.2%`.

Step 3
Step 3: Enter Minimum Detectable Effect

Enter relative MDE: `3.5%`.

Step 4
Step 4: Read Output & Verify Full Weeks

The calculator outputs `68,500 per branch`. Check your daily traffic and round experiment length to full 7-day increments.

Sample Size Requirements vs MDE (The Quadratic Law)

SAMPLE SIZE CHART
relative M D Esample Size Per Varianttest Duration At10k Users Per Day
+20% Relative Lift (Big Change)3,800 users< 1 day
+10% Relative Lift (Moderate Change)15,200 users3 days
+5% Relative Lift (Subtle Copy Change)61,000 users12 days
+1% Relative Lift (Micro-Optimization)1,520,000 users300 days (Impractical!)

Implementation Guidelines for Product Analysts

  • Always round experiment run durations to full 7-day increments (e.g., 7 days or 14 days) to capture weekday vs weekend seasonality.
  • Never run an experiment for less than 7 days, even if you reach your sample size in 6 hours, due to day-of-week behavioral variation.
  • Avoid running experiments for more than 4 weeks to prevent cookie churn and sample contamination from deleting browser caches.

Practical Hands-On Exercises

  1. If you need 50,000 users per variant and your website gets 10,000 total eligible users per day, how many days must the test run?
  2. Explain why detecting a 1% conversion lift requires significantly more users than detecting a 10% lift.