Sub topic 2
Splitting Results by Segment
Assume you can read campaign reports, calculate percentages, and understand a basic funnel. A segment is a subgroup of users, such as device type, region, audience, or traffic source. Compare segments only after confirming that they use the same attribution rules and date range.
Compare Segments Carefully
Start with the same core metrics for each segment. Include both rates and counts so that a high percentage does not hide a tiny sample.
| Segment | Clicks | Conversions | Conversion rate |
|---|---|---|---|
| Mobile | 2,000 | 60 | 3.0% |
| Desktop | 1,000 | 50 | 5.0% |
This report suggests that desktop traffic converts better. Check whether the difference is large enough to guide action, rather than assuming it is meaningful.
Is the Difference Real?
A significance test estimates how likely it is that random variation produced the observed difference. For two conversion rates, a two-proportion z-test is a basic option. It returns a z-score and a p-value. A small p-value means the difference would be less likely under the assumption that both groups perform equally.
from math import sqrt, erf
def two_proportion_z(conv_a, n_a, conv_b, n_b):
p_a, p_b = conv_a / n_a, conv_b / n_b
pooled = (conv_a + conv_b) / (n_a + n_b)
se = sqrt(pooled * (1 - pooled) * (1 / n_a + 1 / n_b))
z = (p_b - p_a) / se
p = 2 * (1 - 0.5 * (1 + erf(abs(z) / sqrt(2))))
return z, p
print(two_proportion_z(100, 2500, 130, 2500))Treat significance as evidence, not a decision by itself. Also consider the difference's size, business value, and data quality.
Pitfalls and Funnel Diagnosis
Small samples produce unstable rates. Do not promote a segment because of a few conversions. Cherry-picking means selecting only favorable segments or dates. Averages can also hide a major difference between regions, devices, or audiences.
Trace the funnel from impression to click to conversion. Find the stage with the largest proportional loss and enough volume to matter.
Turn Findings into Hypotheses
A useful hypothesis names the segment, problem, change, and expected outcome:
“Because mobile users abandon the long form more often, shortening the mobile form will increase mobile conversion rate without increasing invalid leads.”
Exercise
A segment has a 20% conversion rate from five conversions. Should you scale it immediately?
Show answer
No. The sample is too small. Collect more data and compare the result with a predefined rule.