Sub topic 8
Time zones, day of week, and other confounders
This chapter assumes you can already write a one-variable hypothesis, assign recipients at random, and read a click rate. Here we look at what can make a send-time test lie to you even when the arithmetic is correct.
What a confounder is
A confounder is a factor that changes the result and is tangled up with the variant you are testing. If it differs between your groups, you cannot tell whether the variant or the confounder caused the difference.
Random assignment protects you from most confounders, because chance spreads them evenly across variants. That protection breaks when the variant itself is defined by something that also changes the audience or the calendar. Send-time tests are the classic case.
Common confounders in send-time tests
| Confounder | How it misleads you |
|---|---|
| Time zone | "9:00 sender time" is morning for some recipients and midnight for others. |
| Day of week | Variant A goes out Tuesday and variant B goes out Saturday. |
| List segment | Variant B goes to your newest subscribers, who engage more. |
| Competing sends | Another campaign or a holiday lands on one variant's send window. |
| Deliverability | One batch goes out later and meets different inbox filtering. |
Design the test to remove the confounder
The fix is to make the groups identical in everything except the send time.
- Randomize first. Split the recipients into groups, then give each group a time. Never pick the audience by time.
- Send on the same day. Both variants go out the same date, so the day of week and any news events are shared.
- Decide what "time" means. If you test "9:00 versus 18:00 recipient local time", schedule each recipient's message by their own time zone.
- Stratify when the list is uneven. Randomize within each time zone or segment, so each stratum is split evenly.
Randomizing within strata
Hashing the user ID with the experiment name, as in the randomization chapter, gives a stable assignment. Applying it inside each time zone and then counting the result shows whether the groups are balanced.
import hashlib
from collections import Counter
def assign_variant(user_id, experiment, variants=("A", "B")):
key = f"{experiment}:{user_id}".encode("utf-8")
digest = hashlib.sha256(key).hexdigest()
return variants[int(digest, 16) % len(variants)]
recipients = [
(f"user-{i}", "Europe/London" if i % 3 else "America/New_York")
for i in range(3000)
]
counts = Counter()
for user_id, zone in recipients:
counts[(zone, assign_variant(user_id, "send-time-2026-11"))] += 1
for (zone, variant), n in sorted(counts.items()):
print(zone, variant, n)Each time zone should show close to equal counts for A and B. A large gap in any zone means the assignment is skewed and you should fix it before sending. Variant A would then be sent at 09:00 in each recipient's local time and variant B at 18:00.
Other checks before you trust a result
- Compare the variants on facts you already know, such as signup date and past engagement. They should look alike.
- Check that nothing else changed between the two sends: content, sender name, and list hygiene.
- Run the test over a full week or more if you can. A single day may be unusual, and a single result says little about other days.
- Do not assume the winner generalizes. A time that wins on Tuesday for a newsletter may not win for a promotion on Friday.
Exercise
A marketer sends variant A to subscribers in Europe on Tuesday at 09:00 and variant B to subscribers in North America on Wednesday at 09:00. Variant B has the higher click rate. Name two confounders and one change that fixes the design.
Show answer
The confounders are region (a different audience, with its own time zone) and day of week (Tuesday versus Wednesday). To fix the design, randomize the whole list into A and B within each region, send both variants on the same day, and schedule each variant at its own local time.