# Mendel (1866) 3:1 ratio: reproducible research package

A re-analysis of the seven single-character pea experiments in Gregor Mendel's *Versuche über Pflanzen-Hybriden* (1866) against the theoretical 3:1 ratio, and of the "too good to be true" controversy that began with R. A. Fisher in 1936.

Start with `REPORT.md`.

## Contents

| Path | What it holds |
|---|---|
| `REPORT.md` | Findings, tables, figures, the consistency-versus-proof distinction, the controversy, verification results, limitations |
| `data/raw/` | Three transcriptions of the 1866 German text, unmodified |
| `data/curated/` | Mendel's counts as CSV tables |
| `data/published_benchmarks/` | Published numbers used only as cross-checks |
| `data/PROVENANCE.md` | Source URLs, checksums, licences, known transcription errors |
| `code/` | `01` curated tables, `02` source verification, `03` statistics, `04` figures, `05` report, `06` determinism check, `00` optional benchmark parser |
| `results/` | Every computed table and summary (CSV and JSON) |
| `figures/` | Three figures, PNG (300 dpi) and PDF |
| `references/` | Reference list, how each source was used, raw bibliographic records |
| `environment/` | Software versions |
| `MANIFEST.sha256` | Checksum of every file in the package |
| `science.json` | Machine-readable index of the package |

## Re-running

```
python -m pip install -r environment/requirements.txt
python run_all.py                      # about 20 s; rewrites data/curated, results, figures, REPORT.md
python code/06_check_determinism.py    # optional: runs the pipeline twice and compares checksums
```

Python 3.10 or later. No network access is needed. `MENDEL_MC_REPS` sets the number of Monte Carlo replicates (default 1,000,000; seed 1866). With a different NumPy version the simulated probabilities may differ in the last digits; the exact statistics do not depend on the simulation.

## Where to find each result

| Question | File |
|---|---|
| Expected counts, chi-square and P for each of the seven experiments | `results/f2_chi_square_tests.csv` |
| Pooled and summed statistics | `results/f2_summary.json` |
| Which other ratios the data cannot reject | `results/alternative_ratio_tests.csv` |
| Fisher's group totals, recomputed and as printed | `results/fisher_1936_groups_reproduction.csv` |
| The 84 two-class tests | `results/binomial84_tests.csv` |
| Progeny tests against 2:1 and Fisher's corrected ratio | `results/f3_progeny_tests.csv` |
| Controversy statistics and sensitivity analyses | `results/controversy_summary.json` |
| Simulation results | `results/monte_carlo_summary.json` |
| Checks against the raw transcriptions | `results/source_verification.csv`, `results/source_verification_summary.json` |
| Checks against published values | `results/verification_report.json` |

## Reading the results

"Consistent with 3:1" means that a goodness-of-fit test does not reject 3:1. It is not a proof of 3:1. The report's section "Consistency is not proof" sets out what the data can and cannot establish, and separates it from the mathematical derivation of 3:1 from Mendel's model.

## Format

This `.science` file is an ordinary ZIP archive; renaming it to `.zip` opens it with any archive tool. `science.json` is an index written for this package and does not follow an external schema.

## Licences and reuse

Mendel's text is in the public domain. The Deutsches Textarchiv transcription in `data/raw/` is CC BY-SA 4.0. The curated tables, code, results, figures and report were produced for this package. Publications cited as benchmarks are not redistributed; `data/PROVENANCE.md` gives their URLs and the checksums of the copies used.
