When the prior odds of a real effect are , a study's Type I error is , and its statistical power is , a positive report updates those odds to . This follows directly from Bayes' theorem. A small false-positive rate does not itself make the effect's posterior probability high: the prior odds and power also matter. The posterior exceeds one half exactly when .
A sample size calculation for a binary endpoint requires its own baseline probability, not merely the rate of a related outcome. A fatal-event probability equals the probability of the underlying event times its conditional fatality probability; knowing only that product does not identify the incidence of all events. Thus a mortality rate can size a mortality trial but cannot determine the size for all fatal and nonfatal events without further assumptions. The significance level, allocation, target statistical power and effect definition must also be specified.
Linear-by-linear association test Created 2026-09-29 Updated 2026-10-14
For a two-way contingency table whose row and column variables are ordinal categorical variables, assign row scores and column scores . The linear-by-linear association statistic measures the weighted covariance
After normalization, its square is asymptotically under independence. A signed, one-sided version tests a specified direction of ordinal association and can have greater statistical power than an omnibus independence test against a monotone alternative.
Most powerful test 2026-10-05
At level , a most powerful test against a specified simple alternative maximises statistical power among statistical tests whose size of a statistical test is at most . The Neyman-Pearson lemma constructs it by a likelihood ratio threshold. A uniformly most powerful test is most powerful simultaneously against every member of the specified alternative family; maximising power at one alternative alone need not give uniform optimality.
For two unit-scale Laplace distributions with locations , the likelihood ratio is nondecreasing in , with constant tails and an increasing middle interval. Therefore an upper-tail statistical test of exact size of a statistical test is a most powerful test. Its cutoff is for , and otherwise. Under location , its statistical power is if , and otherwise. Constant likelihood ratio tails can make the most powerful test nonunique.
Normal approximation Created 2026-10-05 Updated 2026-10-14
A normal approximation replaces a sampling distribution by a normal distribution, often through a central limit theorem. In a Wald test, approximate statistical power is determined by the standardized difference under the alternative. This yields Neyman allocation for fixed treatment-specific variances.
For the same normal distribution model, a two-sided test compares the null hypothesis with the alternative hypothesis . Under the null hypothesis, the standardized test statistic has standard normal distribution. Write for the standard normal distribution function. With , , and , the observed test statistic is . Its p-value is
Thus the p-value is a tail probability computed under the null hypothesis, including departures in both directions. It is not , the posterior probability of the null hypothesis, nor the probability that the observations arose "by chance". The normal distribution test statistic and its calibration appear in NIST's teaching reference for testing a process mean; the tail interpretation is stated in Penn State's hypothesis-testing notes.
Choose the significance level before observing the sample. The rejection region is , whose probability under is exactly 0.05. Here , so reject . This agrees with zero lying outside . More generally, a proposed belongs to the unrounded 95% confidence interval precisely when its two-sided test does not reject under this strict cutoff. The equality boundary has probability zero in this continuous statistical model.
Figure 1.
The chosen 5% rejection tails and the observed two-sided p-value
. Details.
The significance level and statistical power describe different repeated-experiment probabilities. At a specified alternative , put and . Then
The first is the Type I error probability; the second is the Type II error probability at that alternative. For a planning alternative , keeping , and gives , and statistical power . At , and statistical power rises to . These are model calculations for specified alternatives, not posterior probabilities inferred from a nonsignificant result. They explain why failure to reject cannot establish equality and why choosing sample size before an experiment is useful.
Historically, Ronald Fisher's 1925 book discusses the normal cutoff and tail probability 0.05 as a convenient convention on page 47, rather than a mathematically compulsory threshold: [ref].
Normal-mean sample size calculation Created 2026-10-06 Updated 2026-10-07
For a one-sided normal-mean test of size with known standard deviation , a positive alternative and target statistical power , the required sample size is the ceiling of . This follows by shifting the standard normal quantile in the alternative rejection probability.
For a paired binary difference , set and . Then and . Under equal marginal probabilities the variance is . The McNemar test has approximate upper rejection boundary for the sum of differences. Requiring that the alternative mean exceed this boundary by gives the displayed planning size for a positive alternative, neglecting its very small lower-tail rejection probability. Use for a pre-specified one-sided test. The marginal probabilities alone do not determine : co-occurrence of positive outcomes must be specified or bounded. Discreteness and clustered data can change achieved statistical power.
A simple hypothesis specifies a single probability law, with no unknown parameter remaining. For a possibly randomized hypothesis test, let be its conditional rejection probability. Its test size is and its statistical power against the specified alternative is .
The Neyman-Pearson lemma states that for two densities with respect to a common measure, a likelihood-ratio test rejecting when , accepting when it is below , and randomizing on equality to obtain size , maximizes power among all tests of size at most .
Here the likelihood ratio is
Writing , its logarithm apart from the constant is . This decreases until and then increases. In particular it is nonpositive for and positive for . The supplied normal-tail value and imply that the quantile defined by satisfies . Hence the threshold is above every central value on ; outside that interval the ratio is strictly increasing. The Neyman-Pearson lemma therefore selects precisely the two tails:
The equality boundary has probability zero under both continuous laws, so no randomization is needed. Under the alternative density, the statistical power is
The central dip in the likelihood ratio is why checking the threshold against the entire central region, rather than assuming monotonicity in everywhere, is necessary.
Use a concurrent randomized comparison of the new leaflet with the existing release information. Random allocation makes the groups comparable in expectation and avoids attributing a secular change in drug supply, release populations or post-release services to the leaflet. Both arms should use the same outcome ascertainment and two-week follow-up. This improves the causal interpretation over a historical before-and-after comparison; adequate sample size remains necessary given the low statistical power calculated above. If contamination prevents individual allocation, a carefully designed cluster randomized controlled trial is an alternative, with its sample-size calculation allowing for within-cluster dependence.
Treat each release as an independent Bernoulli observation with a two-week event probability, giving two independent binomial distributions. Under the specified effect, the probabilities are and with in each period. The expected event counts are therefore 24 and 12. For a conventional two-sided 5% comparison of proportions, let , and . Use
The approximate null rejection region is , and under the alternative is approximately . Thus the power of a two-sample rare-event comparison is
Here is the standard normal distribution function. Hence the normal approximation gives : detecting the proposed halving is far from assured.
For the small counts, a discrete calculation is also appropriate. Approximate the two counts by independent Poisson distributions with means 24 and 12. Conditional on their total , the pre-intervention count is under equal rates and under the halving alternative; under that alternative. If is the rejection set of the symmetric exact two-sided 5% binomial test, its power is
This conservative discrete test has about 45% power, lower than the normal approximation because its achieved level can be below 5%. If a decrease-only one-sided 5% test had been specified in advance, replace 1.96 by 1.645; the normal-approximation power is about 64%. The tail convention and the chosen test must accompany any quoted statistical power.
Use a conventional two-sided test at significance level . Let per arm, , and . Under the specified alternative, the normal approximation to the difference of independent binomial proportions has standard deviation
For planning the pooled null standard error, use , giving . The rejection threshold is approximately , exceeding the mean alternative difference. With the standard normal distribution function, the approximate statistical power is
No: the usual two-sided 5% calculation gives about 45% power, below 50%. The expected death counts are only 20 and 10, so an exact discrete design calculation could refine this approximation.
The question does not specify the tail convention. If a beneficial direction is prespecified and a one-sided test at 5% is justified, replace by approximately ; the resulting statistical power is about , and the answer is then yes. This change of testing convention must be declared.
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).
A simple hypothesis specifies one probability distribution. Let the null hypothesis and alternative have probability density functions with respect to a common measure. A possibly randomized statistical test is a measurable function , its conditional probability of rejecting the null hypothesis. Its size of a statistical test is , and its statistical power at the alternative is . A most powerful test at level maximizes power among tests with size at most .
The Neyman-Pearson lemma says to choose and a test of size with where and where , choosing values on the equality set to reach the specified size. Equivalently, threshold the likelihood ratio, treating positive alternative density with zero null density as an infinite ratio. Randomization on a threshold atom ensures exact size when needed. If , all remaining null-only mass can be used to reach size without changing power.
For any test of size at most , the signs of the two factors give
pointwise. Integrating proves
This is the required optimality proof. If and another test is equally powerful, both inequalities must be equalities. It must have size and agree with wherever , apart from null sets for the relevant densities. Thus freedom is confined to the equality set and sets null under both hypotheses; at , additional size need not improve power. This also explains the nonuniqueness below.
For the unit-scale Laplace distribution, put . Its likelihood ratio is
It is nondecreasing, so an upper-tail critical region has the Neyman-Pearson lemma form, even if the cutoff lies inside a constant-ratio tail. Solving gives the most powerful test for a Laplace location shift,
Continuity of the distribution makes this nonrandomized test exactly size . It need not be the unique most powerful test: within a flat extreme likelihood ratio region, other selections having the same null probability are equally good.
Its statistical power is
Here denotes power, not the probability of a type-II error. For , . Thus the power is for , and otherwise. The first branch is at most . On the second branch, power at least is equivalent to . Therefore the required pairs are exactly , with no restriction on the common location.