update_beta_binomial

function update_beta_binomial(x:Integer, n:Integer, α:Real, β:Real) -> (Real, Real)

Update the parameters of a Beta distribution with a Binomial likelihood.

  • x: The variate.
  • n: Number of trials.
  • α: Prior first shape.
  • β: Prior second shape.

Returns: the updated parameters α and β.