Designing an Experiment to Test a Mobile Search Bar Relocation
Statistics & ExperimentsModel answerLast updated
Design a complete A/B test for relocating a search interface element in a mobile mapping application, including metrics, power analysis, and interpretation.
Scenario
A mobile navigation application is considering relocating its search input field from the upper portion of the screen to the lower portion. The rationale centers on improved thumb accessibility for users holding larger smartphones.
Your Task
Design a comprehensive experiment to evaluate whether this interface change achieves its intended goal. Your design should address:
- Hypothesis formulation: What are you testing and why?
- Metric selection: Which measurements capture success? What safeguards are needed?
- Experiment structure: How do you assign users? What is your randomization unit?
- Statistical planning: How many users do you need and for how long?
- Analysis approach: How will you decide whether to ship this change?
Be explicit about assumptions, potential pitfalls, and how you would handle confounding factors specific to user interface modifications.
Hints
Hint 1
Consider both immediate interaction metrics and longer-term behavioral patterns when selecting your primary outcome measure
Hint 2
User interface changes often trigger temporary effects as people adapt to new patterns—how will you distinguish transient reactions from sustained impact?
Hint 3
Think about what could go wrong: the change might make searching easier but accidentally interfere with other core functionality
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer: Experiment Design for Search Bar Relocation
A strong answer demonstrates end-to-end experimental thinking: connecting business goals to measurable outcomes, anticipating threats to validity, and providing clear decision criteria.
1. Clarifying Scope and Objectives
Before designing anything, establish boundaries:
Platform scope: Focus on mobile app experiences (iOS and Android smartphones). Exclude specialized contexts like automotive integrations or active turn-by-turn guidance where the interface differs fundamentally.
Core hypothesis: Relocating the search input to the bottom will reduce the physical effort required to initiate searches on large-screen devices, leading to more frequent and successful search interactions.
- Null hypothesis (H₀): Search bar position has no effect on meaningful search activity
- Alternative (H₁): Bottom placement increases meaningful search activity by improving ergonomic accessibility
Use a two-tailed test—the change could plausibly degrade the experience if it obscures map content or conflicts with existing bottom-sheet interactions.
2. Metric Framework
Primary metric (single focus): Completed search interactions per active user per day
Define a completed interaction as a search followed within 5 minutes by concrete action: requesting directions, initiating navigation, tapping through to business details, or saving a location. This composite definition prevents gaming—simply generating more query attempts doesn't constitute success if users abandon searches more often.
Supporting diagnostic metrics:
- Time elapsed from app launch to first query character entered (directly tests the accessibility hypothesis)
- Search initiation rate (proportion of sessions including at least one search)
- Query reformulation patterns (multiple attempts for the same destination suggest friction)
- Downstream conversion: navigation starts, business actions taken
Guardrail metrics (establish non-inferiority thresholds in advance):
- Retention: Day-1 and Day-7 return rates; sessions per user
- Core map usage: Panning, zooming, and layer-switching frequency (the relocated bar might obstruct these)
- Unintended activations: Search bar opened then immediately closed with no input (suggests accidental taps)
- Technical health: Application crashes, rendering delays
- Revenue proxies: Local business card views, sponsored result interactions
- Accessibility: Screen reader usage patterns and error rates
3. Randomization Strategy
Unit of randomization: Individual user (authenticated account identifier; device fingerprint for unauthenticated usage).
Session-level or request-level randomization would create jarring inconsistency. Users must experience one treatment consistently.
Assignment mechanism:
bucket = hash(user_id || experiment_seed) % 100
if bucket < 50: assign control
else: assign treatment
Use a fresh experiment seed to ensure independence from concurrent tests. Check balance across critical dimensions: operating system, country, screen diagonal measurement.
Intent-to-treat analysis: Include all users assigned to each arm from their first app launch during the experiment, regardless of whether they opened the app frequently enough to notice the change. This preserves randomization and avoids selection bias.
Infrastructure validation: Run an A/A test first (or verify recent A/A results) to confirm the data pipeline produces null results with the expected false-positive rate. Monitor for sample ratio mismatch—if assignment proportions deviate from 50/50, instrumentation is broken and results are untrustworthy.
4. Sample Size Determination
For a continuous metric (searches per user), required sample size per arm:
$$n = \frac{2(z_{\alpha/2} + z_\beta)^2\sigma^2}{\delta^2}$$
Working assumptions (verify against historical logs):
- Baseline: 2.5 searches per active user daily, standard deviation 3.5 (right-skewed distribution)
- Minimum detectable effect: 2% relative change (δ = 0.05 absolute)
- Significance level α = 0.05 (two-sided), power 1-β = 0.80
Calculation: $(1.96 + 0.84)^2 = 7.84$
$$n = \frac{2 \times 7.84 \times 12.25}{0.0025} \approx 77,000 \text{ users per arm}$$
Variance reduction techniques:
- CUPED (Controlled-experiment Using Pre-Experiment Data): Use each user's pre-experiment search rate as a covariate. This typically reduces variance by 40-60%, allowing detection of smaller effects or shorter runtime.
- Winsorization: Cap extreme values at the 99th percentile to limit influence of bots or outlier power users.
Guardrail powering: Retention metrics often require larger samples to detect small but meaningful degradations. If you need to detect a 0.3% drop in Day-7 retention with 80% power, calculate separately and use the maximum required sample.
Given typical traffic volumes (millions of daily actives), reaching 100K users per arm takes hours. Sample size is not the constraint—time-based confounds are.
5. Runtime and Temporal Effects
Interface relocations uniquely suffer from two opposing biases:
Change aversion: Existing users have internalized the current position through hundreds of repetitions. Initial performance may dip as motor memory retrains, then recover.
Novelty effect: Some users interact more simply because something changed, regardless of genuine utility improvement.
Mitigation strategy:
Run for 3-4 full weeks minimum:
- Captures weekly seasonality (weekday commuting vs. weekend exploration patterns)
- Allows sufficient adaptation time for frequent users
- Provides stable long-term effect estimates
Cohort analysis approach:
- Track the treatment effect by days since first exposure for each user
- Plot rolling 7-day averages to identify when the effect stabilizes
- Separately analyze newly acquired users who have no prior muscle memory—their behavior approximates the long-run steady state
- Compare tenured users' convergent behavior against new users' immediate behavior
Sequential testing discipline: Pre-register a single analysis date. If business pressure requires interim monitoring, use proper sequential methods (alpha spending functions or always-valid inference) to control false-positive risk. Never peek informally and stop early based on significance.
6. Decision Framework
Pre-flight validation checklist:
- Sample ratio mismatch test passes (χ² test on assignment counts)
- Logging consistency verified across both treatments
- A/A test confirms null distribution
- No systematic differences in baseline characteristics across arms
Interpretation rubric:
| Primary Outcome | Guardrails Status | Decision |
|---|---|---|
| Significant increase, stable over time | All non-inferior | Ship via staged rollout |
| Significant increase | Any guardrail breached | Halt. Redesign to address the failure mode |
| Null result | Non-inferior | Ship only if strategic rationale exists (e.g., accessibility compliance, platform consistency) |
| Initial negative, trending toward positive | Non-inferior | Extend test duration; emphasize new-user cohort analysis |
| Significant decrease | — | Do not ship |
Subgroup exploration (apply multiple-testing correction):
- Screen size bins: Effect should concentrate on large devices (>6 inches diagonal)
- User tenure: Compare 0-30 days vs. 30+ days since first app use
- Platform: iOS vs. Android (different interaction patterns)
- Market: Right-to-left language regions have different ergonomic patterns
If benefit appears only for large-screen users, consider a targeted launch. Treat all subgroup findings as hypotheses requiring confirmation in a follow-up experiment.
Practical significance: A statistically significant 0.5% improvement may not justify retraining billions of users and updating all support documentation. Weigh the confidence interval against implementation and transition costs.
Staged rollout post-decision: If shipping, ramp gradually: 5% → 20% → 50% → 100% over several weeks. Monitor the same guardrails at each stage with automated alerting for anomalies.
Common Mistakes to Avoid
- Metric gaming: Using raw search count instead of successful searches allows the metric to improve even if user experience degrades
- Selection bias: Analyzing only "engaged users" post-randomization breaks the experiment
- Peeking: Checking results daily and stopping when p < 0.05 inflates false positives dramatically
- Ignoring adaptation: Concluding after 3 days when change aversion is strongest
- Overfitting subgroups: Finding that the effect is significant for "Android users in France on Tuesdays" through post-hoc exploration