Module 05

Experimental Design

Designing studies that can establish causation

Principles of Good Design

  • 01

    Randomization

    Random assignment eliminates confounding

  • 02

    Control

    Comparison group to isolate treatment effect

  • 03

    Replication

    Multiple observations for reliable estimates

  • 04

    Blocking

    Control known sources of variation

01

Establishing Causation

Correlation vs. Causation

🍦
Ice Cream Sales
↔
🏊
Drowning Deaths
r = 0.85 (Strong correlation!)
Confound: Both are caused by summer weather! More ice cream doesn't cause drownings.

Observational data can show correlation but not causation. Confounding variables (like weather) can create spurious associations. Only experiments with random assignment can establish causal relationships.

Random Assignment

Random Assignment to Groups
Tx
Treatment
n = 50
🎲
Random
Ctrl
Control
n = 50
Key insight: Random assignment balances ALL confounds (known AND unknown) between groups on average.

Random assignment is the gold standard for establishing causation. By randomly assigning participants to treatment or control, all potential confounders are balanced between groups, leaving only the treatment as the systematic difference.

Internal vs. External Validity

Internal Validity
Can we conclude the treatment caused the effect?
Threats: confounds, selection bias, attrition, history effects
External Validity
Can we generalize to other populations/settings?
Threats: non-representative sample, artificial lab settings
Often a trade-off: tightly controlled experiments have high internal but lower external validity

Internal validity asks whether we can trust the causal conclusion. External validity asks whether results generalize beyond the study. Lab experiments often sacrifice external validity for internal validity; field experiments try to balance both.

02

Basic Experimental Designs

Between-Subjects Design

Different People in Each Condition
Treatment Group
👤👤👤
Participants A, B, C
Control Group
👤👤👤
Participants D, E, F
+ No carryover effects
- Needs more participants

In between-subjects designs, different participants are in each condition. This avoids carryover effects but requires more participants and introduces individual differences as noise. Random assignment helps control individual differences.

Within-Subjects Design

Same People in All Conditions
👤
Person A
→
Condition 1
→
Condition 2
→
Condition 3
+ More power (controls individual diffs)
- Carryover, practice, fatigue effects

Within-subjects (repeated measures) designs have each person experience all conditions. This controls individual differences and requires fewer participants, but introduces order effects that must be counterbalanced.

Factorial Designs

2×2 Factorial Design
Drug A: NoDrug A: Yes
Drug B: NoPlacebo
(n=25)
Drug A only
(n=25)
Drug B: YesDrug B only
(n=25)
Both drugs
(n=25)
Tests: Main effect of A, Main effect of B, A×B interaction

Factorial designs cross multiple factors, allowing you to study main effects and interactions efficiently. A 2×2 design tests two factors simultaneously, revealing whether they interact (combined effect differs from sum of individual effects).

03

Randomization Methods

Simple Randomization

Flip a Coin for Each Participant
T
T
C
T
T
C
T
C
Ended up: 5 Treatment, 3 Control (unbalanced!)
Problem: Small samples may end up unbalanced by chance.

Simple randomization independently assigns each participant with equal probability (like coin flips). It's truly random but can create unequal group sizes in small studies. Best for large samples where imbalance averages out.

Block Randomization

Randomize in Blocks of 4
Block 1:
TCCT
2T, 2C ✓
Block 2:
CTTC
2T, 2C ✓
Benefit: Guarantees balance at end of each block. Groups always within 2 of equal.

Block randomization divides participants into blocks, with each block containing equal numbers assigned to each condition. This ensures groups stay balanced throughout the study. Common block sizes are 4, 6, or 8.

Stratified Randomization

Balance by Important Strata
Stratum: Males
Treatment
n=15
Control
n=15
Stratum: Females
Treatment
n=20
Control
n=20
Randomize separately within each stratum to ensure balance on key variables

Stratified randomization first divides participants into strata (e.g., by gender, severity) then randomizes within each stratum. This ensures important prognostic factors are balanced, increasing precision and allowing subgroup analyses.

04

Control Conditions

Types of Control Groups

No Treatment Control
Receives nothing. Simple but can't rule out placebo effects or attention.
Waitlist Control
Will receive treatment later. Ethical for beneficial treatments.
Placebo Control
Inert treatment (sugar pill, sham procedure). Controls for expectancy effects.
Active Control
Alternative treatment. Tests if new treatment is BETTER than existing options.

