2×2 Fisher exact test

Compute the probability-ordered Fisher p-value for both tails and the sample odds ratio of a small 2×2 table.

The example value has been entered. Check it immediately or change the value.

Input is processed in the browser. Refreshing returns a sample value.

Result

Instructions and example

P(X=x)=C(c₁,x)·C(N−c₁,r₁−x)/C(N,r₁); p=Σ{P(X=x):P(X=x)≤P(X=a)}

The table 1,9 / 11,3 gives two-sided p≈0.00275945618522 and sample odds ratio 1/33.

Integer total must be 1–200 with positive margins. Probabilities use log combinations; conditional odds-ratio estimates and confidence intervals are not computed. Floating-point results display at most 12 significant digits.

Frequently asked questions

How is the two-sided Fisher p-value summed?

Sum probabilities of all feasible tables no more likely than the observed table. This can differ from doubling a tail.

How are odds ratios displayed for cells with count 0?

A zero denominator and positive numerator yield ∞; both zero yield undefined. No correction is added to cells.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors