AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
PROBABILITY MASS FUNCTION ONTOLOGY
Version: 1.0
Date: 2026-10-13
Authors: Mark Higgins — Sky (Recursive AI)
Publisher: Kireth Research
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/probability-entities/probability-mass-function-ontology-2.html
1. PURPOSE
Represent a probability mass function (PMF) as a typed mathematical entity associated with a discrete random variable, its countable support, and a probability measure. Enable mathematical validation, exact inference, and semantic retrieval.
2. ENTITY TYPES
ProbabilitySpace := (Omega, Sigma, P)
DiscreteRandomVariable := measurable X: Omega -> S, where S is finite or countable
Support := {x in S | p_X(x) > 0}
ProbabilityMassFunction := p_X: S -> [0,1]
Event := A in Sigma
CumulativeDistributionFunction := F_X(t) = P(X <= t), for ordered numeric S
JointPMF := p_(X,Y)(x,y)
ConditionalPMF := p_(X|Y)(x|y), where P(Y=y)>0
3. DEFINING EQUATIONS
PMF_VALUE: p_X(x) = P({omega in Omega : X(omega)=x})
NONNEGATIVITY: forall x in S, p_X(x) >= 0
NORMALISATION: sum_(x in S) p_X(x) = 1
EVENT_PROBABILITY: P(X in A) = sum_(x in A intersect S) p_X(x)
CDF: F_X(t) = sum_(x in S, x <= t) p_X(x)
EXPECTATION: E[g(X)] = sum_(x in S) g(x)p_X(x), provided sum |g(x)|p_X(x) < infinity
MEAN: E[X] = sum x p_X(x), when integrable
VARIANCE: Var(X) = sum (x-E[X])^2 p_X(x), when finite
JOINT_TO_MARGINAL: p_X(x) = sum_y p_(X,Y)(x,y)
CONDITIONAL: p_(X|Y)(x|y) = p_(X,Y)(x,y)/p_Y(y), if p_Y(y)>0
INDEPENDENCE: X independent Y iff p_(X,Y)(x,y)=p_X(x)p_Y(y) for all x,y
4. TYPED RELATIONSHIPS
DiscreteRandomVariable --HAS_DISTRIBUTION--> ProbabilityMassFunction
ProbabilityMassFunction --DEFINED_ON--> CountableStateSpace
ProbabilityMassFunction --INDUCED_BY--> ProbabilityMeasure
ProbabilityMassFunction --ASSIGNS_MASS_TO--> OutcomeValue
ProbabilityMassFunction --DETERMINES--> CumulativeDistributionFunction
JointPMF --MARGINALISES_TO--> ProbabilityMassFunction
JointPMF --CONDITIONS_TO--> ConditionalPMF [positive conditioning mass required]
ProbabilityMassFunction --SUPPORTS_CALCULATION_OF--> Expectation
5. INFERENCE RULES
R1: If all p(x)>=0 and sum_x p(x)=1 over a finite/countable S, infer VALID_PMF(p,S).
R2: If VALID_PMF(p,S), infer P(X in A)=sum_(x in A intersect S)p(x).
R3: If VALID_PMF(p,S) and S ordered numeric, infer F(t)=sum_(x<=t)p(x).
R4: If VALID_JOINT_PMF(q,SxT), infer p_X(x)=sum_y q(x,y) and p_Y(y)=sum_x q(x,y).
R5: If p_Y(y)>0, infer p_(X|Y)(x|y)=q(x,y)/p_Y(y).
R6: If sum_x |g(x)|p(x)<infinity, infer E[g(X)]=sum_x g(x)p(x).
R7: If joint masses factorise at every pair, infer independence; otherwise do not infer independence from marginals alone.
6. EXAMPLES
BERNOULLI: S={0,1}; p(1)=theta, p(0)=1-theta; 0<=theta<=1.
BINOMIAL: S={0,...,n}; p(k)=C(n,k)theta^k(1-theta)^(n-k); n nonnegative integer.
POISSON: S={0,1,...}; p(k)=exp(-lambda)lambda^k/k!; lambda>0.
FINITE_EXAMPLE: S={1,2,3}; p(1)=0.2, p(2)=0.3, p(3)=0.5; P(X>=2)=0.8; E[X]=2.3.
7. SEMANTIC DISTINCTIONS
PMF is point probability for a discrete variable, not a probability density function (PDF).
A continuous random variable with a density has P(X=x)=0 at each point, so its density value is not point probability.
A PMF is not a cumulative distribution function; a CDF accumulates mass.
The support excludes zero-mass values, although the declared state space may include them.
A countably supported distribution may have infinite support; summation convergence must be handled.
Mixed distributions may contain atoms and a continuous component and cannot in general be represented by a PMF alone.
8. VALIDATION
CHECK V1: S is finite or countable and outcomes are consistently typed.
CHECK V2: All mass values are real, finite and nonnegative.
CHECK V3: Sum of masses equals one (exactly for symbolic inputs, within declared tolerance for numeric inputs).
CHECK V4: Conditional distributions are computed only for positive conditioning probability.
CHECK V5: Moment calculations state their integrability or finiteness assumptions.
CHECK V6: Preserve distinctions among PMF, PDF, CDF, and probability measure.
CHECK V7: Reject unsupported inferences and record unresolved assumptions.
9. CONFIDENCE
confidence.mathematical_axioms = 1.0 when assumptions and formal proofs are satisfied
confidence.numerical_results = dependent on precision, convergence and error bounds
confidence.empirical_parameters = dependent on provenance and estimation uncertainty
Never equate semantic similarity with proof of mathematical equivalence.
10. SEMANTIC_EQUIVALENCE
Equivalent terms: probability mass function; discrete probability mass function; discrete probability function (when explicitly defined as p_X).
Not universally equivalent: probability distribution; probability density function; likelihood function; frequency table.
Identity requires matching outcome space and mass assignments (up to an explicit outcome relabelling).
11. FLOW_HASH
Canonicalise ontology identifier, version, entity definitions, equations, typed relationships, and inference rules; serialise deterministically as UTF-8; compute SHA-256 over canonical bytes. Store algorithm, canonicalisation version, and digest. A hash identifies content, not mathematical correctness.
12. UPDATE_MODEL
On changes to support, mass values, constraints, or version: revalidate normalisation and nonnegativity; recompute affected marginals, conditionals and moments; update provenance; regenerate FLOW_HASH; preserve prior version for audit.
13. AI_CONSUMPTION
Input: typed variable, countable outcome domain, symbolic or numeric mass assignments, optional joint distribution and query.
Process: type-check -> validate axioms -> select permitted inference rules -> calculate -> attach assumptions, provenance, and confidence.
Output: typed results, formulas, validation status, uncertainty/error where applicable, source ontology URL, version, and flow hash.
Guardrails: no unsupported conversion between mass and density; no conditioning on zero-probability events by the elementary ratio formula; no moment inference without existence checks.
END FLOW ALGEBRA