The second-opinion desk

What does your rule actually do?

One field per line. Decimals and fractions are exact.
Worked examples:

This is not a sample-size calculator. Bring it the rule you already have. It enumerates every possible count, shows which counts reject, and sums their probabilities exactly under the null and the alternative you named.

Everything runs in this page. Nothing is uploaded. The result is exact under the model you typed, not automatically exact for the real study that produced your data.

Rule syntax and conventions

One-sample binomial

Use model: binomial, then give n, p0, p1, a rule, and a tail.

For two-sided exact tests, probability ordering sums outcomes whose null probability is no greater than the observed outcome, matching R's binom.test. Equal-tail and doubled-tail are offered separately because they can produce different regions.

Fisher exact at fixed margins

model: fisher
n1: 4
n2: 4
m: 4
theta1: 4
rule: fisher
tail: greater
alpha: 0.05

n1 and n2 are the two row totals, and m is the fixed total number of successes. The possible value is the number of successes in group 1. Null weights are hypergeometric. Conditional power uses the same fixed margins and the Fisher noncentral hypergeometric distribution at odds ratio theta1. It is not unconditional power for two freely varying binomial samples.

How to check this yourself

For the binomial model, make one spreadsheet row for every integer k from 0 through n. Put BINOM.DIST(k,n,p,FALSE) in the probability column. Confirm the whole column sums to one, then sum exactly the rows listed in the rejection region. Use p0 for size and p1 for power.

To verify a score region, calculate (k-n*p0)/sqrt(n*p0*(1-p0)) and apply the named tail. For score-cc, subtract 0.5 from the magnitude of k-n*p0 before dividing. For Wald, calculate (k/n-p0)/sqrt((k/n)*(1-k/n)/n); with an interior p0, counts 0 and n have zero estimated standard error and an infinite signed statistic. The z rules reject only when the signed or absolute statistic, as required by the tail, is strictly greater than the cutoff.

For fixed-margin Fisher, list x from max(0,m-n2) through min(n1,m). Give each row weight COMBIN(n1,x)*COMBIN(n2,m-x) and divide by the sum of all weights. A one-sided p-value is the matching inclusive tail. A two-sided probability-ordering p-value sums every row whose null weight is no greater than the observed row's weight. Confirm that exactly the rows with p-value at most alpha are listed. For conditional power, multiply each row by theta1^x before normalising, then sum the listed rows. This is also the procedure printed inside every certificate.

What a pass proves, and what it does not

A binomial pass proves that the complete region shown has the displayed size and power under independent Bernoulli trials at exactly the probabilities shown. A Fisher pass proves the analogous conditional statement at the fixed margins and odds ratio shown.

It does not prove independence, a stable probability, honest or complete data, no optional stopping, the alternative you chose, or that this is the best rule. Fisher's conditional result does not become unconditional by dropping the word conditional.

Why a discrete rule can have no size at all

The reason any of this matters is that a count is a whole number, and a whole number cannot be tuned. Take Fisher's tea taster: eight cups, four of each, she names four. Under no discrimination the number she gets right is hypergeometric, and the only upper tail probabilities that exist in this design are 1/70, 17/70, 53/70, 69/70 and 1. That is the complete list. There is no rule of size 0.05 here, and no arithmetic will produce one. The famous test, reject only when all four are right, has attained size 1/70, which is 0.0142857, twenty-nine per cent of the five per cent it is usually described as. Fisher spells the whole distribution out himself, in the same passage where he introduces the experiment. Load the tea-tasting example above and the region and the fraction are on screen; the five numbers above are one column of a spreadsheet away.

Everything else on this page is that observation applied to cases where the arithmetic is less obvious. A rule stated as a threshold on a continuous statistic still has to land on integers in the end, and the integer it lands on moves as the sample size moves, which is why the attained size of a normal-approximation rule saws up and down rather than settling.

Deliberate limits

Sources and controls