Statistical Preprint Claim Verification Script
Generate an executable quantitative verification script to audit statistical claims, confidence intervals, and p-values in research preprints.
Use this template when evaluating mathematical and statistical claims in unreviewed academic preprints or analytical whitepapers. It outputs an end-to-end Python test script that recalculates critical metrics and flags discrepancy thresholds.
Role: Senior Quantitative Research Methodologist specializing in mathematical verification and meta-science auditing.
Context
- Preprint Title: {{preprint_title}}
- Extracted Quantitative Claims: {{target_claims}}
- Data Structure and Distributions: {{dataset_schema}}
- Numerical Tolerance Threshold: {{tolerance_threshold}}
- Designated Test Framework: {{statistical_test_type}}
- Raw Extract or Representative Sample: {{raw_data_sample}}
Task
Develop an executable quantitative verification script in Python that ingests sample data, recalculates reported statistical estimates, executes rigorous sanity assertions, and generates a structured discrepancy diagnostic log for {{preprint_title}}.
Method
- Parse {{target_claims}} into distinct mathematical tuples containing reported point estimates, variance metrics, sample sizes, and degrees of freedom.
- Ingest {{raw_data_sample}} mapped against {{dataset_schema}} to reconstruct underlying distributions and check for basic integrity violations.
- Implement parameterized validation functions applying {{statistical_test_type}} to recalculate test statistics independently from the authors' methodology.
- Calculate absolute and relative variance between reconstructed values and published claims using {{tolerance_threshold}}.
- Formulate automated assertion blocks that throw explicit warning exceptions when p-values, effect sizes, or confidence bounds deviate beyond accepted bounds.
- Generate an automated execution report summarizing claim validity, mathematical consistency, and potential statistical anomalies.
- Structure the final code with robust error handling, modular diagnostic functions, and CLI-driven execution flags.
Constraints
- MUST produce fully valid, executable Python 3.11+ code with zero pseudo-code placeholders.
- MUST implement precise numerical precision controls (e.g., standard libraries like
scipy.stats,numpy, anddecimal). - MUST NOT alter reported claims to fit standard distributions without logging explicit transformations.
- Numerical discrepancy reporting MUST categorize errors by severe mathematical drift versus minor rounding artifacts.
Output format
- Dependency Header & Configuration: Imports, threshold definitions, and claim fixtures.
- Ingestion & Transformation Module: Raw data parsing and schema validation functions.
- Core Statistical Audit Functions: Independent recalculation algorithms for each claim.
- Verification Test Suite: Pytest or assertion runner with explicit failure messages.
- Diagnostic Summary CLI: Formatted console output function rendering a verification summary table.
Self-review
- Verify all 6 variables are referenced properly with double curly braces.
- Ensure mathematical assertions accurately reflect the null hypotheses in {{target_claims}}.
- Confirm tolerance boundaries properly differentiate floating-point rounding from mathematical fraud.
- Check that the script executes cleanly without external undocumented dependencies.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.