Design and Analyze a Multi-Channel Vaccination Campaign Experiment
Statistics & ExperimentsModel answerLast updated
Plan a randomized experiment to measure the impact of SMS and email reminders on pharmacy vaccination rates, including power calculations and causal inference.
You're leading the analytics for a pharmacy chain's autumn vaccination campaign. The business wants to use digital outreach to drive more customers to get vaccinated in their stores during the fall season.
Context:
- Your target audience consists of loyalty program members aged 18+ across three large states
- You have two communication channels available: text messages (cost: $0.02 per send) and email (cost: $0.001 per send)
- Historical data shows text messages reach recipients 92% of the time, while emails reach 98%
- The outcome you're measuring is whether someone receives a vaccination at one of your pharmacy locations during the campaign period
Your task is to design the complete experiment:
-
Design choices: Should you run separate A/B tests for each channel, or use a factorial design with all combinations? Explain your reasoning around interaction effects, resource constraints, and potential interference between units. Define who is eligible, who should be excluded, what your randomization unit should be, and how you'll stratify. Specify your primary success metric and any guardrail metrics.
-
Sample size calculation: Historical vaccination rates are around 8%. You want to detect at least a 1.5 percentage point increase with 80% power at a 5% significance level (two-sided). Calculate the required sample size per group. Then adjust for the fact that some customers belong to the same household (intracluster correlation = 0.01, average household size = 1.3).
-
Handling imperfect compliance: Not everyone assigned to receive a message will actually see it. Define the intention-to-treat (ITT) estimate and explain how to calculate the treatment-on-treated (TOT) effect using delivery rates. What assumptions must hold?
-
Attribution logic: In a factorial design where some customers get both channels, how do you attribute impact to each channel? What data would you collect, and what analysis would you run? Why can't you simply ask customers "which message brought you in?"
-
Interpret results: In one region, the control group had a 7.5% vaccination rate. The text message group had 9.0% (100 vaccinations out of roughly 1,111 people). When you survey those 100 vaccinated customers, 50 say the text message influenced their decision. Compute the actual lift from the experiment and explain the discrepancy. If the lift falls short of your target, what would you test next?
-
Reporting plan: How would you monitor the experiment as it runs, finalize your analysis, and make a recommendation about which channels to use at scale given a fixed budget?
Hints
Hint 1
For the design choice, consider whether SMS and email might reinforce or substitute for each other—this determines whether a factorial approach adds value
Hint 2
When calculating treatment-on-treated effects, remember that delivery rate creates one-sided noncompliance: treated units might not receive the message, but control units definitely don't
Hint 3
Self-reported attribution tells you about customer perception, not causality—many people who would have acted anyway will credit the message
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
1. Experimental Design
Use a 2×2 factorial design with four arms: control (neither channel), SMS only, email only, and both SMS and email.
Rationale:
- Interaction effects matter for the business decision. SMS and email could be substitutes (a second reminder adds little value) or complements (email provides details while SMS prompts immediate action). A factorial design is the only way to measure this interaction, and the rollout strategy depends on it.
- Statistical efficiency. If interaction is small, you essentially run two experiments simultaneously with the same total sample. Each main effect compares half the sample receiving that channel against the other half.
- Cost is manageable at test scale. Even with ~11,000 people per channel and 3 messages each, SMS costs around $660 and email about $33 for the test. Cost matters for full rollout decisions, not for experimental design.
Randomization unit: Use the household rather than individual. Family members influence each other and may share pharmacy appointments, creating spillover. Household-level randomization contains this interference.
Eligibility criteria:
- Adults 18+ with active loyalty accounts in the target states
- Valid contact information for both channels on file
- Opted in to marketing communications for both SMS and email (required for legal compliance)
Exclusions:
- Already vaccinated this season prior to randomization
- Opted out of either communication channel
- Invalid or disconnected contact details
- Currently enrolled in other pharmacy campaigns
- Staff members
Stratification variables (use blocked randomization within strata):
- Age group: 18–49, 50–64, 65+
- State (CA, NY, TX)
- Vaccinated in prior season (yes/no)
- Pharmacy visit frequency in past year (low/medium/high terciles)
Metrics:
- Primary: Absolute percentage point difference in vaccination rate during the campaign window
- Guardrails: Opt-out rate, customer complaints, appointment no-show rate, pharmacy capacity utilization (wait times), message delivery failure rate
2. Sample Size and Power
Using the standard two-proportion formula with:
- Baseline rate p₁ = 0.08
- Target rate p₂ = 0.095 (1.5pp lift)
- α = 0.05 (two-sided), so z₀.₉₇₅ = 1.96
- Power = 0.80, so z₀.₈₀ = 0.84
The pooled proportion p̄ = 0.0875, and the formula gives:
n = [(1.96√(2 × 0.0875 × 0.9125) + 0.84√(0.08 × 0.92 + 0.095 × 0.905))² / (0.015)²]
Computing each component:
- 1.96 × √0.1597 ≈ 0.783
- 0.84 × √0.1596 ≈ 0.336
- (1.119)² / 0.000225 ≈ 5,570 per arm
Household clustering adjustment:
Design effect = 1 + (m̄ − 1) × ICC = 1 + (1.3 − 1) × 0.01 = 1.003
Adjusted sample: 5,570 × 1.003 ≈ 5,590 per arm, or roughly 4,300 households per arm.
For the full factorial: 4 arms × 5,590 = 22,360 people total. Each main effect compares ~11,200 vs ~11,200. The interaction term has roughly 4× the variance of a main effect, so you can only detect interactions around 3pp or larger.
Note: Even though clustering has minimal impact on sample size here, you must still use cluster-robust standard errors in your analysis.
3. Compliance and Causal Inference
Intention-to-treat (ITT): Compare outcomes based on random assignment, regardless of whether the message was actually delivered:
ITT = (vaccination rate in assigned treatment) − (vaccination rate in control)
This is the policy-relevant estimate because you pay to send to everyone you target.
Treatment-on-treated (TOT): Uses random assignment as an instrumental variable to estimate the effect among those who actually received the message.
TOT = ITT / compliance rate
Where compliance rate is the fraction who received the message in the treatment group (one-sided noncompliance—control never receives messages).
Examples:
- SMS with 92% delivery: If ITT = 1.5pp, then TOT = 1.5 / 0.92 ≈ 1.63pp among those who received the message
- Email with 98% delivery: TOT = 1.5 / 0.98 ≈ 1.53pp
Required assumptions:
- Independence: Assignment Z is randomized
- Exclusion restriction: Assignment affects vaccination only through message receipt (an undelivered message has no effect)
- Relevance: First stage is strong (compliance rate > 0)
- Monotonicity: No one does the opposite of their assignment
- SUTVA: No spillover between units (why we randomize by household)
The ITT remains the key decision metric since it reflects real-world effectiveness including delivery failures.
4. Attribution and Measurement
Data collection:
- Channel-specific tracking URLs and UTM parameters
- Unique appointment or promo codes per customer
- Timestamp data for message sends, deliveries, opens, and clicks
- Pharmacy transaction records linked by loyalty ID (captures walk-ins who never clicked)
Analysis approach:
Fit a regression model with treatment indicators:
Y = β₀ + β_SMS × SMS + β_Email × Email + β_Int × (SMS × Email) + controls + error
Use cluster-robust standard errors at the household level. Include stratification variables as controls.
Interpretation:
- β_SMS: SMS effect when email is off
- β_Email: Email effect when SMS is off
- β_Int: Interaction term (positive means complementary, negative means substitutes)
- Average main effect of SMS: ½[(SMS-only vs control) + (Both vs Email-only)]
For heterogeneous effects across segments, use hierarchical models with random slopes.
Why self-reports fail:
Click-through and survey data describe the mechanism but not causality:
- Selection bias: People who click are already more engaged
- Recall bias: Memory is unreliable
- Counterfactual problem: Someone who would have vaccinated anyway can truthfully say the message helped them decide
Causal inference requires comparing randomized groups, not asking individuals what influenced them. Use self-reports only for qualitative insights, never for effect size estimation.
5. Edge Case Analysis
Given data:
- Control rate: 7.5%
- SMS arm rate: 9.0%
- SMS arm size: ~1,111 people (100 vaccinations / 0.09)
- Self-reported attribution: 50 of 100
Causal estimate:
ITT lift = 9.0% − 7.5% = 1.5 percentage points (20% relative lift)
Expected vaccinations without treatment: 1,111 × 0.075 ≈ 83
Incremental vaccinations caused by SMS: 100 − 83 = 17 people
Yet 50 people (3× the true causal effect) credit the message. This is classic over-attribution—many would have vaccinated regardless.
Statistical precision:
SE ≈ √[(0.09 × 0.91 / 1111) + (0.075 × 0.925 / 1111)] ≈ 0.012
95% CI: 1.5 ± 1.96 × 1.2 ≈ [−0.9, 3.9] pp
A single market is underpowered. Pool across markets using hierarchical models to borrow strength.
Next tests if lift is insufficient:
- Message content: Test framing (e.g., "Your appointment is ready" vs. "Book now"), one-click booking links, pharmacist endorsements
- Timing: Test early vs. late season, day-of-week effects, multi-touch cadences
- Personalization: Test age-specific messaging, risk-factor targeting, past-behavior triggered sends
- Incentives: Small rewards, entry into drawings, free health screenings
6. Reporting Plan
During-experiment monitoring:
- Use sequential testing with appropriate alpha-spending functions (e.g., O'Brien-Fleming boundaries) if you need to stop early
- Monitor guardrail metrics weekly
- Check balance on covariates to detect randomization issues
- Track delivery rates and complaints in real-time
Final analysis:
- Compute ITT effects with 95% confidence intervals
- Use CUPED (Controlled-experiment Using Pre-Experiment Data) variance reduction if you have prior-season vaccination data—can reduce variance by 30-50%
- Report heterogeneous treatment effects by key segments
- Estimate cost per incremental vaccination: (channel cost) / (incremental vaccinations)
Recommendation framework:
Given a fixed budget B:
- If interaction is small and both channels are effective: allocate budget proportional to cost-effectiveness (lift per dollar)
- If strong positive interaction: prioritize the combined approach for high-value segments
- If one channel dominates: concentrate budget there
Example: If SMS delivers 1.5pp lift at $0.02 per contact and email delivers 1.2pp at $0.001, email is 1,200 / 0.001 = 1,200,000 per point while SMS is 1.5 / 0.02 = 75 per point—but this ignores reach. Model total incremental vaccinations under different allocation strategies.