Definition
An analysis plan is a written document, fixed before the outcomes it covers are examined, that states the question a study answers and every choice needed to compute the answer: the population, the quantity to estimate, the measurements, the inclusion rules, the handling of failures and missing values, the statistical method and when data collection stops. Analyses that follow the plan are confirmatory; analyses chosen after seeing the data are exploratory. Registering the plan in advance with a public registry that dates it and keeps it unchanged is called preregistration.
The idea
One dataset supports many analyses. From the same latencies an analyst can report the mean, the median §11.13 (the middle value after sorting), the fastest run or the mean of the successful runs only, with or without some runs. Each choice is defensible on its own. An analyst who tries several and reports the one that looks best has, however, changed the procedure: the reported number now reflects the search as well as the system. This freedom is called researcher degrees of freedom, and the many branch points between data and reported number are called the garden of forking paths.
An analysis plan closes the forks before the data can influence the choice. A bet is a fair picture: a bet placed before a race tests the foresight of the bettor, and a bet placed after the finish tests nothing. The picture stops being accurate in one respect. A plan may need to change for a good reason, for example when a planned method turns out not to fit the data. The change is then recorded with its date and reason, and both the planned and the changed results are reported.
How it works
A plan states at least the following.
The question and the primary outcome: the one result the study is designed to establish.
The population and the experimental unit §11.3: the situations the claim covers, and the item that counts as one independent observation, such as one run or one device.
The estimand §11.2: the exact quantity to be estimated, such as the difference in mean latency between two builds.
The conditions and their order: what is compared, and whether randomization §11.8 (assigning runs to conditions or time slots at random) is used.
The workload and the number of repetitions, with the reason for that number.
The eligibility and exclusion rules, and the handling of failures, stopped runs and missing values.
The estimator: the formula that turns the observations into the estimate.
The uncertainty method, such as a 95% confidence interval §11.18 (a range computed by a method that, over many repetitions of the study, contains the true value in 95% of them), and any correction for multiple comparisons §11.26 (the extra chance of a false finding when many tests are run).
The stopping rule: when data collection ends.
Using a plan takes these steps.
Write the plan before the data exist or, if data already exist, before anyone examines the outcomes it covers.
Freeze the plan in a form whose date and content cannot be changed later, such as a commit in a version-control system or an entry in a public registry of studies; the registry route is preregistration.
Collect and analyze the data as the plan says.
Record every deviation: what changed, when, why, and whether the outcomes had been seen at that time.
Report the planned analyses as confirmatory and every other analysis as exploratory, together with the deviations.
Worked example
Three runs give latencies of 1, 1 and 10 ms. The minimum is 1 ms. The median is 1 ms. The mean is ms. All three numbers are correct, and each describes something different: the best case, the typical run and the average cost. Suppose the plan named the mean. Reporting 1 ms because it looks better, and calling it the planned result, misstates both the estimator and the way it was chosen. Reporting the median as an exploratory addition next to the planned mean is honest.
Forking also raises the chance of a false finding. A hypothesis test §11.22 decides whether data are surprising under a model of no effect, called the null hypothesis; a false positive §1.22 is a finding of an effect where none exists. Suppose an analyst runs 20 tests on data that contain no real effect, each test has false-positive probability 0.05, and, as a simplifying assumption, the 20 false-positive events are independent. The probability that no test fires is , so the probability of at least one false positive is , about 64%. Reporting only the test that fired presents a 64% chance as a 5% one. A plan that names one primary test, or fixes the correction for all 20 tests in advance, prevents this.
Stated precisely
An analysis is confirmatory when every choice that determines the reported number, from the population to the estimator, was fixed in a dated plan before anyone examined the outcomes that the number is computed from. Every other analysis is exploratory. The distinction concerns the procedure, not the truth of the result: an exploratory finding may be true, but its stated error rates assume a procedure fixed in advance and do not hold.
For error rates, the plan matters as follows. Let a family of tests each have false-positive probability when its null hypothesis is true. The family-wise error rate is the probability of at least one false positive in the family. By the union bound §15.42, which needs no independence, it is at most ; when the false-positive events are independent, it equals . With and , these are , which bounds nothing, and . The Bonferroni correction tests each hypothesis at level , here . It keeps the family-wise error rate at most without any independence assumption; under independence the rate is . Every one of these statements holds only if counts every test that was tried, and a plan written in advance makes that count checkable.
Limits and common mistakes
A plan does not make the measurement valid: a biased instrument produces wrong numbers however carefully the analysis was planned. Nor does a plan show that the analysis code implements it; that needs a separate check.
A vague plan leaves the forks open. “Outliers §11.31 will be removed” lets the analyst decide what counts as an outlier after the fact; the plan must give the rule itself.
A plan written after a look at the outcomes is not prospective. Every look must be disclosed, and the analyses it could have influenced are reported as exploratory.
Exploratory analysis is legitimate and is often where discoveries come from. Its findings are hypotheses for a new confirmatory study, not confirmed results.
A plan can be wrong. Correcting it openly, with dates and reasons, is better than following a broken plan or changing it silently.
A plan does not turn a chosen cutoff into a property of the system. A threshold written in a plan is still a policy, not a measured or proven bound.
Questions answered
Which choices were fixed before looking at outcomes?
The choices fixed before looking at outcomes are exactly those written in an analysis plan whose date, or whose recorded version, is provably earlier than the first examination of the outcomes. Every other choice must be treated as made after looking. An analysis plan is a document that fixes in advance how the data will be analyzed.
The answer goes through each choice and says whether it was fixed in advance: the population and the experimental unit, the quantity to be estimated, the measurements, the eligibility and exclusion rules, the handling of failures and missing values, the estimator, the uncertainty method and any correction for multiple comparisons, the comparisons, and the stopping rule. The proof of timing must be a record that cannot be changed afterwards, such as a dated commit in a version-control system or a public registry entry, not anyone’s memory. Every later change is listed with its date and reason, and analyses that depend on a later choice are reported as exploratory. A plan shows which choices were fixed; it does not show that the code followed the plan.
Related entries: Evidence eligibility (§13.14), Prospective exclusion rule (§13.15), Estimand and estimator (§11.2), Multiple comparisons (§11.26), Assurance case (§10.41), Hypothesis test (§11.22), Experimental unit (§11.3).