Different control conditions answer different questions. Placebo controls test if effects are real vs. expectancy-based. Active controls test superiority over existing treatments. The choice depends on your research question and ethics.

Single, Double, Triple Blind

TypeParticipantExperimenterAnalyst
Open Label👁️ Knows👁️ Knows👁️ Knows
Single Blind🙈 Blind👁️ Knows👁️ Knows
Double Blind🙈 Blind🙈 Blind👁️ Knows
Triple Blind🙈 Blind🙈 Blind🙈 Blind
More blinding = less bias from expectations and differential treatment

Blinding prevents bias from expectations. Double-blind (neither participant nor experimenter knows assignment) is the gold standard for drug trials. Triple-blind extends to analysts. Some interventions (e.g., surgery vs. medication) are hard to blind.

The Placebo Effect

Pain Study: Drug vs Placebo vs Nothing
No Treatment
10% improve
Placebo
30% improve
Real Drug
60% improve
True drug effect: 60% - 30% = 30% (compared to placebo, not nothing)

Placebo effects are real improvements from expecting treatment to work. Without a placebo control, you can't distinguish real drug effects from expectancy effects. The true treatment effect is improvement beyond placebo.

05

Advanced Designs

Crossover Design

AB/BA Crossover Design
Group 1
Drug
→
Washout
→
Placebo
Group 2
Placebo
→
Washout
→
Drug
Each person serves as their own control. Washout period prevents carryover.

Crossover designs have each participant receive both treatments in different orders, with washout periods between. Participants serve as their own controls, dramatically reducing variance. Best for chronic conditions with stable baselines.

Cluster Randomized Trial

Randomize Groups, Not Individuals
Treatment Schools
🏫🏫🏫
All students get intervention
Control Schools
🏫🏫🏫
Business as usual
Key issue: Students within schools are not independent → need more clusters, use ICC in analysis

Cluster randomized trials randomize groups (schools, clinics, villages) rather than individuals. Necessary when individual randomization is impractical or when interventions operate at group level. Requires accounting for clustering in analysis.

Adaptive Designs

Modify Design Based on Interim Results
Response-Adaptive Randomization
Assign more participants to better-performing arm
Sample Size Re-estimation
Increase n if effect is smaller than expected
Arm Dropping
Stop futile arms early, focus on promising ones
Seamless Phase II/III
Combine dose-finding and confirmatory in one trial

Adaptive designs allow pre-planned modifications based on interim data - adjusting sample size, dropping arms, or changing allocation ratios. They're more efficient and ethical but require careful statistical handling.

★

Real-World Examples

Apply your knowledge to practical scenarios

01

Phase III Clinical Trial

A pharmaceutical company tests a new antidepressant. Design: 300 patients, 2:1 randomization (drug:placebo), double-blind, stratified by severity (mild/moderate/severe) and site (10 hospitals), 8-week treatment with assessments at weeks 0, 2, 4, 8.

Sample Data
{
  "design": "Parallel group RCT",
  "randomization": "Stratified block randomization",
  "blinding": "Double-blind",
  "n_treatment": 200,
  "n_control": 100,
  "primary_outcome": "Hamilton Depression Score change at week 8"
}
Q Why use 2:1 rather than 1:1 randomization? +
A 2:1 allocation gives more patients the potentially beneficial drug (ethical) while still maintaining adequate control group size. Statistical efficiency is maximally at 1:1, but 2:1 loses little power while improving patient recruitment and ethics.
Q Why stratify by severity AND site? +
A Stratification ensures balance on important prognostic factors. Severity strongly predicts outcome. Sites may differ in patient populations and assessment practices. Stratifying prevents unlucky imbalances that could confound results.
Key Insights
  • Randomization method depends on sample size and key prognostic factors
  • Double-blinding is essential for subjective outcomes like depression
  • Multi-site trials need to account for site differences
02

School-Based Nutrition Program

Researchers test a nutrition education program in elementary schools. They randomize 40 schools (not individual students) to intervention or control. They'll measure BMI changes in 3rd graders over one school year.

Sample Data
{
  "design": "Cluster RCT",
  "unit_of_randomization": "School",
  "n_clusters": 40,
  "n_students_per_school": "~50",
  "total_students": "~2000",
  "icc_estimate": 0.05
}
Q Why randomize schools instead of students? +
A The intervention (cafeteria changes, classroom lessons) operates at school level - you can't give it to some students but not others in the same school. Also, students interact, so treating some might affect untreated classmates (contamination).
Q How does clustering affect sample size calculations? +
A Students within schools are correlated (ICC ≈ 0.05). The effective sample size is much smaller than 2000 students. With ICC = 0.05 and 50 students/school, design effect ≈ 3.5, so effective n ≈ 570. Need more clusters, not more students per cluster.
Key Insights
  • Cluster RCTs are necessary when interventions target groups
  • ICC (intraclass correlation) inflates required sample size
  • More clusters is better than more participants per cluster
03

Website A/B Test

An e-commerce site tests a new checkout design. They randomly show 50% of visitors the old design (control) and 50% the new design (treatment). Primary metric: conversion rate. Secondary: average order value, cart abandonment.

Sample Data
{
  "design": "Online randomized experiment",
  "randomization": "Simple (by visitor cookie)",
  "sample_size": "~100,000 visitors over 2 weeks",
  "primary_metric": "Conversion rate",
  "current_conversion": "3.0%",
  "minimum_detectable_effect": "0.3% absolute increase"
}
Q What threats to validity exist in online experiments? +
A Network effects (users talk to each other), novelty effects (new design seems better just because it's new), multiple testing (looking at many metrics), segment selection (different effects for mobile vs desktop), and time effects (weekday vs weekend traffic differs).
Q Why might conversion rate alone be misleading? +
A The new design might increase conversions but decrease order value (people buy cheaper items). Or it might attract different customer segments. Look at revenue per visitor, not just conversion rate, and check for heterogeneous effects.
Key Insights
  • Online experiments allow massive sample sizes quickly
  • Consider multiple metrics and heterogeneous effects
  • Pre-register analysis plan to avoid p-hacking with multiple metrics
?

Experimental Design Quiz

Test your understanding • Passing score: 70%

0 of 10 answered
Q1 multiple-choice

What is the PRIMARY purpose of random assignment in experiments?

Explanation: Random assignment balances all confounding variables (known and unknown) between groups on average, allowing us to attribute differences to the treatment. It's about internal validity, not representativeness.
Q2 multiple-choice

A study where the same participants experience all conditions is called:

Explanation: Within-subjects (or repeated measures) designs have each participant experience all conditions. This controls for individual differences but requires counterbalancing to control order effects.
Q3 multiple-choice

In a double-blind experiment:

Explanation: Double-blind means neither participants nor the people administering/measuring know which condition each participant is in. This prevents bias from expectations on both sides.
Q4 multiple-choice

Block randomization is preferred over simple randomization when:

Explanation: Block randomization ensures groups stay balanced throughout recruitment by randomizing within blocks of fixed size (e.g., 4 or 6). It's especially important for small studies where simple randomization might create imbalanced groups by chance.
Q5 multiple-choice

A placebo control group is important because it:

Explanation: Placebo controls account for expectancy effects - improvements due to believing you're receiving treatment. Without placebo, you can't distinguish real drug effects from the psychological effect of receiving any treatment.
Q6 multiple-choice

In a 2×3 factorial design, how many conditions are there?

Explanation: A factorial design crosses all levels of factors. 2×3 means one factor with 2 levels and another with 3 levels = 2×3 = 6 conditions total. This allows testing main effects and the interaction.
Q7 multiple-choice

Internal validity refers to:

Explanation: Internal validity is about establishing causation - can we confidently say the treatment (not confounds) caused the observed effect? External validity is about generalization.
Q8 multiple-choice

Cluster randomized trials are necessary when:

Explanation: Cluster trials randomize groups (schools, villages, clinics) rather than individuals. This is necessary when interventions operate at the group level or when individual randomization would cause contamination.
Q9 multiple-choice

A crossover design is MOST appropriate when:

Explanation: Crossover designs (where each participant receives all treatments in sequence) are ideal for chronic, stable conditions where effects wash out between periods. They can't be used if treatments have permanent effects.
Q10 multiple-choice

Stratified randomization is used to:

Explanation: Stratified randomization ensures key prognostic variables (like disease severity, age group) are balanced between treatment groups. This increases precision and allows subgroup analyses.

Quiz Results

0 %

← Distributions Next: Confidence Intervals →