What is Meridian GeoX?

Meridian GeoX is Google's open-source Python library for designing and analysing geo experiments. It assigns markets by stratified randomisation, estimates lift with time-based regression, and converts the result into an ROI prior that calibrates a Meridian marketing mix model.

Also called
GeoX, Google GeoX, meridian-geox Python package
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

Meridian GeoX is an open-source Python library from Google for running geo experiments, built to sit alongside Meridian, Google's Bayesian marketing mix model. It covers the whole life of a test: choosing which markets to treat, checking before any money is spent whether the design can detect the effect expected, estimating the lift afterwards, and handing that estimate to Meridian as a prior. It needs daily KPI data by geo, plus daily spend by geo for heavy-up and go-dark designs, which change an existing budget rather than launching a new one.

The design step is where it differs most from older tooling. Rather than hand-picking matched markets, it groups geos into strata by volume, trend and seasonality — k-means clustering over features such as the mean, coefficient of variation, slope and autocorrelation of each geo's KPI series — and then randomises treatment within each stratum. That is stratified randomisation applied to markets, and it keeps the property matched-market designs give up: assignment, not judgement, decides which markets are treated. Google's argument for it is that matched-market selection tends to understate the noise in the estimate, because markets chosen for how closely they tracked in the pre-period flatter the fit.

Candidate designs are then screened on data they were not fitted to. The pre-period is split into training, validation and final-selection windows, and each design is scored on out-of-sample fit, on A/A simulations that check the analysis does not report effects where none exist, on its minimum detectable effect, and on the budget needed to reach adequate power. Screening out of sample is the important detail: a design chosen for its in-sample fit is chosen partly for its noise, which is how a test that looked well powered on paper comes back inconclusive.

The analysis is time-based regression. The treated group's average KPI is regressed on the control group's over the pre-period, the fitted relationship is projected through the test window as the counterfactual, and the accumulated gap is the lift. GeoX constrains the slope to be non-negative and makes no distributional assumption about the errors, quantifying uncertainty with placebo-based inference instead. The assumption carrying the weight is that control markets stay at business as usual throughout — the requirement every counterfactual method shares, and one that has to be checked against the media plan rather than inferred from the data.

The link to Meridian is what makes it more than another geo-testing package. A finished GeoX analysis can be passed straight to Meridian's calibration builder, which turns the incremental return and its standard deviation into an ROI prior for that channel — widening it when the test's spend was small relative to the channel's usual level, when the test is old, or when it was too short to capture the full carryover. That is MMM calibration with the adjustments made explicit, which is a real improvement on pasting a lift figure in as a tight prior. The honest framing is the same as for GeoLift: a careful implementation of established methods with good planning tooling, not a new kind of evidence.

The formula

The four pieces of the pipeline, from assignment to the prior Meridian receives.

The assignment
k-means strata over geo features → randomise within each stratum

Features are each geo's KPI mean, coefficient of variation, slope, lag-1 autocorrelation and dynamic time warping distance. Four strata by default.

The analysis
Ȳ_treat,t = α + β · Ȳ_control,t + εₜ, β ≥ 0

Fitted on the pre-period and projected through the test window — see time-based regression.

The design screen
MDE = SE_lift · ( z₁₋α/₂ + z₁₋β ) / baseline

Two-sided by default, and independent of which analysis method is chosen afterwards.

The calibrated prior
σ_prior = σ_exp · √( 1 + τ_spend + τ_recency + τ_duration )

Small tests, old tests and short tests each widen the prior. Recency decays with a 52-week half-life.

Worked example

A US retailer wants a geo test of paid social to calibrate its Meridian model. GeoX screens candidate designs across the 210 DMAs, and the selected go-dark test switches paid social off in the treated markets for six weeks, with revenue as the KPI.

Hand-picked matched-market design
MDE 9.8%, A/A false-positive rate 13% at a nominal 5%
Stratified design selected by GeoX
MDE 4.1%, A/A false-positive rate 5.4%
Measured incremental ROAS
2.6, standard deviation 0.7
Withheld spend as a share of the channel's usual spend
25%
Carryover captured within six weeks (geometric adstock, α = 0.5)
≈ 84%
Prior passed to Meridian
centred near 3.1, standard deviation ≈ 1.4

