Counts and proportions
stats_contingency_table is a tool of the Drybench MCP server. It runs the same engine and reporting rules as Drybench Assay.
What it answers
Required: analysis (association, mcnemar, trend); unit (independent, technical, unspecified); design. Analyses an integer contingency table (2 to 10 rows and columns): Fisher exact or Pearson chi-squared association with row proportions and two-by-two measures when roles are named, McNemar's paired test, or the Cochran-Armitage trend test. With analysis association, test is also required. Inference opens only for independent units and a design that matches the analysis.
Limits:
- A C50 estimated here describes this assay under these conditions and is not a binding constant.
- It computes from the inputs it receives. It does not check the person's data, design or sample.
- Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.
Research and education software; not for diagnosis or treatment decisions.
Not medical advice. Nothing here is advice about any medicine, treatment or condition, and nothing here is an assessment of any person's variant, sample or molecule. Decisions made with it are yours.
Not a forecast. Stages, scores, rates, rankings and similarities shown here describe records as they stand, or historical averages; they are not a forecast for any molecule, trial, drug, company or target.
What this page can and cannot show
Weakest level among this tool's methods: Checked against a reference. Reference kind not recorded for 4 of 4 methods.
Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.
Open Drybench Assay · Drybench Assay: methods and checks · What the levels mean · Every assistant tool
Inputs
An omitted input takes the default its description states; the reply's inputsReceived shows what was given. Any input not listed here is refused.
counts(array of array of integer, required): counts[i][j]: non-negative integer counts by row and outcome column.rows(array of string, optional): Optional row category labels.columns(array of string, optional): Optional outcome column labels.analysis(string, required): Analysis mode: 'association', 'mcnemar', or 'trend'. One ofassociation,mcnemar,trend.unit(string, required): Experimental unit: 'independent' (opens inference), 'technical', or 'unspecified'. One ofindependent,technical,unspecified.design(string, required): Study design: 'cohort', 'cross-sectional', 'case-control', 'paired', or 'unspecified'. One ofunspecified,cohort,cross-sectional,case-control,paired.test(string, optional): Required for analysis 'association': 'fisher' or 'chi-squared'. One offisher,chi-squared.roles(object, optional): 0-based role indexes: exposed and reference rows, plus event column.exposed(integer, optional)reference(integer, optional)event(integer, optional)
scores(array of number, optional): Trend only: row scores (one per row).fisherLargeTable(boolean, optional): For 'fisher' on tables larger than 2 rows or columns: true enables exact enumeration (default false).level(number, optional): Confidence coverage level for intervals (0.9, 0.95 default, or 0.99). One of0.9,0.95,0.99.
What it withholds or refuses
A refusal, a withheld value or another named status is an answer: the reply gives the reason and no number in its place; an absent value is not zero. Invalid input means nothing ran.
Refusal codes: not recorded for stats_contingency_table.
Values it withholds: not recorded for stats_contingency_table.
How to cite a number from it
Every reply carries a cite line. It names, in order: the tool and the server version; each method the call went through, with its version and level (and the limit beside a level where the method's record narrows it); the receipt, the first 12 characters of the hashes of the arguments and of the result; and the address where its methods are described. Quote it with any number taken from the reply.
The receipt identifies a computation; it is not a signature. It holds no time, so the same arguments on the same server and method versions give the same receipt, and anyone can call the tool again and compare; a later method version can change the output hash.
An example
The values asked and the values answered, computed by this tool when this page was built:
Asked with
unit: independentdesign: cohortanalysis: associationtest: fisherfisherLargeTable: nolevel: 0.95
It answered (computed):
coverage: 0.95independent: yesanalysis: association
The reply carries more values than are shown here.
Its cite line:
stats_contingency_table, server 1.0.0; contingency-tests@1.0.0 (Checked against a reference); two-by-two-measures@1.0.0 (Checked against a reference); receipt 40ed67eeb1ee/e76d47802312; methods https://www.drybench.com/methods/assay; page https://www.drybench.com/methods/tools/stats-contingency-table. Quote this line with any number taken from this reply.
Methods
Every method and reference the tool's replies cite, with its version and level. A reply names the methods that call went through.
Chi-squared and Fisher's exact tests on a contingency table
- Method:
contingency-tests@1.0.0 - Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- Reference: Pearson K. Philos Mag 1900;50:157-175; Yates F. Suppl J R Stat Soc 1934;1:217-235; Fisher RA. J R Stat Soc 1922;85:87-94.
- How it was checked: Checked against R 4.4.3 (chisq.test with and without Yates; fisher.test with workspace = 2e8) on 30 cases of the 0.11.0 fixture (28 tables analysed, 2 refused): X², the Yates statistic and their p within 1e-8 relative, Fisher's 2 × 2 p within 1e-8 and r × c p within 1e-6 relative, expected counts within 1e-9 relative, the conditional maximum-likelihood odds ratio and its interval within 1e-8 relative of a transcription of fisher.test's 2 × 2 internals at uniroot tol = 1e-12 (fisher.test's own values recorded beside them); the table, totals, refused cells and withheld states exact (2026-10-13).
- What was not checked: not recorded for contingency-tests@1.0.0. Its absence does not mean everything was checked.
- Method, sources and checks
- On Drybench Assay's methods page: Compare proportions
Odds ratio, relative risk and risk difference with intervals; row proportions
- Method:
two-by-two-measures@1.0.0 - Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- Reference: Woolf B. Ann Hum Genet 1955;19:251-253; Katz D et al. Biometrics 1978;34:469-474; Newcombe RG. Stat Med 1998;17:873-890 (method 10); Wilson EB. J Am Stat Assoc 1927;22:209-212.
- How it was checked: Checked against R 4.4.3 (Woolf, Katz and Newcombe's method 10 by hand with qnorm; prop.test for the Wilson limits) on 28 cases of the 0.11.0 fixture (20 two-by-two tables; row proportions on 27): the odds ratio, relative risk, risk difference and proportions with their bounds within 1e-9 relative, withheld states exact. Inside R the Wilson limits by hand agree with prop.test on all 14 tables checked (2026-10-13).
- What was not checked: not recorded for two-by-two-measures@1.0.0. Its absence does not mean everything was checked.
- Method, sources and checks
- On Drybench Assay's methods page: Compare proportions
McNemar's test for paired counts (exact and asymptotic)
- Method:
mcnemar@1.0.0 - Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- Reference: McNemar Q. Psychometrika 1947;12:153-157; Fagerland MW, Lydersen S, Laake P. BMC Med Res Methodol 2013;13:91.
- How it was checked: Checked against R 4.4.3 (binom.test on the discordant pairs; mcnemar.test with and without the continuity correction) on the 7 paired cases of the 0.11.0 fixture: the exact p, both chi-squared statistics with their p, and the paired odds ratio b/c with its Clopper–Pearson limits within 1e-8 relative; a ratio that is not finite and withheld states exact (2026-10-13).
- What was not checked: not recorded for mcnemar@1.0.0. Its absence does not mean everything was checked.
- Method, sources and checks
- On Drybench Assay's methods page: Compare proportions
Cochran–Armitage test for trend in proportions
- Method:
cochran-armitage@1.0.0 - Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- Reference: Cochran WG. Biometrics 1954;10:417-451; Armitage P. Biometrics 1955;11:375-386. The variance with N, as R's prop.trend.test.
- How it was checked: Checked against R 4.4.3 prop.trend.test on the 5 trend cases of the 0.11.0 fixture (equally spaced and typed scores; two groups and constant scores refused): the statistic and p within 1e-8 relative, the direction and withheld states exact (2026-10-13).
- What was not checked: not recorded for cochran-armitage@1.0.0. Its absence does not mean everything was checked.
- Method, sources and checks
- On Drybench Assay's methods page: Compare proportions
No independent scientist has yet reviewed these checks. What the levels mean.
Changes to its methods
- No correction is logged for contingency-tests@1.0.0.
- No correction is logged for two-by-two-measures@1.0.0.
- No correction is logged for mcnemar@1.0.0.
- No correction is logged for cochran-armitage@1.0.0.
Where it runs
The local MCP server serves this tool; the hosted MCP connection does not.