update_beta_negative_binomial

function update_beta_negative_binomial(x:Integer, k:Integer, α:Real, β:Real) -> (Real, Real)

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

  • x: The variate.
  • k: Number of successes.
  • α: Prior first shape.
  • β: Prior second shape.

Returns: the posterior hyperparameters α' and β'.