The stratified design could detect a 4.1% effect where the hand-picked one needed 9.8%, and a measured iROAS of 2.6 enters Meridian as a prior centred near 3.1 with twice the test's standard deviation.

The first two rows are the design screen earning its keep. The hand-picked markets looked comparable, and the A/A simulations show what that looked like in practice: on periods where nothing happened, the analysis reported a significant effect 13% of the time against a nominal 5%, because markets chosen for how well they tracked understate the real noise. The stratified design holds its error rate and detects a smaller effect. The last three rows are the calibration adjustments, and both move the number the way they should. The test withheld only a quarter of the channel's spend, so extrapolating to the whole channel is uncertain and the prior's spread doubles from 0.7 to about 1.4. And six weeks captures only about 84% of the carryover a geometric adstock with α = 0.5 implies, so the mean is scaled up from 2.6 to about 3.1. A team that pasted 2.6 ± 0.7 straight into the model would have constrained the channel more tightly, and slightly lower, than the experiment supports.

Common misconceptions

“GeoX is only useful if you run Meridian.”
The design and analysis stand on their own: the library installs without Meridian and returns a lift estimate with an interval like any geo-testing tool. The Meridian hand-off is a convenience for teams that already run the model, and a well-documented one — not a requirement for using the rest.
“Because markets are randomised, the control markets do not need checking.”
Randomisation balances the groups in expectation; it does nothing about contamination. A control market receiving spillover from national media, overlapping broadcast coverage or a regional promotion still biases the counterfactual, and with a few dozen markets a single unlucky draw can leave the groups visibly unbalanced. Check both against the media plan before the test starts.
“Once a GeoX result calibrates the model, that channel's MMM estimate is settled.”
A prior moves the posterior; it does not replace it, and the calibration builder deliberately widens it for small, old or short tests. One test measures one channel at one spend level in one period. It also assumes the experiment compared against zero spend, so a heavy-up result is not the input it was built for. Repeat tests are what keep calibration current.

Frequently asked questions

How does Meridian GeoX differ from GeoLift?
They make different choices at every stage. GeoLift selects treated markets by how well a synthetic control fits them and analyses with synthetic control in R. GeoX randomises markets within strata and analyses with time-based regression in Python. GeoX also hands its result directly to Meridian as a calibrated prior. Both run power analysis before the test, and on a clean design they usually agree.
What data does Meridian GeoX need?
Daily KPI data for each geo over a pre-period long enough to cover the seasonality the test will run through, and daily spend for each geo if the design is a heavy-up or go-dark test that changes an existing budget. In the US the geo is usually the DMA. It also needs enough geos for the strata to hold several markets each; with very few geos it falls back to simple random assignment.
Can every GeoX result be used to calibrate Meridian?
No. The calibration builder is designed for experiments whose counterfactual is zero spend, which go-dark and holdback tests provide. A heavy-up test measures what extra spend adds on top of the normal budget, which is a marginal return rather than the channel's average return, and Google does not recommend feeding it in as is.

Related terms

  • CausalImpact

    Fits a time-series model on the pre-period and projects it forward — powerful, easy to run, and easy to run badly.

  • GeoLift

    Open-source geo testing with the power simulation built in — it tells you whether the test can work before you run it.

  • MMM calibration

    Anchor the model to an experiment — the step that turns a plausible MMM into a trustworthy one.

  • Stratified randomization

    Balance the mix before you randomise instead of correcting for it afterwards — cheap insurance, modest at scale.

  • Time-based regression

    One regression on the pre-period, projected forward — simple, transparent, and only as good as the controls it leans on.

Calculate it

  • A/B test sample size

    Size an experiment before you launch, for a binary, continuous or ratio KPI — each with its own design and its own assumptions.

  • Paired t-test

    Before-and-after or matched pairs — size the study on the difference SD, then test it.

Knowing the term is the easy part

Strata, the design screen and the hand-off to Meridian are where a GeoX test is won or lost — see Geo Testing