Skip to content

Family: Binomial #46

@LeonidElkin

Description

@LeonidElkin

Family: Binomial

Naming: Binomial (binomial distribution).

Task

Implement the binomial family as a ParametricFamily, add all parameterizations and analytical characteristics, and register the family in the registry.

Base parameterization

  • Base parameters: (n, p):
    • n in ℕ (number of trials),
    • 0 < p < 1 (success probability).

Support: k in {0, 1, …, n}.

Other parameterizations and relations

  1. Logit parameterization (n, η):

    • Parameters: n in ℕ, η in ℝ.
    • Relations to base:
      • p = 1 / (1 + exp(-η))
      • η = log(p / (1 - p)).
  2. Mean parameterization (n, μ):

    • Parameters: n in ℕ, μ such that 0 < μ < n.
    • Relations to base:
      • p = μ / n
      • μ = n * p.

All characteristics should be defined in terms of (n, p).

Analytical characteristics (in terms of n, p)

  • pmf(k) for integer 0 <= k <= n:

    • pmf(k) = C(n, k) * p^k * (1 - p)^(n - k),
      where C(n, k) is the binomial coefficient.
  • cdf(k):

    • cdf(k) = sum_{j=0}^k pmf(j).
  • ppf(u) for 0 < u < 1:

    • ppf(u) is the smallest integer k in {0, …, n} such that cdf(k) >= u.
  • cf(t):

    • cf(t) = (1 - p + p * exp(i * t))^n.
  • mean:

    • mean = n * p.
  • var:

    • var = n * p * (1 - p).

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions