30.4 Type I error, Type II error, and power
A Type I error occurs when a procedure rejects H0 although H0 generated the data. Its probability is alpha under a calibrated test. A Type II error occurs when the procedure does not reject H0 under the chosen alternative; its probability is beta. Power is 1−beta. These probabilities describe repeated use of a procedure, not the probability that either hypothesis is true in one completed study.
Concepts to keep separate
- Two-sided alpha 0.05 allocates error to both directions and has a one-df chi-square critical value near 3.841.
- Target power is a design convention, commonly 0.80 or 0.90, and should reflect decision consequences rather than habit alone.
- Multiplicity from several hypotheses, looks, endpoints, or model searches can change the relevant Type I error control.
- An empirical power estimate is meaningful only if the test has acceptable null calibration under the same finite-sample pipeline.
Terminology matters because a single scenario can contain several denominators and several sources of randomness. Truth is the parameter vector used to generate a replicate. Estimate is the value recovered from that replicate. Design is the planned arrangement of subjects, arms, doses, and observations. Method is the approximation or simulation–estimation procedure used to predict performance. A credible report labels all four.
Mathematical or operational walkthrough
At true power 0.80, a correctly designed procedure still fails to reject in about one of five repeated studies. That is not evidence that the calculation was wrong. Conversely, a single significant result does not demonstrate that the design had high power.
For novices, read every expression from the inside out: identify the scientific effect, identify the null value, put both on the same parameter scale, identify the variance or information that belongs to the actual design, and only then calculate a test statistic or sample size. Units and parameterisation should cancel in a way that leaves a dimensionless statistic.
How this maps to nlmx
Always pair alternative simulations with null simulations when fitting complexity, boundaries, sparsity, or model selection might invalidate the asymptotic reference distribution.
Chapter 30 explains the statistical and implementation concepts. Chapter 31 gives the complete nlmx power command, every CLI and settings control, precedence, output schema, and production workflow. This separation is deliberate: choosing an option correctly requires understanding which estimand and assumption it changes.
Quality-control checklist
- Is alpha one- or two-sided and family-wise or per-test?
- Was the target selected before results were viewed?
- Is empirical Type I error close enough to alpha for the intended use?
- Are failed trials represented transparently?
The graph is explanatory; the CSV, JSON, resolved settings, model inputs, and replicate rows are the authoritative evidence. When a plotted point looks surprising, diagnose the underlying rows before changing the design.
Common mistakes
- Interpreting 80% power as an 80% posterior probability
- Ignoring multiplicity
- Increasing apparent power by using an inflated test
Also avoid copying a sample size from a nearby project. Power is conditional on the model, tested effect, covariate distribution, schedule, residual and random variability, attrition, test, estimator, and success criteria. Similar-looking studies can have very different information.
Evidence to retain
- scientific question, estimand, hypothesis, alpha, target, and criteria;
- model/data/design inputs, parameter source and uncertainty distribution;
- software version, method, approximation, seed, threads, command, and resolved settings;
- scenario grid, row-level results, failures, denominators, intervals, diagnostics, and checksums;
- scripts that calculate derived tables and figures, plus the interpretation and limitations.
Navigation
See the previous page, next page, and formula and decision index.