Discrete Probability
Authors:
MArk Anthony Higgins - Sky Recursive Ai
MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: July 6th 2026
Revised Date: July 6th 2026
AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Discrete Probability — Foundational Ontology
VERSION: 1.0
DATE: 2026-10-11
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/discrete-probability.html
DOMAIN: Discrete Mathematics / Discrete Probability
SCOPE: Foundational parent-page model grounded in standard probability theory; live page content not independently verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library | https://kirethresearch.org
1. ONTOLOGY
flow "DiscreteProbability" v1.0 {
ENTITY SampleSpace : Set<Outcome>
ENTITY Outcome : AtomicEvent
ENTITY Event : Subset<SampleSpace>
ENTITY ProbabilityMeasure : Function<Event, Real[0,1]>
ENTITY DiscreteRandomVariable : Function<Outcome, CountableValue>
ENTITY ProbabilityMassFunction : Function<CountableValue, Real[0,1]>
ENTITY CumulativeDistributionFunction : Function<Real, Real[0,1]>
ENTITY JointDistribution : Function<Tuple, Real[0,1]>
ENTITY ConditionalProbability : Function<EventPair, Real[0,1]>
ENTITY Expectation : ExtendedReal
ENTITY Variance : ExtendedNonnegativeReal
ENTITY Independence : Predicate<EventPair>
ENTITY CountingMethod : Enumeration | Permutation | Combination
}
2. TYPED RELATIONSHIPS
SampleSpace CONTAINS Outcome
Event SUBSET_OF SampleSpace
ProbabilityMeasure ASSIGNS_PROBABILITY_TO Event
DiscreteRandomVariable MAPS Outcome TO CountableValue
ProbabilityMassFunction DESCRIBES DiscreteRandomVariable
CumulativeDistributionFunction DERIVED_FROM ProbabilityMassFunction
JointDistribution MODELS MultipleRandomVariables
ConditionalProbability CONDITIONS_ON Event
Expectation SUMMARISES DiscreteRandomVariable
Variance MEASURES_DISPERSION_OF DiscreteRandomVariable
CountingMethod SUPPORTS FiniteProbabilityCalculation
3. FORMAL SEMANTICS
Let Ω be finite or countable, F = P(Ω), and P : F -> [0,1].
P(Ω) = 1; P(∅) = 0; P(A) >= 0.
For pairwise disjoint A_i: P(⋃_i A_i) = Σ_i P(A_i).
P(Aᶜ) = 1 - P(A).
P(A ∪ B) = P(A) + P(B) - P(A ∩ B).
If A ⊆ B, then P(A) <= P(B).
For equiprobable finite outcomes: P(A) = |A| / |Ω|.
4. CONDITIONAL PROBABILITY AND INDEPENDENCE
If P(B) > 0: P(A | B) = P(A ∩ B) / P(B).
P(A ∩ B) = P(A | B)P(B), when P(B) > 0.
A and B independent iff P(A ∩ B) = P(A)P(B).
For partition {B_i} with P(B_i)>0:
P(A) = Σ_i P(A | B_i)P(B_i).
If P(A)>0:
P(B_j | A) = P(A | B_j)P(B_j) / Σ_i P(A | B_i)P(B_i).
Independence is not the same as mutual exclusivity.
Pairwise independence does not necessarily imply mutual independence.
5. DISCRETE RANDOM VARIABLES
For X: Ω -> S, S finite or countable:
p_X(x) = P(X=x); p_X(x)>=0; Σ_(x∈S) p_X(x)=1.
F_X(t) = P(X<=t) = Σ_(x<=t) p_X(x).
E[X] = Σ_x x p_X(x), when absolutely integrable.
E[g(X)] = Σ_x g(x)p_X(x), when integrable.
Var(X) = E[(X-E[X])²] = E[X²] - E[X]², when E[X²]<∞.
Var(aX+b) = a² Var(X).
E[aX+bY] = aE[X]+bE[Y], where expectations exist.
If X,Y independent with finite variances:
Var(X+Y) = Var(X)+Var(Y).
Otherwise: Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).
6. CANONICAL DISTRIBUTIONS
Bernoulli(p): P(X=1)=p; E[X]=p; Var(X)=p(1-p).
Binomial(n,p): P(X=k)=C(n,k)p^k(1-p)^(n-k), k=0,...,n.
Poisson(λ): P(X=k)=exp(-λ)λ^k/k!, k>=0, λ>0.
Geometric(p), trials until first success: P(X=k)=(1-p)^(k-1)p, k>=1.
Discrete uniform on n outcomes: P(X=x)=1/n.
Hypergeometric(N,K,n): P(X=k)=C(K,k)C(N-K,n-k)/C(N,n) for feasible k.
7. COUNTING AND COMBINATORICS
Product rule: |A×B|=|A||B| for finite sets.
Permutations: P(n,k)=n!/(n-k)!.
Combinations: C(n,k)=n!/[k!(n-k)!].
Inclusion-exclusion: |A∪B|=|A|+|B|-|A∩B|.
Counting formulas require explicitly stated replacement and ordering assumptions.
8. INFERENCE RULES
RULE Normalisation: valid_pmf(p) => Σ_x p(x)=1.
RULE Complement: P(A)=p => P(Aᶜ)=1-p.
RULE Monotonicity: A⊆B => P(A)<=P(B).
RULE IndependentProduct: independent(A,B) => P(A∩B)=P(A)P(B).
RULE ConditionalProduct: P(B)>0 => P(A∩B)=P(A|B)P(B).
RULE Marginalisation: p_X(x)=Σ_y p_(X,Y)(x,y).
RULE BayesUpdate: P(A)>0 and partition(B_i) => posterior formula in §4.
9. VALIDATION
CHECK sample_space is finite_or_countable.
CHECK all event operands are subsets of sample_space.
CHECK probability values lie in [0,1].
CHECK countable_additivity on disjoint events.
CHECK pmf is nonnegative and normalised.
CHECK conditional denominator is positive.
CHECK claimed independence is explicitly tested or assumed.
CHECK distribution parameters and support restrictions.
CHECK finite moments before using variance identities.
CHECK counting assumptions: ordered/unordered, replacement/no replacement.
CHECK numeric results against exact symbolic formulas when possible.
10. SEMANTIC_EQUIVALENCE
"discrete probability distribution" ≈ "probability mass function" when describing probabilities of individual countable values.
"expected value" ≡ "mathematical expectation".
"independent events" ≠ "mutually exclusive events".
"probability mass function" ≠ "probability density function".
"discrete sample space" ≠ "finite sample space" (countably infinite allowed).
11. CONFIDENCE
Mathematical identities: HIGH when hypotheses hold.
Model selection: CONDITIONAL on evidence and assumptions.
Empirical parameter estimates: DATA_DEPENDENT; no fabricated confidence scores.
12. FLOW_HASH
Canonicalise entity identifiers, ordered rules, assumptions, version and source URL.
FLOW_HASH = SHA256(canonical_utf8(flow_content_without_hash_value)).
Hash must be computed at deployment; do not substitute an invented digest.
13. UPDATE_MODEL
On source revision: inspect definitions, assumptions, examples and references.
On formal revision: increment version; rerun normalisation and identity checks.
Preserve provenance, prior version, change summary and review status.
14. AI_CONSUMPTION
Expose typed entities, machine-readable formula strings, assumptions and constraints.
Require explicit conditioning events and support for probabilistic queries.
Distinguish exact theorems from estimated probabilities.
Return derivation, assumptions, validation status and provenance with outputs.
Reject undefined conditional probabilities and unsupported independence claims.
END FLOW ALGEBRA