bb_distribution: Beta-binomial distribution on the full support 0:n

View source: R/betaBinomial.R

bb_distributionR Documentation

Beta-binomial distribution on the full support 0:n

Description

Computes the (normalized) probability mass function, the cumulative distribution function and mid-p percentiles of a beta-binomial distribution in a numerically stable way (log space).

Usage

bb_distribution(a, b, n)

Arguments

a

Alpha parameter (> 0).

b

Beta parameter (> 0).

n

Number of trials / maximum score.

Value

A list with elements x (support 0:n), Px (pmf), cum (cdf) and perc (mid-p percentiles, i.e. P(X < x) + 0.5 * P(X = x)).


cNORM documentation built on July 13, 2026, 5:08 p.m.