Quick answer
A controlled experiment changes one factor (the independent variable), holds other relevant factors constant, and compares the outcome (the dependent variable) with a control group measured at the same time, ideally formed by random assignment, so the difference can be credited to the change.
What is a controlled experiment?
A controlled experiment is a study in which the researcher deliberately changes one factor, keeps every other relevant factor the same, and compares the result against a control group that did not get the change. Because the groups differ only in that one factor, a difference in the outcome can be attributed to it. That is what separates a controlled experiment from simply observing what happened.
A controlled experiment is one that has four parts:
- One deliberate change: the independent variable, set by the experimenter.
- A measured outcome: the dependent variable, defined before the study starts.
- Controlled variables: everything else that could affect the outcome, held constant or balanced across groups.
- A comparison group measured at the same time: the control group, ideally formed by random assignment.
The US Food and Drug Administration's rule for "adequate and well-controlled" drug studies (21 CFR 314.126) states the same idea in regulatory language: the design must permit "a valid comparison with a control", and assignment to groups "ordinarily" happens by randomization so that bias is minimized. On websites, the same design is called an A/B test or online controlled experiment; Kohavi and colleagues' 2009 survey describes it as the way to establish a causal relationship between a change and the metrics it affects.
Independent, dependent and controlled variables
Every controlled experiment can be written as three rows. The same structure works in a lab and on a pricing page:
| Variable type | Role | Science example (plant growth) | Website example (checkout) |
|---|---|---|---|
| Independent variable | The one thing you change on purpose | Amount of fertilizer: none vs 10 g per week | Checkout layout: current two-page vs new one-page |
| Dependent variable | The outcome you measure | Plant height after 6 weeks, in cm | Share of sessions that reach the order confirmation |
| Controlled variables | Everything else held the same | Same seed batch, soil, pot size, light, water, temperature | Same dates, same traffic sources, same prices and shipping fees, same devices mix |
If a controlled variable changes for one group but not the other (one tray of plants by the window; a discount email sent only while the new checkout is live), it becomes a confounding variable and the comparison no longer isolates the change.
Control group and random assignment
The control group is the baseline: same conditions, without the change. 21 CFR 314.126 lists five kinds of control, and each has a website counterpart:
| Control type (21 CFR 314.126) | What it means | Website equivalent |
|---|---|---|
| Placebo concurrent control | Identical-looking treatment with no active ingredient | A/A arm: same page served through the test system |
| Dose-comparison concurrent control | Several levels of the same treatment | Discount of 5%, 10% and 15% |
| No-treatment concurrent control | Group gets nothing | Holdout group that never sees the new feature |
| Active-treatment concurrent control | Compared with an existing effective treatment | New page vs current page (the usual A/B test) |
| Historical control | Compared with past patients or data | Before/after comparison: this month vs last month |
The first four are concurrent: both groups are measured in the same period. The fifth is historical: the regulation says historical control designs are "usually reserved for special circumstances", because a past population usually cannot be assessed on the relevant variables as well as a concurrent one.
Random assignment decides who gets the change by chance, not by choice. It balances the factors you did not think of (device, intent, returning vs new) across groups on average. Lind's famous 1747 scurvy trial shows why it matters: he took 12 sailors with similar symptoms, kept them in one place on one common diet, and gave two each one of six treatments. But he put "the worst patients" on sea-water, so that pair was chosen, not randomized. The two given oranges and lemons recovered fastest, a result that held up, but in a weaker effect the hand-picked sickest pair could have distorted the comparison.
What makes an experiment controlled: a checklist
Use these six questions before calling something a controlled experiment. If any answer is no, describe it as an observational comparison instead.
- One change. Does exactly one thing differ between groups? Two simultaneous changes cannot be separated.
- Outcome fixed in advance. Was the dependent variable and how it is counted written down before the data came in?
- Concurrent control. Were both groups measured over the same dates?
- Random assignment. Did chance, not the visitor or the team, decide the group?
- Same measurement. Is the outcome counted the same way in both groups (same tracking code, same bot filtering)?
- Enough units. Is the sample large enough for a hypothesis test to tell the difference from noise?
Worked example: before/after vs a concurrent holdout
Sample data. A store launches a one-page checkout on 1 November and wants to know whether it raised conversion.
Before/after comparison (historical control):
- October, old checkout: 20,000 checkout sessions, 400 orders, 2.0%
- November, new checkout: 20,000 checkout sessions, 520 orders, 2.6%
- Apparent lift: 2.6 ÷ 2.0 − 1 = +30%. A two-proportion z-test gives z ≈ 4.00, p < 0.001.
Controlled version (concurrent holdout): in November, 25% of checkout sessions are randomly kept on the old checkout.
- November, new checkout: 15,000 sessions, 390 orders, 2.6%
- November, old checkout (holdout): 5,000 sessions, 125 orders, 2.5%
- Lift: 2.6 ÷ 2.5 − 1 = +4%. z ≈ 0.39, p ≈ 0.70.
The old checkout itself went from 2.0% in October to 2.5% in November. That 25% rise came from the season (holiday shoppers with stronger intent), not from the redesign. The before/after comparison credited all of it to the new checkout. The holdout measured the season in both groups at once and left only the real difference, which this sample is too small to distinguish from zero.
Controlled experiment vs observational study
| Design | Who decides the groups | Concurrent? | Can show cause? | Website example |
|---|---|---|---|---|
| Randomized controlled experiment | Chance | Yes | Yes, within the test's error rates | A/B test, randomized holdout |
| Controlled, not randomized | The experimenter | Usually | Weakly; selection can bias it | New feature for one country, old for another |
| Natural experiment | An outside event | Yes | Sometimes, if the event is as good as random | An outage that hid chat for some hours |
| Observational comparison | The visitors themselves | Often | No; association only | Visitors who chatted vs those who did not |
| Before/after | Time | No | No; season and campaigns confound it | October vs November |
Observational data is still useful for finding what to test. It just cannot prove the cause on its own.
Common mistakes
- Calling a before/after comparison an experiment. Without a concurrent control, seasonality, campaigns and outages all hide in the difference.
- Letting users pick the group. Opt-in beta users are more engaged than average; their higher conversion says little about the feature.
- Changing two things at once. A new layout launched together with free shipping cannot be credited to either.
- Stopping when the numbers look good. Peeking and stopping early inflates false positives.
- Different measurement in each arm. If one variant loads the tracking script later, its sessions are undercounted.
Measuring a controlled experiment with TapCub
TapCub does not split traffic or assign visitors to groups; your testing tool or your own code does that. TapCub measures the groups the same way, which is the controlled-measurement half of the checklist. For the checkout example:
- Fix the outcome. Create the order confirmation as a goal in Web analytics › Goals, so both groups use one definition.
- Record the assignment. Have your code send the group name (for example
checkout_variant: neworholdout) as an event property, then build a funnel from checkout to order in All-platform analytics › Behavior › Behavior analysis and break it down by that property. Each group's entries and conversions appear side by side for the same dates. - Keep bots out of both arms. Bots and AI crawlers are counted separately in Web analytics › Bots, so they do not dilute either group's rate.
- Mark the launch. Add a date annotation in Configuration › Annotations so anyone reading a before/after chart later sees when the change went live and knows not to read it as the effect.
See also: What is a constant in an experiment? Control variables explained.
See also: Orthogonal array: definition and L4 / L8 examples in experiment design.
Sources
- US Code of Federal Regulations, 21 CFR 314.126 Adequate and well-controlled studies (control types, randomization, bias), checked 2026-11-28.
- Kohavi, R., Longbotham, R., Sommerfield, D. & Henne, R. M. (2009). Controlled experiments on the web: survey and practical guide. Data Mining and Knowledge Discovery, 18, 140–181.
- Lind, J. (1753). A Treatise of the Scurvy, excerpt describing the 1747 trial; background at the James Lind Library.
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.3.3 Comparing two proportions (test used in the worked example).
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.