Designing a controlled experiment comes down to changing one thing, keeping everything else the same, and measuring what happens. That core logic sounds simple, but the details at each step determine whether your results mean anything. Here’s how to build a controlled experiment from the ground up, whether you’re working on a school science project or a professional research study.
Start With a Testable Question
Every experiment begins with a question specific enough to test. “Does temperature affect how fast bread molds?” is testable. “Why does nature work the way it does?” is not. The difference is that a testable question points directly to something you can manipulate, measure, and compare.
Once you have the question, turn it into two formal statements called hypotheses. The null hypothesis predicts no effect: “Temperature does not affect the rate of bread mold growth.” The alternative hypothesis predicts an effect: “Temperature does affect the rate of bread mold growth.” Your experiment is essentially an attempt to disprove the null hypothesis. If your data show a clear enough pattern, you reject it in favor of the alternative. If not, you fail to reject it. Framing things this way keeps you honest, because you’re looking for evidence strong enough to rule out “nothing happened” rather than cherry-picking results that confirm what you expected.
Identify Your Variables
Three types of variables form the backbone of any controlled experiment:
- Independent variable: the single factor you deliberately change. In an experiment on vehicle exhaust and childhood asthma, the concentration of exhaust is the independent variable.
- Dependent variable: the outcome you measure. In that same example, asthma incidence is the dependent variable.
- Controlled variables: everything else you hold constant so it can’t influence the outcome. Room temperature, time of day, equipment used, duration of exposure. If any of these shift between groups without you realizing it, your results become uninterpretable.
A useful exercise before you start is to list every factor that could possibly influence your dependent variable, then decide which one you’ll manipulate (independent) and which ones you’ll lock down (controlled). Anything left uncontrolled becomes a potential confounder.
Deal With Confounding Variables
A confounding variable is a hidden factor that’s connected to both your independent and dependent variables, making it look like one caused the other when a third thing is actually responsible. The classic example: ice cream sales and home break-ins both rise in summer. The confounding variable is outdoor temperature. Warmer weather drives both, but ice cream doesn’t cause crime.
Confounders are the single biggest threat to a controlled experiment’s validity. Common ones include age, sex, socioeconomic background, time of day, seasonal effects, and prior health conditions. In the vehicle exhaust and asthma study, exposure to cigarette smoke or factory pollution would be confounders, because they also affect respiratory health and could co-occur with high exhaust exposure.
You can handle confounders in a few ways. The most powerful is randomization, which we’ll cover next. You can also use matching, where you pair participants across groups who share the same confounder (same age, same smoking status) so it cancels out. Or you can control for confounders statistically after the fact, though this is less reliable than designing them out from the start.
Set Up Your Control Groups
The control group is the baseline you compare your experimental group against. Without it, you have no way to know whether your independent variable actually did anything or whether the outcome would have happened regardless.
There are two types worth understanding:
- Negative control: receives no treatment at all. It establishes what happens under normal conditions. If you’re testing whether lettuce carries bacteria, a negative control would involve wiping a sterile swab on a growth plate. No bacteria should grow. If some does, your equipment is contaminated and your results can’t be trusted.
- Positive control: receives a treatment that’s already known to work. It confirms your measurement setup is actually capable of detecting an effect. In the lettuce example, you’d swab a known bacterial colony onto a growth plate. If nothing grows, something in your setup is preventing detection, and your experiment is broken even if you don’t realize it.
Many experiments use both. The negative control proves your baseline is clean. The positive control proves your method can pick up real results. Together, they bracket your experimental group and make your findings far more convincing.
Randomize Your Assignments
Randomization is what separates a true controlled experiment from an observational study. When you randomly assign subjects to the experimental or control group, you spread both known and unknown confounders roughly evenly across groups. This is critical because you can’t control for confounders you haven’t thought of, but randomization handles them for you by distributing them by chance.
The simplest method is a coin flip or a random number generator: each subject gets assigned to a group with equal probability. This works well for large samples, but with smaller ones (under 100 or so), you can end up with unbalanced groups by sheer luck.
Block randomization solves this by assigning subjects in small balanced chunks. You choose a block size that’s a multiple of your number of groups. With two groups and a block size of four, each block contains exactly two assignments to each group, in random order. This guarantees your groups stay roughly equal in size throughout the experiment.
Stratified randomization goes further by first sorting subjects into subgroups based on important characteristics like age or disease severity, then randomizing within each subgroup. This ensures that key baseline traits are balanced across your experimental and control groups, not just overall numbers.
Use Blinding to Reduce Bias
Blinding prevents expectations from skewing results. If a participant knows they’re getting the real treatment, they might report feeling better simply because they expect to. If a researcher knows which group a subject belongs to, they might unconsciously score outcomes more favorably.
In a single-blind design, the participants don’t know which group they’re in, but the researchers do. In a double-blind design, neither the participants nor the investigators know who’s receiving the treatment. Triple-blind goes one step further and also keeps the data analysts in the dark until after the analysis is complete.
Blinding isn’t always possible. You can’t blind someone to whether they’re exercising or sitting still. But whenever you can blind, you should. Even subtle cues, like a researcher’s tone of voice or a slightly different-looking pill, can introduce bias that undermines months of careful work.
Choose Your Sample Size
Running your experiment with too few subjects is one of the most common mistakes in research. Small samples produce noisy data, which makes it easy to miss a real effect or to find a false one. The standard target for statistical power is 80%, meaning your experiment has an 80% chance of detecting a real effect if one exists.
Figuring out the right sample size requires three inputs: how large an effect you expect to see, how much natural variability exists in your measurements, and what error rates you’re willing to accept. A smaller expected effect means you need more subjects to detect it. More variability in your data also pushes the required sample size up. Researchers typically set the acceptable false positive rate at 5% and target 80% to 90% power, then calculate sample size from there using formulas or software specific to their statistical test.
If you can’t estimate the expected effect size from prior research, running a small pilot study first gives you the preliminary numbers you need. Skipping this step and guessing often leads to underpowered experiments that waste time and resources.
Run the Experiment and Collect Data
Before you start collecting real data, write out your full protocol: what you’ll do, in what order, with what equipment, and how you’ll record measurements. This serves two purposes. First, it forces you to catch logistical problems before they corrupt your data. Second, it allows someone else to replicate your experiment exactly, which is the foundation of scientific credibility.
During execution, consistency matters more than almost anything else. Measure at the same time of day. Use the same instruments. Follow the same steps in the same order for every subject or sample. Any deviation between how you treat the experimental group and the control group, other than the independent variable itself, introduces a potential confound. Keep a detailed log of anything unexpected that happens: equipment malfunctions, unusual environmental conditions, subjects who drop out. You’ll need this information when interpreting your results.
Analyze and Interpret Results
Once you have your data, check it against your experimental assumptions before running any statistical tests. Are the values in a plausible range? Are there obvious outliers that suggest a measurement error? Is the data distributed the way your chosen test requires?
A p-value below 0.05 has traditionally been the threshold for calling a result “statistically significant,” meaning there’s less than a 5% chance your data would look this way if the null hypothesis were true. But this threshold is increasingly recognized as insufficient on its own. A small p-value doesn’t necessarily mean the effect is large or practically important, and a non-significant p-value doesn’t mean there’s no effect at all. Some researchers have argued for lowering the threshold to 0.005 or 0.01 to reduce false positives.
The stronger approach is to report your effect size (how big the difference actually is) alongside a confidence interval (the range of plausible values for the true effect). This gives your reader two things a p-value alone can’t: a sense of magnitude and a sense of precision. An experiment that finds a 12% improvement with a 95% confidence interval of 8% to 16% tells a much clearer story than one that simply reports “p = 0.03.”
Ethics in Experiments With People
If your experiment involves human participants, ethical oversight isn’t optional. The core principles, established in the Belmont Report, boil down to three requirements. First, respect for persons: participants must give informed consent, meaning they understand what the study involves, what the risks are, and that they can withdraw at any time without penalty. Consent must be voluntary, not coerced. Second, beneficence: the experiment must be designed to minimize harm and maximize potential benefit. Risks should be reduced to only those necessary to achieve the research objective, and if the study can be done without human subjects, it should be. Third, justice: the burdens and benefits of research should be distributed fairly, not concentrated on vulnerable populations.
Any institution receiving federal funding requires experiments with human subjects to be reviewed and approved by an ethics review board before data collection begins. Even if your work doesn’t fall under that umbrella, following these principles protects both your participants and the integrity of your findings.