🤖 AI/ML

A/B Experimentation Platform

A/B Experimentation Platform

An A/B test management system. Experiment design, automated analysis.

📖 Detailed Explanation

An A/B experimentation platform is an integrated system that simultaneously tests two or more variants on websites, apps, marketing campaigns, and more, and derives statistically significant results. It randomly splits user traffic, exposes each group to a different version, and measures key metrics such as conversion rate, click-through rate, and dwell time in real time.

The history of A/B testing began with agricultural experiments in the 1920s, and it became popular in the digital domain in the 2000s when Google tested 41 shades of blue for link colors. Currently, Netflix runs thousands of experiments every year, and Amazon generates billions of dollars in additional annual revenue through A/B testing.

The core principle of modern A/B experimentation platforms is statistical hypothesis testing. A null hypothesis (there is no difference between the two versions) is set, and the p-value is calculated from the collected data to determine a significant difference at a confidence level of 95% or higher. Platforms that use the Bayesian approach update the win probability in real time and support fast decision-making.

In practice, an A/B experimentation platform is core infrastructure for data-driven decision-making. Combined with Feature Flags, it enables gradual rollouts, and product roadmaps are built based on experiment results. Booking.com follows the principle of "no deployment without experimentation" and validates every change through A/B testing.

💻 Code Example

import numpy as np
from scipy import stats

class ABExperimentPlatform:
    """A/B 실험 플랫폼 - 통계적 유의성 검정"""

    def __init__(self, experiment_name, control_name="control", variant_name="variant"):
        self.experiment_name = experiment_name
        self.control_name = control_name
        self.variant_name = variant_name
        self.data = {control_name: [], variant_name: []}

    def assign_user(self, user_id):
        """사용자를 실험 그룹에 무작위 할당 (50:50)"""
        # 해시 기반 할당으로 동일 사용자는 항상 같은 그룹
        hash_value = hash(f"{self.experiment_name}:{user_id}") % 100
        return self.variant_name if hash_value < 50 else self.control_name

    def record_conversion(self, group, converted):
        """전환 이벤트 기록 (1: 전환, 0: 미전환)"""
        self.data[group].append(1 if converted else 0)

    def calculate_results(self, confidence_level=0.95):
        """실험 결과 통계 분석"""
        control = np.array(self.data[self.control_name])
        variant = np.array(self.data[self.variant_name])

        # 전환율 계산
        control_rate = control.mean()
        variant_rate = variant.mean()
        lift = (variant_rate - control_rate) / control_rate * 100

        # 카이제곱 검정으로 유의성 판단
        contingency_table = [
            [control.sum(), len(control) - control.sum()],
            [variant.sum(), len(variant) - variant.sum()]
        ]
        chi2, p_value, _, _ = stats.chi2_contingency(contingency_table)

        is_significant = p_value < (1 - confidence_level)

        return {
            "control_rate": f"{control_rate:.2%}",
            "variant_rate": f"{variant_rate:.2%}",
            "lift": f"{lift:+.1f}%",
            "p_value": f"{p_value:.4f}",
            "is_significant": is_significant,
            "sample_size": len(control) + len(variant),
            "winner": self.variant_name if (is_significant and lift > 0) else "대기 중"
        }

# 사용 예시
platform = ABExperimentPlatform("checkout_button_color")

# 시뮬레이션: 1000명의 사용자 데이터
np.random.seed(42)
for user_id in range(1000):
    group = platform.assign_user(user_id)
    # Control: 10% 전환율, Variant: 12% 전환율 가정
    conversion_prob = 0.12 if group == "variant" else 0.10
    converted = np.random.random() < conversion_prob
    platform.record_conversion(group, converted)

results = platform.calculate_results()
print(f"실험: {platform.experiment_name}")
print(f"Control 전환율: {results['control_rate']}")
print(f"Variant 전환율: {results['variant_rate']}")
print(f"상승률: {results['lift']}")
print(f"p-value: {results['p_value']}")
print(f"통계적 유의성: {'예' if results['is_significant'] else '아니오'}")
print(f"승자: {results['winner']}")

🗣️ Examples of Practical Conversations

In a product planning meeting

"In the A/B experimentation platform, we tested the checkout page improvement for 2 weeks, and the conversion rate rose by 15% with a p-value of 0.002, which is statistically significant. Can we proceed with a 100% rollout of Variant B?"

In a data scientist interview

"If you set the MDE (Minimum Detectable Effect) in an A/B experiment to 3%, you need an experiment duration of at least 2 weeks for the given traffic. If the experiment duration is insufficient, a Type II Error may occur, where a real effect exists but is not detected."

In a growth team review

"Looking at the results of the experiment running in Optimizely, the confidence intervals are currently overlapping, so ending early is risky. The sample size calculator says the minimum required sample is 5,000, but we currently have 3,200 users, so we need to run it for at least one more week."

Take a mock interview on this topic → WIA SOOM AI Interview · Start for free

⚠️ Cautions

⚠️
Peeking Problem (Premature Judgment)

Repeatedly checking results during an experiment sharply increases the probability of false positives (False Positive). Wait until the pre-determined sample size is reached, or apply the Sequential Testing methodology.

⚠️
Simpson's Paradox

Even if a Variant appears to be ahead in the overall data, the Control may be ahead when split by segment. Be sure to check results for key segments such as mobile/desktop and new/existing users.

⚠️
Novelty Effect

This is a phenomenon where a new UI initially has a high click-through rate but returns to its original level over time. You should run the experiment for at least 2 weeks and analyze the trend of the effect declining over time.

🔗 Related Terms

📚 Learn More