01 / 21

Comparing Treatments
With Randomized Experiments

Use data from a randomized experiment to compare two treatments, and run simulations to decide whether the difference is real or just chance.

Statistics & Probability

What Is a Randomized Experiment?

In a randomized experiment, researchers actively apply treatments to subjects and use random assignment to decide who gets which treatment.

Three Key Terms

Treatment
A condition imposed on subjects (e.g. a new drug vs. a placebo).
Random Assignment
Using chance to split subjects into groups, balancing other factors.
Response
The outcome we measure to compare the treatments.

The Experimental Design

Subjects Pool of people Random Assignment Treatment A measure response Treatment B measure response

Why It Matters

When Group A scores higher than Group B, we face a critical question: is the gap caused by the treatment, or could random chance alone produce a difference this large?

The Core Idea: No Difference?

We start by assuming the treatments have no real effect. This is the null hypothesis:

The Simulation Test

If treatment doesn't matter, then which group a subject landed in was arbitrary. So we re-shuffle the data many times and rebuild the difference each time.

Reading the Chance Distribution

0 (no difference) observed far in the tail Differences expected by chance

Experiment vs. Observational Study

Randomized Experiment Observational Study
AssignmentResearcher uses chanceSubjects self-select
TreatmentActively imposedOnly observed
ConclusionCause & effectAssociation only
ConfoundingBalanced by randomHard to rule out

How to Run the Test

1
Compute the observed difference between the two treatment groups.
2
Assume no effect \( (H_0) \): pool all responses together.
3
Re-shuffle and re-split the data into two groups at random, many times.
4
Record each simulated difference to build a chance distribution.
5
Compare: if the observed difference is rare, it is significant.

Example 1: Two Fertilizers

20 plants are randomly split. Fertilizer A plants average 32 cm; Fertilizer B plants average 28 cm. Observed difference:

Example 1: Simulation Result

We re-shuffled the 20 plant heights 1000 times. Only 15 of 1000 shuffles produced a difference of 4 cm or more.

Example 2: A Smaller Gap

A study compares two study methods. Method A recall: 74%; Method B recall: 70%. Observed difference is 4 percentage points.

Same Gap, Different Verdict

Both examples showed a "4-unit" difference, yet one was significant and one was not. Significance depends on how rare the gap is in the chance distribution, not just its size.

Common Mistakes

Bigger means significant
A larger raw difference is not automatically significant: check the chance distribution.
Causation without randomizing
Only random assignment justifies cause-and-effect claims.
Misreading the p-value
A small p-value means the gap is rare under chance, not that it's "100% real."

Summary: Decision Rule

Significant Not Significant
P-valuesmall (e.g. \( < 0.05 \))large (e.g. \( > 0.05 \))
Observed gapRare in chance dist.Common in chance dist.
ConclusionTreatment had effectDifference = chance
Position in tailFar outNear center

Question 1 of 5

What feature of a randomized experiment lets us make cause-and-effect conclusions?

Question 2 of 5

A simulation produces a p-value of \( 0.02 \) for an observed difference. What is the best conclusion?

Question 3 of 5

In a simulation test, why do we re-shuffle the combined data into new groups?

Question 4 of 5

Out of 1000 shuffles, 300 produced a difference at least as large as observed. The estimated p-value is:

Question 5 of 5

Two studies each show a 5-point difference, but one is significant and one is not. What best explains this?