# Pre-registration (written before any digit histogram was computed)

Written 2026-10-02 (Europe/London), before running `data/aggregate.py`. Nothing below was changed after seeing a result; changes after that point are listed under "Amendments".

## Question

Does the first-digit law describe the values the Romanian state records, and what does a purchase cap do to it? The page does not test any authority for fraud.

## Data (all from data.gov.ro, licence CC BY 4.0, SEAP/SICAP exports; URLs and SHA-256 in `data/manifest.json`)

| Window | Role | Direct purchases (cumpărări directe) | Published contracts (contracte) | Cap in force (without VAT, goods and services) |
| --- | --- | --- | --- | --- |
| W1: 2022 Q1 | before the cap doubled | `raport-achizitii-directe-t1-2022.csv` | `raport-contracte-t1-2022.csv` | 135,060 lei |
| W2: 2023 Q4 | primary, after the doubling | `datagov-raport-achizitii-directe-t-iv-2023.csv` | `datagov-raport-contracte-publicate-t-iv-2023.csv` | 270,120 lei |
| W2b: 2023 Q3 | robustness, same law | `datagov-raport-achizitii-directe-t-iii-2023.csv` | `datagov-raport-contracte-publicate-t-iii-2023.csv` | 270,120 lei |
| W3: 2024 Q2 | replication of W2 | `datagov-raport-achizitii-directe-t-ii-2024.csv` | `datagov-raport-contracte-publicate-t-ii-2024.csv` | 270,120 lei |

The cap went from 135,060 to 270,120 lei (works 450,200 to 900,400) by Law 208/2022 (passed 11 July 2022, Monitorul Oficial 697 of 12 July 2022, applicable from 10 September 2022). W1 ends before it, W2 and W3 start after it.

## Rules fixed in advance

1. Direct purchases: column `VALOARE_ATRIBUITA_RON` (awarded value), rows with `STARE_ACHIZITIE` = "Oferta acceptata" and value > 0. Duplicates removed on `NUMAR_ACHIZITIE_DIRECTA` within a window (an award published on the last day of a quarter can appear in the next file).
2. Contracts: column `Valoare contract (RON)`, value > 0, one row per (contract number, lot, value). Framework agreements ("Incheierea unui acord-cadru") and subsequent contracts ("Cu acord cadru subsecvent") are reported as separate populations and never pooled silently. The thousands separator in the export is a comma inside quotes ("417,185"); it is read as a thousands separator, and this is checked against rows that have several commas.
3. Leading digit and second digit are read from the integer part of the value in lei.
4. Statistic: mean absolute deviation (MAD) of the 9 first-digit shares from log10(1 + 1/d), with N, and Nigrini's cut-offs (0.006 / 0.012 / 0.015) quoted as his conventions, not as laws. Effect size w = sqrt(chi² / N). The chi² p-value is reported only to say it is useless at this N (it is zero to any printed precision).
5. No authority, supplier or person is ranked by deviation. Any breakdown is anonymous and shown as deviation against N with its sampling band.
6. Round-value share: share of rows whose value is a multiple of 1,000 lei, reported per window and per population.

## Predictions

- P1: published contracts (many procedures, no cap, values from lei to hundreds of millions) sit closer to the first-digit law than direct purchases.
- P2: direct purchases do not conform (MAD above 0.015) in every window, from the cap and from round-number pricing, and this says nothing about fraud.
- P3: moving the cap from 135,060 to 270,120 lei moves the notch in the log-scale picture of direct purchases from mantissa 0.131 (log10 of 135,060) to 0.431 (log10 of 270,120); the share of six-digit awards above 135,060 lei is about zero in W1 and clearly above zero in W2 and W3.
- P4: W2 and W3 agree with each other within the sampling band.

A prediction that fails is reported as failed.

## Amendments

All four were made on 2 Oct 2026 before `aggregate.py` had run on any window; they come from reading file headers and the cap law, not from digit counts.

1. Direct purchases whose CPV code starts with 45 (construction works) are a separate population: the law gives works their own cap (450,200 lei before July 2022, 900,400 after). The main direct-purchase population is goods and services.
2. Contract rows are deduplicated on (contracting authority CUI, contract number, lot, value), not on contract number alone, because contract numbers are only unique per authority.
3. Values below 1 lei are excluded and counted, so the leading digit of the integer part always exists.
4. The 2022 contracts file has no value for some rows; those are counted and excluded, never treated as zero. The three contract types in the file (without framework agreement, framework agreement, subsequent contract) are three populations.
5. Correction of a source error, same day: the first draft named Law 256/2022 (a different law, found by mistake in a search); the threshold change is Law 208/2022, applicable from 10 September 2022. The windows are unaffected.
6. Made after the first run crashed on a schema difference and before any W2, W2b or W3 histogram existed (W1 had been processed but not read): the 2023 Q3 direct-purchase file has a different layout from every other quarter (delimiter `|`, no status column, value column `VALOARE_ACHIZITIE`), so it cannot satisfy rule 1 like for like. The primary post-doubling window is therefore 2023 Q4 alone (same layout and status rule as W1 and W3), and 2023 Q3 is reported separately as W2b with its own column mapping and no status filter. Column names are matched after normalisation because the four file layouts differ.
7. Exploratory analyses, chosen after the first results were seen and therefore not tests of a prior hypothesis: the last-digit chart and round-value shares, the per-authority funnel (restricted to authorities with at least 110 awards, where every expected digit count is at least 5), the detectability bound, the 2,500-lei value bins around the cap, and the Q4 2023 versus Q2 2024 homogeneity test. P3 is graded on exact legal edges (below), added after the first run because the 2,500-lei bin edge does not coincide with the cap: awards from 100,000 to 135,059.99 lei, from 135,060 to 270,119.99 lei, and from 270,120 lei up. The notch-in-mantissa half of P3 was not evaluated.
8. After a review, 2 Oct 2026: contract rows sharing (authority CUI, contract number, lot, value) are collapsed to one. In W2 contracts, 8,056 such groups have more than one row, and 8,016 of them differ in supplier: they are mostly one framework agreement listed once per supplier, so one value is counted once. Counting each supplier row was not tested. Direct-purchase deduplication now marks an award number as seen only after a row has been counted (no digit count changed).
