# Cumulative probability that a zero-effort impostor is accepted within N attempts,
# given the false match rate (FMR) limit of NIST SP 800-63B-4 (1 in 10,000) and the
# attempt caps in the same section (50 consecutive failures, or 100 with PAD).
# Assumes independent attempts: a simplification, stated in the study.
import json
fmr = 1 / 10_000
out = {"fmr": fmr, "assumption": "independent attempts, zero-effort impostor"}
out["cumulative_acceptance"] = {n: round(1 - (1 - fmr) ** n, 6) for n in (1, 5, 10, 50, 100)}
# Published benchmark drops (inputs are the published figures, not measured here)
out["dfdc_accuracy_drop_points"] = round(82.56 - 65.18, 2)
json.dump(out, open("results.json", "w"), indent=1)
print(json.dumps(out, indent=1))
