10. Two Samples#
This chapter compares two groups. You will use A/B testing, randomized experiments, and causal reasoning to decide whether an observed difference is meaningful, working through three business cases: a checkout A/B test, weekend and weekday shoppers who choose when to visit, and a randomized retention-call trial.
A/B Test: A randomized comparison of two versions, such as two checkout pages, using an outcome like purchase rate.
Permutation Test: Shuffling group labels many times shows how large a difference chance alone could produce.
P-Value: The chance, under the null model, of a difference at least as extreme as the one observed.
Randomized Controlled Trial: Assigning units to treatment and control groups at random lets a difference in outcomes support a causal claim.
Chapter Video
Video credit: CrashCourse. (2018, August 15). T-Tests: A Matched Pair Made in Heaven: Crash Course Statistics #27. YouTube. Watch on YouTube (11:16).
This embedded video is provided for educational reference only. All rights are retained by the respective copyright holder.
The video introduces t-tests. This chapter develops a simulation-based permutation approach; focus on the shared question of how to interpret a difference between groups.
Learning Objectives
By the end of this chapter, you will be able to:
Frame two-sample questions in terms of groups, outcomes, and differences.
Distinguish random sampling from random assignment and use permutations to simulate a null comparison.
Run and interpret A/B tests for management and product decisions.
Explain how experimental design supports causal claims.
Separate association, causation, statistical evidence, and practical impact.
Chapter Flow
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
Two-sample comparison |
An analysis that compares outcomes from two groups. |
2 |
A/B test |
A randomized comparison of two conditions or versions. |
3 |
Treatment group |
The group receiving the intervention or new condition. |
4 |
Control group |
The comparison group receiving the baseline condition. |
5 |
Outcome |
The measured result used to compare groups. |
6 |
Difference in means |
The mean of one group minus the mean of another. |
7 |
Difference in proportions |
The proportion of one group minus the proportion of another. |
8 |
Random sampling |
Selecting observations from a population by chance. |
9 |
Random assignment |
Assigning units to conditions by chance. |
10 |
Permutation |
A rearrangement used to simulate group labels under a null model. |
11 |
Null model |
A stated reference model describing how group differences could arise through a specified chance mechanism. |
12 |
Test statistic |
A summary used to measure the group difference. |
13 |
P-value |
The probability, under the null model, of a statistic at least as extreme as observed. |
14 |
Causality |
A claim that changing one factor changes an outcome. |
15 |
Confounding |
Mixing of effects that makes causal interpretation difficult. |
16 |
Blinding |
Hiding treatment status to reduce bias. |
17 |
Placebo |
An inactive treatment used as a comparison. |
18 |
Sample size |
The number of observations in a study or group. |
19 |
Effect size |
The magnitude of a difference in practical units. |
20 |
Statistical power |
The chance that a specified test detects an effect of a specified size under a given study design. |
21 |
Business experiment |
A structured test used to support a management decision. |
22 |
Percentage point |
The unit for a difference between two percentages: 10% minus 8% is 2 percentage points. |
23 |
Relative lift |
A difference divided by the baseline rate: (10% - 8%) / 8% = 25%. |
24 |
Revenue per visitor |
Total revenue divided by all visitors, combining conversion rate and order value. |
25 |
Observational study |
A study in which the groups were formed by choice or circumstance, not by random assignment. |
26 |
Association |
A pattern in which two variables tend to move together, without implying that one causes the other. |
27 |
Confounder |
A variable related to both group membership and the outcome, whose effect is mixed into the comparison. |
28 |
Potential outcomes |
The outcomes a unit would have under each condition; only one of them is observed. |
29 |
Sharp null hypothesis |
The claim that the treatment has no effect on any unit’s outcome. |
30 |
Meta-analysis |
Combining the results of several comparable studies to reach a more precise conclusion. |
31 |
Conversion rate |
The share of visitors who complete a purchase or other target action. |
32 |
Opt-in comparison |
A comparison between people who chose a feature or program and people who did not. |
33 |
Average treatment effect |
The average, across units, of the difference between their outcomes with and without the treatment. |
34 |
Re-randomization |
Repeating the random assignment on the same units to see what the statistic would be under the null. |
35 |
Randomization distribution |
The distribution of a statistic across many re-randomizations under the null. |
36 |
Interference |
A situation in which one unit’s treatment changes another unit’s outcome. |