Lawfare Group → Knowledge Institute → Lawfare Academy

← Course syllabus · Related lesson

A rare event, a finite sample, and a defensible interval

Current complete on-site edition 5

Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative accounting frameworks are distinguished. Independent subject review and observed human learner testing remain pending.

Cumulative statistical study dossier, transfer models and 30-point rubric

Preserved original teaching integrated with complete current on-site preparation. Independent human subject review and observed learner testing remain pending.

Begin with the observation mechanism

An appointment office observes one missed visit in twenty independently sampled appointments. The observed fraction is 0.05. That calculation describes the sample; it does not establish that the next appointment has exactly a five-percent chance of being missed. To reason about uncertainty, first specify a model: twenty independent Bernoulli outcomes with a common probability p. Repeated appointments by the same patient, a holiday closure, or selective recording can violate this model. An interval formula does not repair a defective observation mechanism.

The target here is a common appointment-level probability within the specified process. It is not the probability that a particular patient will miss a particular visit. A forecast for an individual may need additional predictors, and a causal claim about an intervention needs an appropriate comparison. Record the denominator, the inclusion rule and the observation period alongside the numerator. An apparently improved percentage can result from changing which visits enter the denominator.

Why the symmetric approximation breaks

The familiar Wald interval is p-hat plus or minus z times sqrt[p-hat(1-p-hat)/n]. With one success in twenty trials and z=1.96, its standard error is about 0.04873 and its endpoints are about -0.04552 and 0.14552. The negative endpoint has no interpretation as a probability. Simply replacing it by zero disguises the approximation problem; it does not establish the claimed repeated-sampling coverage.

At zero observed events, the estimated standard error becomes zero. The resulting zero-width interval would imply certainty from a finite sample. Distinguish an estimated frequency of zero from a demonstrated impossibility. Small samples and probabilities near a boundary are precisely where a symmetric normal approximation around the observed fraction can mislead.

Invert a test rather than freeze its variance

The Wilson construction asks which proposed probabilities p0 are compatible with the score comparison |p-hat-p0| / sqrt[p0(1-p0)/n] <= z. Squaring and rearranging gives a quadratic inequality in p0. Its roots are [p-hat+z²/(2n) ± z sqrt(p-hat(1-p-hat)/n+z²/(4n²))] / [1+z²/n]. The variance is evaluated at each proposed probability instead of frozen at the observed fraction.

For x=1 and n=20, the center is about 0.12251 and the half-width about 0.11363. The interval is approximately [0.00888, 0.23614]. The center is not the observed fraction; the construction is not a symmetric uncertainty band around 0.05. Report the method and the confidence level, rather than silently changing the point estimate to the interval center. Wilson coverage is an approximation with useful boundary behavior, not a promise of exact coverage for every possible p.

Interpret the result and the decision separately

A 95% confidence procedure is evaluated by its coverage over repeated samples under the model. It does not assign a 95% posterior probability to this fixed parameter without a Bayesian model. The observed interval also does not tell an operations director whether the service meets a two-percent target: it contains values above that target. Failing to establish that p exceeds two percent is not proof that p is below it. Predefine whether a one-sided bound or a two-sided interval answers the operational question.

Suppose the same office has twenty appointments from only two patients. Replacing n=20 with the same number in the Wilson formula treats correlated records as independent trials. A defensible analysis would revisit the sampling unit and a model for dependence, not merely select a more attractive formula. Before recommending a policy, separate uncertainty about the rate, consequences of missed visits, evidence about proposed remedies, and the cost of collecting more independent observations.

Boundary check

For zero events in twenty trials, Wilson gives lower bound 0 and upper bound z²/(n+z²), approximately 0.16113. Twenty event-free observations therefore do not establish an event probability of zero. For twenty events, complement symmetry yields [0.83887,1]. These limiting cases are useful implementation tests.

Progressive independent practice

Write your analysis before opening each model. Then change the stated fact and revise the reasoning.

Guided

Reproduce both intervals for 1/20. Explain why clipping the Wald lower endpoint is not a coverage argument.

Compare the model reasoning

Wald is approximately [-0.04552,0.14552]; Wilson approximately [0.00888,0.23614]. Clipping changes the reported set without deriving or evaluating the resulting procedure.

Changed conditions

The sample is 19/20.

Compare the revised analysis

Complement symmetry gives Wilson approximately [0.76386,0.99112]. The symmetric Wald interval now exceeds one.

Independent

A dashboard labels 0/20 as zero risk. Write a correction using the model and the boundary calculation.

Compare the model reasoning

Report no events observed among twenty qualifying independent trials. A 95% Wilson upper endpoint is about 0.16113; zero estimated frequency is not zero underlying risk. State the sampling and independence assumptions.

Changed conditions

The twenty records were selected because they had no events.

Compare the revised analysis

The selection rule destroys the stated random-sampling interpretation. Neither interval estimates the process rate from that selected sample.

Transfer

The manager wants evidence that the true rate is below 2%. Does the 1/20 two-sided interval establish this?

Compare the model reasoning

No. The interval includes rates well above 2%. Specify a prospective decision rule and appropriate bound, then plan independent observations; do not choose the confidence procedure after inspecting results.

Changed conditions

The manager asks whether a new reminder caused a lower rate.

Compare the revised analysis

A one-sample interval does not identify that causal effect. Design a comparison and preserve assignment, timing, denominators and potential interference records.

Source readings and scope

NIST/SEMATECH: confidence limits for a proportion — Wilson formula and interval background. All appointment examples and exercises are original.

Reproduce the worked cases

Download the Python 3 laboratory. Uses only the standard library and synthetic data. Run locally; it does not access accounts, a network service or production records. Assertions check the stated results.