Learn R Programming

cNORM (version 3.6.1)

bb_distribution: 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)

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)).

Arguments

a

Alpha parameter (> 0).

b

Beta parameter (> 0).

n

Number of trials / maximum score.