Skip to main content

Hypergeometric Distribution Ontology

Discrete Probability
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Hypergeometric Distribution Ontology
DOMAIN: Discrete Mathematics / Discrete Probability
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/discrete-probability/hypergeometric-distribution-ontology.html
VERSION: 1.0
LANGUAGE: en-GB
AUTHORSHIP: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library | https://kirethresearch.org
SOURCE_STATUS: Mathematical synthesis; live source page not independently verified.

1. ONTOLOGY
ontology HypergeometricDistribution:
  subclass_of: DiscreteProbabilityDistribution
  describes: Number of successes in a fixed-size simple random sample without replacement from a finite population
  notation: X ~ Hypergeometric(N, K, n)

2. TYPED ENTITIES
  N: Integer                 # population size
  K: Integer                 # number of population successes
  n: Integer                 # sample size
  X: DiscreteRandomVariable  # successes observed in sample
  k: Integer                 # observed success count
  p: Rational                # K/N, when N > 0
  support: IntegerInterval
  pmf: ProbabilityMassFunction
  cdf: CumulativeDistributionFunction
  expectation: Real
  variance: NonNegativeReal

3. PRECONDITIONS AND DOMAIN
  require N >= 1
  require 0 <= K <= N
  require 0 <= n <= N
  lower = max(0, n - (N - K))
  upper = min(n, K)
  support(X) = {k in Z | lower <= k <= upper}
  choose(a,b) = a! / (b! * (a-b)!) for integers 0 <= b <= a

4. PROBABILITY MASS FUNCTION
  P(X = k) = choose(K,k) * choose(N-K,n-k) / choose(N,n)
  for k in support(X); otherwise P(X=k)=0
  rationale: favourable samples / all equally likely size-n samples

5. CUMULATIVE AND TAIL PROBABILITIES
  F(t) = P(X <= t) = sum_{k in support(X), k <= floor(t)} P(X=k)
  P(X >= t) = sum_{k in support(X), k >= ceil(t)} P(X=k)
  P(a <= X <= b) = F(b) - P(X < a)

6. MOMENTS
  E[X] = n*K/N
  Var(X) = n*(K/N)*(1-K/N)*(N-n)/(N-1) for N > 1
  Var(X) = 0 for N = 1 (admissible samples are deterministic)
  finite_population_correction = (N-n)/(N-1), N > 1
  E[X*(X-1)] = n*(n-1)*K*(K-1)/(N*(N-1)) for N > 1

7. SEMANTIC RELATIONSHIPS
  HypergeometricDistribution --is_a--> DiscreteProbabilityDistribution
  HypergeometricDistribution --models--> SamplingWithoutReplacement
  HypergeometricDistribution --uses--> BinomialCoefficient
  HypergeometricDistribution --has_parameter--> PopulationSize
  HypergeometricDistribution --has_parameter--> SuccessCount
  HypergeometricDistribution --has_parameter--> SampleSize
  HypergeometricDistribution --contrasts_with--> BinomialDistribution
  HypergeometricDistribution --supports--> FisherExactTest
  HypergeometricDistribution --connects_to--> ContingencyTable

8. ALGEBRAIC IDENTITIES AND TRANSFORMATIONS
  sum_{k=lower}^{upper} choose(K,k)*choose(N-K,n-k) = choose(N,n)
  # Vandermonde's identity implies PMF normalisation.
  If X ~ Hypergeometric(N,K,n), then n-X ~ Hypergeometric(N,N-K,n)
  If X ~ Hypergeometric(N,K,n), then K-X ~ Hypergeometric(N,K,N-n)
  For N>0, E[X] = n*K/N
  When n=N, X=K almost surely.
  When K=0, X=0 almost surely.
  When K=N, X=n almost surely.
  When n=0, X=0 almost surely.

9. INFERENCE RULES
  rule ValidParameters:
    if N>=1 and 0<=K<=N and 0<=n<=N then distribution_defined=true
  rule ValidObservation:
    if lower<=k<=upper and k is integer then pmf_evaluable=true
  rule SamplingDependence:
    if sample_without_replacement then trial_independence_not_assumed
  rule BinomialApproximation:
    if N is large relative to n and K/N approximately stable then
      X approximately Binomial(n,K/N)
    note: approximation quality depends on sampling fraction and parameters
  rule ComplementarySuccess:
    if X=k then sample_failures=n-k

10. VALIDATION
  assert all(P(X=k)>=0 for k in support(X))
  assert sum(P(X=k) for k in support(X)) == 1
  assert 0<=E[X]<=n
  assert Var(X)>=0
  assert lower<=upper
  assert P(X=k)==0 for k outside support(X)
  implementation_note: compare floating-point results with numerical tolerance
  implementation_note: use log-gamma or stable combinatorial evaluation for large N

11. WORKED EXAMPLE
  Population N=20, successes K=7, sample n=5.
  P(X=2) = choose(7,2)*choose(13,3)/choose(20,5)
         = 6006/15504 approximately 0.38738
  E[X] = 5*7/20 = 1.75
  Var(X) = 5*(7/20)*(13/20)*(15/19) approximately 0.89803

12. SEMANTIC_EQUIVALENCE
  "hypergeometric law" == "hypergeometric distribution" (probability context)
  "successes in a sample without replacement" ~= "hypergeometric count" (when finite population and uniform sampling conditions hold)
  "sampling without replacement" != "independent Bernoulli trials"

13. CONFIDENCE
  formal_definitions: 1.00
  established_identites: 1.00
  example_arithmetic: validate_numerically
  live_page_alignment: unverified
  rule: Confidence metadata is evidence annotation, not proof of mathematical validity.

14. FLOW_HASH
  algorithm: SHA-256
  canonicalisation: UTF-8, LF line endings; exclude FLOW_HASH value itself
  value: COMPUTE_ON_PUBLICATION

15. UPDATE_MODEL
  change_policy: versioned, review mathematical assertions and source alignment
  triggers: source_page_revision, correction, notation_change, new_validated_rule
  preserve: prior_version, provenance, validation_results

16. AI_CONSUMPTION
  machine_readable_intent: typed probabilistic reasoning and retrieval
  retrieval_keys: [hypergeometric, finite_population, sampling_without_replacement, pmf, cdf, expectation, variance]
  guardrails: enforce parameter constraints; distinguish exact law from binomial approximation
  output: {parameters, support, probability, derivation, assumptions, confidence, provenance}

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