Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Experimental Design

A useful experiment starts with a clear question, a measurable response, and a fair assignment of treatments. This page covers planning, experimental units, and the principles that protect a comparison.

Planning: QPDAC

QPDAC = Question → Plan → Data → Analysis → Conclusion. PPDAC uses Problem in place of Question.

StageWhat to decide
Question / ProblemState a specific question, a target population, and a measurable outcome.
PlanChoose the response, factors, units, treatment assignment, and sample size.
DataFollow the plan; record outcomes, assignment, and any departures from the protocol.
AnalysisEstimate treatment effects and quantify uncertainty using a model that respects the design.
ConclusionAnswer the original question in context, with effect size, uncertainty, and limitations.
  • A good question is clear, understandable to a general audience, and tied to a specific metric.

  • “Are our job posts good?” is vague. “Does a casual rather than formal tone increase the proportion of viewers who click?” names the comparison and response.

  • Most design decisions happen before data collection. A small pp-value cannot repair a confounded comparison.

Response, Factors & Experimental Units

TermMeaningExample: job-post experiment
ResponseOutcome recorded for each observational unit.Whether a viewer clicks; summarize as click-through rate.
Design factorVariable deliberately varied because its effect is of interest.Tone of the post.
LevelA particular setting of a factor.Formal or casual.
TreatmentA specific combination of design-factor levels.Casual tone + short format, if both tone and format vary.
Experimental unitSmallest entity independently assigned a treatment.Viewer, if assignment is by viewer.
Observational unitEntity on which a measurement is recorded.A viewing event; there may be several per viewer.
ReplicateAn additional independent experimental unit receiving a treatment.Another independently assigned viewer.

Four Factor Roles

RoleWhat we doWhy
Held constantKeep the variable at one level.Prevent it from explaining treatment differences.
Design factorDeliberately vary its levels.Estimate the effect of interest.
Nuisance factorAccount for a variable that affects the response but is not the focus.Reduce unwanted variation or confounding.
Allowed to varyLet it differ between units.Practical when it cannot be controlled; randomization helps protect the comparison.

The role depends on the question and assignment mechanism. Time of day can be held constant, used as a block, or studied as a design factor. “Nuisance” describes scientific relevance; “allowed to vary” describes handling, so an uncontrolled nuisance variable can fall into both descriptions.

Randomization, Replication & Blocking

PrincipleWhat it doesWhat it does not guarantee
RandomizationAssigns treatments by chance; prevents systematic assignment based on known or unknown unit characteristics.Exact balance in every realized sample.
ReplicationApplies treatments to multiple independent units; estimates error and improves precision.Removal of bias from a flawed assignment process.
BlockingGroups similar units and randomizes treatments within groups; allows within-block comparisons.Removal of every source of variation.

Random assignment supports causal comparisons within the study. Random sampling supports generalization to a target population. They solve different problems.

Confounding: treatment differences cannot be separated from another variable. If all formal posts run in the morning and all casual posts run at night, tone is confounded with time.

Replication vs. Repeated Measurement

Suppose two batches receive different recipes, and 20 cookies are measured per batch.

  • The batches receive treatments, so there is only one experimental unit per recipe.

  • The 20 cookies are subsamples; they do not create 20 independent recipe assignments.

  • Replicating the recipe comparison requires additional independently assigned batches.

Repeated measurement can improve measurement precision, but it does not create independent treatment replication.