# The Beta-Bernoulli process and algebraic effects

arXiv: https://arxiv.org/abs/1802.09598 · HTML: https://mlsanity.com/paper/1802.09598/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 26 Feb 2018.

## Built on by (most cited first, 3 of 3)

- [Scaling Integer Arithmetic in Probabilistic Programs](https://mlsanity.com/paper/2307.13837/) (2023)
- [Compositional Semantics for Probabilistic Programs with Exact Conditioning](https://mlsanity.com/paper/2101.11351/) (2021)
- [BTFL: A Bayesian-based Test-Time Generalization Method for Internal and External Data Distributions in Federated learning](https://mlsanity.com/paper/2503.06633/) (2025)

## Abstract (arXiv)

In this paper we use the framework of algebraic effects from programming language theory to analyze the Beta-Bernoulli process, a standard building block in Bayesian models. Our analysis reveals the importance of abstract data types, and two types of program equations, called commutativity and discardability. We develop an equational theory of terms that use the Beta-Bernoulli process, and show that the theory is complete with respect to the measure-theoretic semantics, and also in the syntactic sense of Post. Our analysis has a potential for being generalized to other stochastic processes relevant to Bayesian modelling, yielding new understanding of these processes from the perspective of programming.
