이 글은 사전지식 기반 (교재 미확인 — agent 사전학습 기반). 핵심 인용 — Vaver & Koehler (2011), Brodersen, Gallusser, Koehler, Remy, Scott (2015), Kerman, Wang, Vaver (2017).
이 글은 J-SWITCH 시리즈의 세 번째 글. Geo Holdout 의 정통 — Vaver-Koehler + CausalImpact — 을 다룬다.
1 진입 직관 — “도시 단위로 처치 분리”
Geo Holdout 의 한 줄 원리: 지역 (도시, 주, DMA) 단위로 처치/대조 분리. 지역 내 spillover 는 발생하지만 지역 간 분리.
1.1 사례
마케팅 캠페인: TV 광고 의 인과 효과. 일부 도시 처치, 다른 도시 대조. 처치 도시의 매출 vs 대조 도시 — 차이가 광고 효과.
지역 광고 입찰가 변경: 일부 DMA 의 입찰가 ↑. 지역 간 입찰 균형 분리.
1.2 비유
국가별 정책 비교 — 한국이 근로시간 감축 시 한국의 GDP vs 일본의 GDP. 국가 단위 분리.
2 Vaver & Koehler (2011) — Google Geo Experiments
2.1 의의
Google 의 지역 광고 A/B 의 표준 정립. 지역 단위 무작위 배정의 정통.
2.2 시나리오
광고 효과 측정 — 광고 노출이 click → conversion 으로 이어지는가?
표준 A/B (사용자 단위) 의 spillover: 처치 사용자의 주변 사람 도 광고 영향 (입소문, 영향력).
2.3 Geo 설계
도시·DMA 단위로 처치 (광고 노출) 와 대조 (광고 미노출) 분리. 지역 내 spillover 허용, 간 분리.
2.4 분석
도시별 time series (impressions, conversions). DiD 또는 CausalImpact 분석.
다음 절에서 깊이.
3 Matched Market Design
3.1 동기
지역들이 서로 다름. 무작위만으로는 균형 어려움.
3.2 메커니즘
Pre-period 에서 유사한 두 도시 매칭. 한 도시 처치, 다른 도시 대조.
예: pre-period 매출 패턴이 비슷한 시카고-필라델피아 매칭.
3.3 매칭 기준
Pre-period correlation, baseline level, trend similarity.
3.4 사례
광고 캠페인의 일부 도시 처치 — 다른 도시 대조. 매출 시계열 비교.
4 CausalImpact (Brodersen et al. 2015)
4.1 동기
Bayesian structural time series (BSTS) 모델로 반사실 추정. 처치 시점 전 의 데이터로 모델 학습, 처치 시점 후 의 반사실 예측.
4.2 메커니즘
- Pre-period: 처치 도시 outcome 을 대조 도시 outcome 의 함수 로 모델링 (BSTS)
- Post-period: 처치 도시의 반사실 (처치 안 받은 가상의 outcome) 예측
- 효과 = 실제 - 반사실
4.3 BSTS 구성요소
- Local linear trend
- Seasonality (요일, 월, 분기)
- Regression on control (대조 도시 outcome 을 covariate)
4.4 Bayesian Inference
Posterior distribution of 효과. Credible interval 보고.
4.5 R Package: CausalImpact
library(CausalImpact)
# treated, control 도시의 daily sales
data <- data.frame(
treated = c(treated_pre, treated_post),
control = c(control_pre, control_post)
)
pre.period <- c(1, 90) # 90 일 pre
post.period <- c(91, 120)
result <- CausalImpact(data, pre.period, post.period)
plot(result)
summary(result)4.6 의의
Google, Lyft, Pinterest 등의 표준 도구. 사용 간단 + 강력한 시각화.
5 한계
5.1 1: 지역 수 부족
미국 DMA 는 210 개 정도. 한국 광역시는 7 개. Sample 적음.
5.2 2: 외생적 충격
처치 도시에 외생적 사건 (자연 재해, 경기 변동) 발생 시 결과 오염.
5.3 3: Pre-period 의존
CausalImpact 는 pre-period 의 패턴 이 post 에 유지 가정. 큰 변동 시 부정확.
5.4 4: 외적 타당도
일부 도시의 효과가 모집단 에 일반화되는가? 지역 특성 에 의존.
6 Synthetic Control 의 시각
6.1 결합
Geo holdout 은 synthetic control 의 특수 case. 처치 도시 1 + 대조 도시 다수 → 합성 대조 구성.
J-DID-3 의 SCM 시각으로 분석.
6.2 차이
표준 SCM: pre-period outcome 매칭 가중치 CausalImpact: BSTS 기반 가중치 (Bayesian)
둘 다 반사실 추정 의 도구.
7 Lyft 사례 — Geo Holdout
7.1 시나리오
새 driver bonus 프로그램 — 운전자 동기 부여 효과.
7.2 Geo 설계
일부 도시 처치 (bonus 활성), 다른 도시 대조. 도시별 driver hours, trips, GMV 시계열.
7.3 분석
CausalImpact — pre-period 의 도시 간 correlation 학습 + post-period 반사실 예측.
7.4 결과
Bonus 의 driver hours 증가 효과 추정. SE 와 credible interval 보고.
8 Pinterest 사례 — Brand Awareness Campaign
8.1 시나리오
새 마케팅 캠페인의 지역 인지도 효과.
8.2 Geo 설계
일부 DMA 처치, 다른 DMA 대조. survey, brand search volume, engagement 측정.
8.3 결과
처치 DMA 의 brand search volume 유의 증가 — campaign 효과 정량화.
9 시뮬레이션 — Geo Holdout + CausalImpact
import numpy as np
np.random.seed(42)
# 10 도시, 90 일 pre + 30 일 post
n_cities = 10
T_pre = 90
T_post = 30
T = T_pre + T_post
# 도시별 baseline
baseline = np.random.uniform(40, 60, n_cities)
# 시간 trend (모두 공통 + noise)
common_trend = np.linspace(0, 5, T) + 10 * np.sin(2 * np.pi * np.arange(T) / 7) # 주간 cycle
city_outcomes = np.zeros((n_cities, T))
for i in range(n_cities):
city_outcomes[i] = baseline[i] + common_trend + np.random.normal(0, 2, T)
# 도시 0 = 처치 (post-period 에 효과 +5)
treatment_effect = 5.0
city_outcomes[0, T_pre:] += treatment_effect
# 표준 A/B (잘못된 적용 — pre/post 비교)
treated = city_outcomes[0]
naive_pre_post = treated[T_pre:].mean() - treated[:T_pre].mean()
# DiD: 처치 도시 - 대조 도시 평균
control_avg = city_outcomes[1:].mean(axis=0)
did_pre = (treated[:T_pre] - control_avg[:T_pre]).mean()
did_post = (treated[T_pre:] - control_avg[T_pre:]).mean()
did_effect = did_post - did_pre
# Synthetic control 식 — pre-period regression
from scipy.optimize import minimize
def mspe(w, donors_pre, treated_pre):
synth = donors_pre.T @ w
return np.mean((treated_pre - synth) ** 2)
donors_pre = city_outcomes[1:, :T_pre]
treated_pre = treated[:T_pre]
result = minimize(
mspe,
x0=np.ones(n_cities - 1) / (n_cities - 1),
args=(donors_pre, treated_pre),
method='SLSQP',
bounds=[(0, 1)] * (n_cities - 1),
constraints={'type': 'eq', 'fun': lambda w: np.sum(w) - 1}
)
w_synth = result.x
synthetic = city_outcomes[1:].T @ w_synth
sc_effect = (treated[T_pre:] - synthetic[T_pre:]).mean()
print(f"[Geo Holdout 시뮬레이션]\n")
print(f"진짜 처치 효과: {treatment_effect}")
print(f"\nNaive pre-vs-post: {naive_pre_post:.2f}")
print(f" → trend 와 처치 효과 혼동 (단순 비교 X)")
print(f"\nDiD (처치 - 대조 평균): {did_effect:.2f}")
print(f" → 더 정확하지만 단순 평균")
print(f"\nSynthetic Control: {sc_effect:.2f}")
print(f" → 가장 정확 (가중 평균)")
print(f"\nSC weights: {w_synth.round(3)}")10 결론
Geo Holdout 은 지역 단위 무작위 + CausalImpact / SCM 분석 의 결합. spillover 지역 분리 + Bayesian time series 반사실. Vaver-Koehler (2011) 의 정통, Brodersen et al. (2015) 의 도구. Lyft, Pinterest, Google 등의 표준.
핵심 메시지:
- Geo Holdout = 지역 단위 무작위 배정
- Vaver-Koehler 2011: 정통 정립
- Matched market design: pre-period 유사 도시
- CausalImpact (Brodersen 2015): BSTS 반사실
- SCM 결합: 합성 대조 가중치
- 응용: Lyft, Pinterest, Google 표준
- 한계: 지역 수 적음, 외생적 충격, 외적 타당도
다음 글: Spillover Detection.
11 관련 주제
선행 지식
Phase J 후속 글
- Spillover Detection (placeholder)
12 참고문헌
- Vaver, J. & Koehler, J. (2011). Measuring ad effectiveness using geo experiments. Google Tech Report.
- Brodersen, K. H., Gallusser, F., Koehler, J., Remy, N., Scott, S. L. (2015). Inferring causal impact using Bayesian structural time-series models. Annals of Applied Statistics 9, 247-274.
- Kerman, J., Wang, P., Vaver, J. (2017). Estimating ad effectiveness using geo experiments in a time-based regression framework. Google Tech Report.
- Abadie, A., Diamond, A., Hainmueller, J. (2010). Synthetic control methods for comparative case studies. J. Amer. Statist. Assoc. 105, 493-505.
- Aronow, P. M. & Samii, C. (2017). Estimating average causal effects under general interference. Annals of Applied Statistics 11, 1912-1947.