Skip to content

Family: Continuous Uniform #38

@LeonidElkin

Description

@LeonidElkin

Family: Continuous Uniform

Naming: Uniform or ContinuousUniform (continuous uniform distribution).

Task

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

Base parameterization

  • Base parameters: (a, b) with constraint a < b.

All other parameterizations must be expressed in terms of (a, b).

Other parameterizations and relations

  1. Center–radius parameterization (m, r):

    • Parameters:
      • m – center (real),
      • r > 0 – half-length.
    • Relation to base:
      • a = m - r
      • b = m + r
  2. Special case [0, θ] parameterization (θ):

    • Parameter: θ > 0.
    • Relation to base:
      • a = 0
      • b = θ

Any characteristic evaluation in alternative parameterizations should internally convert to (a, b).

Analytical characteristics (in terms of a, b)

Let n = b - a > 0.

  • pdf(x):

    • pdf(x) = 1 / n if a <= x <= b,
    • pdf(x) = 0 otherwise.
  • cdf(x):

    • cdf(x) = 0 if x < a,
    • cdf(x) = (x - a) / n if a <= x <= b,
    • cdf(x) = 1 if x > b.
  • ppf(u) (0 < u < 1):

    • ppf(u) = a + u * n.
  • cf(t) (characteristic function):

    • for t != 0: cf(t) = exp(i * t * a) * (exp(i * t * n) - 1) / (i * t * n),
    • for t = 0: cf(0) = 1.
  • mean:

    • mean = (a + b) / 2.
  • var:

    • var = n^2 / 12.

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions