{"id":51756737,"url":"https://github.com/ppad-tech/eproc","last_synced_at":"2026-07-19T07:39:49.365Z","repository":{"id":368900886,"uuid":"1259776782","full_name":"ppad-tech/eproc","owner":"ppad-tech","description":"Anytime-valid sequential testing and confidence sequences.","archived":false,"fork":false,"pushed_at":"2026-07-04T19:00:40.000Z","size":2264,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-19T07:39:48.447Z","etag":null,"topics":["confidence-sequence","haskell","hypothesis-testing","sequential-testing","statistics"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppad-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T21:07:39.000Z","updated_at":"2026-07-04T19:00:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ppad-tech/eproc","commit_stats":null,"previous_names":["ppad-tech/eproc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ppad-tech/eproc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Feproc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Feproc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Feproc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Feproc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppad-tech","download_url":"https://codeload.github.com/ppad-tech/eproc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppad-tech%2Feproc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35646061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-19T02:00:06.923Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["confidence-sequence","haskell","hypothesis-testing","sequential-testing","statistics"],"created_at":"2026-07-19T07:39:48.861Z","updated_at":"2026-07-19T07:39:49.353Z","avatar_url":"https://github.com/ppad-tech.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ppad-eproc\n\n[![](https://img.shields.io/hackage/v/ppad-eproc?color=blue)](https://hackage.haskell.org/package/ppad-eproc)\n![](https://img.shields.io/badge/license-MIT-brightgreen)\n[![](https://img.shields.io/badge/haddock-eproc-lightblue)](https://docs.ppad.tech/eproc)\n\nAnytime-valid sequential hypothesis testing and confidence sequences\nfor bounded random variables, via the e-process / betting framework\nof [Waudby-Smith \u0026 Ramdas (2024)][wsr24].\n\n## Usage\n\nA sample GHCi session:\n\n```\n  \u003e import qualified Numeric.Eproc.Bounded as Bounded\n  \u003e\n  \u003e -- hypothesis: E[X] = 0.5 for samples in [0, 1] at alpha = 1e-3, tested\n  \u003e -- with the Newton bettor. 'config' returns 'Either ConfigError Config'\n  \u003e -- and refuses inputs outside the mathematical regime.\n  \u003e let Right cfg = Bounded.config 0.5 0.0 1.0 1.0e-3 Bounded.Newton\n  \u003e let s0        = Bounded.initial cfg\n  \u003e\n  \u003e -- ten observations (drifting from hypothesis), and state afterwards\n  \u003e let xs  = [1, 1, 0, 1, 1, 0, 1, 1, 1, 1]\n  \u003e let s10 = foldl' (Bounded.update cfg) s0 xs\n  \u003e\n  \u003e -- inspect current and supremum-so-far log-wealth, and the stopping\n  \u003e -- decision, at any point\n  \u003e Bounded.log_wealth s10\n  0.6187772969384595\n  \u003e Bounded.log_wealth_sup s10\n  0.916290731874155\n  \u003e Bounded.decide cfg s10\n  Continue\n  \u003e\n  \u003e -- with enough evidence, the hypothesis is rejected\n  \u003e let s300 = foldl' (Bounded.update cfg) s0 (concat (replicate 30 xs))\n  \u003e Bounded.log_wealth_sup s300\n  51.14271142862292\n  \u003e Bounded.decide cfg s300\n  Reject\n```\n\nConfidence sequences invert the same machinery into time-uniform\ninterval estimates: valid at every sample size simultaneously, so you\ncan watch the interval shrink and stop whenever it's tight enough:\n\n```\n  \u003e import qualified Numeric.Eproc.ConfSeq as CS\n  \u003e\n  \u003e -- estimate a mean in [0, 1] at 95% coverage, on a 100-point grid\n  \u003e let Right cfg = CS.config 0.0 1.0 0.05 100\n  \u003e let s0        = CS.initial cfg\n  \u003e\n  \u003e -- the same drifting stream as above; the interval closes in on\n  \u003e -- its empirical mean of 0.8\n  \u003e let xs = concat (replicate 30 [1, 1, 0, 1, 1, 0, 1, 1, 1, 1])\n  \u003e CS.interval cfg (foldl' (CS.update cfg) s0 xs)\n  Just (0.7227722772277227,0.8712871287128713)\n```\n\nEvery test module also reports its evidence as an anytime-valid\np-value (`p_value`) and a normalized log e-value (`log_evalue`); the\n`Mixture` module combines several e-processes into a single test with\npower against a union of alternatives (see its haddocks for a worked\nsign-plus-magnitude example).\n\n## Documentation\n\nHaddocks (API documentation, etc.) are hosted at\n[docs.ppad.tech/eproc](https://docs.ppad.tech/eproc).\n\n## Performance\n\nThe aim is best-in-class performance for pure, highly-auditable Haskell\ncode.\n\nCurrent benchmark figures on an M4 Silicon MacBook Air look like (use\n`cabal bench` to run the benchmark suite):\n\n```\n  benchmarking Bounded.update (one step)/newton\n  time                 13.96 ns   (13.88 ns .. 14.04 ns)\n\n  benchmarking Bounded.update (1000-sample fold)/fixed\n  time                 7.951 μs   (7.944 μs .. 7.959 μs)\n\n  benchmarking Bounded.update (1000-sample fold)/adaptive\n  time                 12.69 μs   (12.68 μs .. 12.71 μs)\n\n  benchmarking Bounded.update (1000-sample fold)/newton\n  time                 14.61 μs   (14.57 μs .. 14.64 μs)\n\n  benchmarking Bernoulli.update (1000-sample fold)/newton\n  time                 14.64 μs   (14.63 μs .. 14.65 μs)\n\n  benchmarking Bernoulli.TwoSided.update (1000-sample fold)/newton\n  time                 14.83 μs   (14.81 μs .. 14.84 μs)\n\n  benchmarking Mixture.update (one step)/K=4\n  time                 31.38 ns   (31.21 ns .. 31.55 ns)\n\n  benchmarking ConfSeq.update (one step, g = 200)/plug-in\n  time                 2.121 μs   (2.118 μs .. 2.124 μs)\n\n  benchmarking ConfSeq.update (1000-sample fold, g = 200)/plug-in\n  time                 241.2 μs   (239.7 μs .. 243.2 μs)\n```\n\nThe `Paired` and `Bernoulli.TwoSided` modules are thin newtype\nwrappers over `Bounded`, and inline through with no measurable\noverhead. `ConfSeq` updates cost O(live grid candidates) per\nobservation, so long streams get cheaper as candidates are rejected\n(visible in the sub-linear fold figure above). See the criterion\nsuite for the full breakdown across `Fixed` / `Adaptive` / `Newton`\nbettors and per-step / fold workloads.\n\nYou should compile with the `llvm` flag for maximum performance.\n\n## Development\n\nYou'll require [Nix][nixos] with [flake][flake] support enabled. Enter a\ndevelopment shell with:\n\n```\n$ nix develop\n```\n\nThen do e.g.:\n\n```\n$ cabal repl ppad-eproc\n```\n\nto get a REPL for the main library.\n\n## References\n\n- Waudby-Smith \u0026 Ramdas (2024), \"[Estimating means of bounded random\n  variables by betting][wsr24].\" JRSS-B.\n- Ramdas, Grunwald, Vovk, Shafer (2023), \"[Game-theoretic statistics\n  and safe anytime-valid inference][rgvs23].\" Statistical Science.\n- Shafer (2021), \"[Testing by betting][shafer21].\" JRSS-A.\n\n[nixos]: https://nixos.org/\n[flake]: https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html\n[wsr24]: https://arxiv.org/abs/2010.09686\n[rgvs23]: https://arxiv.org/abs/2210.01948\n[shafer21]: https://arxiv.org/abs/1909.03807\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppad-tech%2Feproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppad-tech%2Feproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppad-tech%2Feproc/lists"}