For equal allocation, let be the required sample size per arm, , and . In the standard sample size for comparing two proportions calculation, a two-sided test at 5% with 80% statistical power requires
Using and gives , which is rounded upward for actual recruitment. Thus
Since the risks are small, dropping the corrections and using gives , conventionally about 52.3 thousand. These are slightly different approximations to the same planning requirement. Add an allowance if outcome ascertainment is incomplete or the allocation is clustered. A prespecified one-sided test would need a different, smaller sample size; the calculation here uses the conventional two-sided interpretation consistently with part (b).
Let be the number allocated to each arm and test equality of the two reconviction probabilities, with a specified target difference as the alternative. For equal independent binomial arms, put , , and . Under the null the rejection boundary for is approximately ; under the planning alternative its mean is and variance is . statistical power 0.8 is obtained approximately by requiring
Thus the sample size for comparing two proportions is
where , for a two-sided test, or for a prespecified one-sided superiority test. With and , this simplifies to
For illustration only, at this gives 35 per arm, 70 total, for a two-sided test, or 27 per arm, 54 total, for a one-sided test. No unique numerical count is specified until alpha and sidedness are fixed. These are normal planning approximations; an exact requirement can be checked by summing the probabilities, from the two independent binomial distributions, of all tables in an exact test's rejection region and increasing until statistical power is at least 0.8.
This calculation detects a treatment difference when the effect equals the proposed target. It does not promise 80% statistical power to establish that the reduction is at least that target via a confidence bound when the true effect lies exactly at the target boundary. Such a different testing objective needs a separately specified null and planning alternative. Complete follow-up and ascertainment by intention-to-treat analysis are also required.
Assume equal allocation of independent offenders to each arm and a two-sided statistical test of significance level . Write for P30 and for initial community-service assignment, with and . The two event counts have independent binomial distributions. Under the stated alternative, the difference of sample proportions is approximately a normal distribution with mean and variance
The pooled two-proportion test has approximate upper rejection threshold at the planning rates, where is the standard normal quantile. To obtain statistical power against a positive difference, place the alternative mean alternative-standard-errors above that threshold:
Solving yields the usual sample size for comparing two proportions:
per arm, rounded upwards, with total sample size . This targets the dominant rejection tail under the planning alternative; an exact power calculation can include the very small opposite-tail probability or use the binomial distributions directly.
For illustration, at , and , giving . Thus
For a prespecified one-sided test, replace by . The calculation assumes complete endpoint ascertainment, independent individual allocation and that the two initial-policy rates are appropriate; losses or clustered allocation would require corresponding design adjustments.
Mortality requires its own sample size calculation, rather than using the much commoner reconviction endpoint. Under the same specified exposure assumptions, the P30 schedule has 30 prison days, 30 high-risk post-release days, and 300 ordinary days. Its integrated hazard is
Hence its 360-day death probability is . For initial community-service assignment the preceding mixture gives . The absolute risk difference is therefore only about , or 16.8 fewer deaths per 10,000 initial assignments. The person-time approximation gives 145 versus 128 deaths per 10,000, a difference of 17.
As an illustrative design target, take two-sided significance level , statistical power and equal individual allocation. Apply the sample size for comparing two proportions formula with these mortality probabilities:
It gives about 74,600 participants per arm, or 149,200 altogether; using the simpler exposure approximations gives about 73,130 per arm. At 30,000 sentences per year, even if every offender were eligible and enrolled, this requires roughly five years of recruitment and another year to complete the final cohort's follow-up.
For scale, one year's equally allocated cohort has 15,000 per arm, with roughly 216 expected deaths after P30 and 191 after community-service assignment. The standard error of the risk difference is about , so the expected standardized separation is only about , below the usual two-sided 5% critical value. A one-year trial would consequently have poor statistical power for this mortality difference.
Thus mortality discrimination is much more demanding than reconviction discrimination. National recruitment and reliable linkage to death records could make a multiyear study feasible, but restricted eligibility, incomplete follow-up, or lower recruitment would lengthen it. A trial sized only for the 4-percentage-point reconviction difference would not provide a precise mortality comparison. The numerical conclusion depends on the supplied daily hazards, custody schedules, and the chosen power and significance targets; the prompt does not specify a mortality design target of its own.
Use equal allocation and a conventional two-sided 5% comparison of independent proportions. The assumed risks are and , giving target difference . Put and let be the number per arm.
The null critical difference is approximately . Under the alternative, the difference has standard deviation . For 80% statistical power, the target difference must exceed the critical difference by alternative standard deviations. Solving gives the sample size for comparing two proportions
This is about per arm, or altogether. Rounding for planning:
The rare-event Poisson approximation gives a similar answer. This assumes the stated baseline risk applies, no endpoint loss, and no attenuation by treatment contamination. The two-sided convention is explicit: a one-sided 5% test would require fewer participants.
Treat the two retrieved sets of positive tests as independent binomial samples, each of size 500, and use a two-sided test at significance level . The normal-approximation sample size for comparing two proportions, with equal numbers in each group, is
For , , this gives , or 356 per group. Thus 500 positives in each period are sufficient for 80% power under these assumptions.
More explicitly, a pooled two-proportion test rejects when
where pools the maximum-readout successes. At the proposed alternative, the difference has mean and standard deviation . The planning null critical difference is , giving approximate power
This compares the readout percentage among positive tests. It assumes comparable measurement rules and independent observations; a change in that percentage alone does not identify its causal explanation or the prevalence of drug use in the full tested population.
Use equal individual allocation, a two-sided 5% test as in part (a), 80% power, complete four-week ascertainment and the supplied fatal-overdose endpoint. Then , , and . Substituting into the sample size for comparing two proportions gives
Rounding upward for equal allocation gives
The corresponding expected endpoint counts are about 148 in the control arm and 103 in the active arm. The one-third eligibility proportion affects how many prisoners must be screened, not the number of eligible participants randomized; at full consent and eligibility ascertainment, roughly three times this randomized total would need screening. Loss to follow-up, nonadherence or a changed baseline mortality risk would require a separate design adjustment.
The wording needs an endpoint qualification. The supplied risk is death from overdose, and the proposed effect concerns preventing those deaths. It does not give the incidence of all overdoses. Thus the calculation above sizes fatal overdoses, the intended endpoint supported by the data. For a literal 30% reduction in all overdoses, the unknown baseline incidence must replace in the formula, with . This is the endpoint-specific rare-event sample size issue: the same fatal risk can coexist with many nonfatal rates. For example gives about 29525 per arm, whereas gives about 2838; knowing only the fatal rate cannot determine that latter sample size.
A numerical power calculation needs a significance level, desired power, sidedness and allocation; these are not specified in this part. For a concrete planning illustration, assume independent batches, equal samples per supplier, a two-sided 5% test with 80% power, and true rates and . The observed 2% from B and C is being used as a planning value for B, not as proof that B's population rate is exactly known. There is also a numerical inconsistency in the stated frame: at six batches per working day, B and C together produce only 120 batches in two weeks, and their proposed schemes would test 24. The asserted 3,000 sampled batches cannot literally come from that frame. The calculation treats as a stipulated planning estimate; its collection would require a larger frame or longer period.
For two independent sample proportions, the approximate null variance of their difference is and its variance at the alternative is , with . Separating the null critical value from the alternative mean by the required power quantile gives the sample size for comparing two proportions:
With , and , this gives , so the normal-approximation calculation rounds to 1,141 batches per supplier, or approximately 1,150 for a practical planning target. This is per supplier, not the combined total. A different power or a one-sided test changes the answer. Positive clustering of sampled batches requires a cluster-aware calculation or inflation, so the independent-batch calculation should not simply be applied to C's one-day clusters.