Veriformatics

Research demo / Statistical composition

Does treatment change any gene in this panel?

A convincing hit can appear when there is no treatment effect. Watch what happens when an analysis accounts for how the hit was chosen.

Exact synthetic example. Eight experimental units and 35 binary, gene-like features. No biological measurements or fitted treatment effects.

8 units · 4 treated, 4 control35 features · fixed before assignment70 assignments · equally likelyNo effect · every unit’s values stay fixed
01 / SEE THE APPARENT EFFECT

Find the strongest difference.

Measure all 35 features. Choose the feature with the largest absolute difference between treated and control means.

Assignment 1 of 7000001111

1 = treated; 0 = control. Positions follow units u0–u7.

The complete fixed feature panelEight rows of units and 35 columns of binary features. The selected feature is outlined.
All 35 features, unchanged by assignment. Each column is one feature; each row is one experimental unit.
Value 0Value 1Observed winner

The chosen feature

g0 separates the groups perfectly.

Observed values for the selected featureFor assignment 00001111, treated units have value 1 and control units have value 0.

Treated mean 1 · control mean 0
Absolute mean difference 1

That looks compelling. But this feature won a search across the panel.

02 / REPLAY THE ANALYSIS

What changes when labels change?

Compare the observed difference with all 70 allowed assignments, including the observed one. Keep the same four-treated, four-control design.

Reference 2 of 7000010111

Move through the exact enumeration. This changes only the reference assignment being inspected.

Freeze the observed winner

Evaluate the chosen feature under every assignment.

Choose onceRelabelCompare the same feature
Keep g0 · reference difference 0.5The original feature no longer separates the groups perfectly.
Frozen feature reference distribution36 assignments have difference 0; 32 have difference 0.5; 2 have difference 1.
Absolute mean difference · all 70 assignments.
Tail count: the bar at difference 1.
p = 2/70Below 5%

Only two assignments look this extreme for the frozen feature.

The single-feature arithmetic is correct. Its use after choosing the winner does not account for the search.

Repeat the feature selection

Find the strongest feature under every assignment.

RelabelSearch the fixed panelCompare the maximum
Choose g1 · reference difference 1A different feature now separates the groups perfectly.
Repeated-selection reference distributionAll 70 assignments have maximum absolute mean difference 1.
Maximum absolute mean difference · all 70 assignments.
Tail count: the bar at maximum difference 1.
p = 70/70No rejection

Every assignment looks this extreme after the same search.

This procedure tests the global sharp null for the fixed panel. It does not give a selected-gene p-value.

The missing step changes the reference question. How unusual is this feature’s difference? How unusual is the strongest difference found by this search? Those are different comparisons.

03 / CHECK THE CONSEQUENCE

A false positive, every time.

Now let each of the 70 assignments play the observed role. For each one, select its winner and apply each procedure.

70/70

Frozen-selection procedure rejects

100% false rejection at a 5% threshold.

0/70

Global procedure rejects

0% rejection in this constructed example.

This panel was deliberately constructed to expose a failure. The values stay fixed under every treatment assignment, so every rejection is false here.

The global result is no evidence against the sharp null in this example. It does not establish that a real treatment has no effect.

Why is there always a perfect-looking feature?

The panel contains one binary vector from each pair of complementary assignments. There are 35 such pairs among 70 assignments.

Each assignment therefore has a feature that exactly matches its treatment labels or their complement. Its absolute mean difference is 1.

For that feature alone, only its matching assignment and complement have difference 1. Repeating the search finds a perfect separator for every assignment.

A feature fixed in advance can have the same numerical p-value, 2/70. The failure comes from selecting the winner first.

Does the issue also appear in less structured synthetic counts?

The retained research run generated 100 Poisson and 100 gamma-Poisson matrices. Each had eight units and 100 features.

Each matrix was held fixed while all 70 assignments were enumerated. The table averages the exact conditional rejection fractions.

Threshold 5%. These are synthetic results, not estimates of failure rates in deployed analyses.
Matrix generatorFrozen selectionRepeated selection
Poisson26.857%47/1752.343%41/1750
Gamma-Poisson18.600%93/5002.686%47/1750

On narrow screens, scroll the table sideways.

Assignment probabilities are exact. The reported averages depend on the 200 generated matrices and the recorded seed, 104729.

Two-sided symmetry and 70 assignments limit the valid rejection fraction to at most 2/70 at this threshold. This discreteness explains the conservative averages.

All 200 matrix results · Generator and experiment code

04 / REVIEW THE WHOLE CLAIM

What an expert review catches.

Correct calculations can answer the wrong question. A review connects the scientific claim, selection history, randomization procedure and implementation.

Trace the search into the test

The mean differences, maximum and tail counts can each be correct. Freezing a label-dependent winner changes the composed procedure.

Rerun selection over the fixed panel for this global test. A different conditional method needs its own justification.

Keep the claim at the right level

The global sharp null says treatment changes no measured feature for any unit. Rejection does not identify a particular affected gene.

Selected-gene inference, partial nulls and false discovery rate control need separate arguments.

The premises travel with the result.

A fixed panel and procedure

The 35-feature panel is constructed without an observed assignment. The same selection rule runs across all assignments.

The declared assignment law

All 70 four-of-eight assignments are equally likely. The real experiment must justify the randomization law being used.

The stated scientific claim

The test concerns a global sharp null. These eight units are not automatically interchangeable with eight cells from a study.

A recorded history is not a verified history. If someone first selects the winning column, a correct one-column analysis can still inherit that hidden selection.

The retained boundary check accepted all 70 false fixed-panel declarations. It refused all 70 truthful declarations of observed-assignment selection.

What does the formal result add—and what stays outside it?

The research includes a Lean-checked finite counting theorem for inclusive ranks, including ties. It establishes a precise property of finite score lists.

A mathematical argument connects that property to the error bound under a uniform assignment law and the global sharp null.

The proof does not cover the full Python/R workflow, panel-selection history, actual assignment mechanism, measurement quality or biological interpretation.

Strong differential tests and runtime checks each caught all eight seeded defects in the retained comparison. This establishes no superiority over strong testing.

This page replays exact precomputed results. It does not run Lean or certify a visitor’s dataset. The source receipts concern hypothetical assignment tables.

Inspect the exact method and source artifacts

For each feature, compute the absolute treated-minus-control mean difference. The retained implementation scales this by 4 × 4 = 16.

The global statistic is the maximum across the fixed panel. Count reference statistics greater than or equal to the observed statistic, including ties.

Divide that inclusive tail count by 70. No assignments are sampled, and no random numbers are generated in this page.

The displayed matrix and both R output tables are copied byte-for-byte. A separate Python calculation reproduces all 140 p-value rows.

Build-generated data also records all 2,450 feature-by-assignment scores. The browser selects from that table for the graphics.

Full scientific contract · Global R output · Frozen R output

Selection-history boundary · Testing comparison · Source identities and SHA-256 hashes

A scoped review / One scientific claim

Does your test replay your analysis?

Start with one research question and one workflow. Examine whether selection, filtering and randomization preserve the claim you intend to make.

Explore review and project work

Scope, feasibility and deliverables are agreed before work begins. This demo does not submit data or book a service.

Possible review deliverables

  • A map from the scientific claim to the implemented test.
  • A record of panel selection, assignment assumptions and unresolved premises.
  • An exact counterexample or focused differential checks where feasible.
  • A repair recommendation and a bounded assessment of whether proof work would help.