Skip to main content

Random Variable Ontology

Probability Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 13 October 2026
Audio Overview
FLOW ALGEBRA
RANDOM VARIABLE ONTOLOGY
Kireth Semantic Library | Entity Graph | Mathematical Entities | Probability Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/probability-entities/random-variable-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13

1. PURPOSE
Formalise random variables as measurable functions on probability spaces, their distributions, transformations, relationships and valid probabilistic inferences.

2. TYPED ENTITIES
ProbabilitySpace := (Omega, F, P)
SampleSpace := Omega : Set[Outcome]
SigmaAlgebra := F : SigmaAlgebra[Omega]
ProbabilityMeasure := P : F -> [0,1]
RandomVariable[X] := measurable function X : Omega -> S
MeasurableCodomain := (S, SigmaS)
RealRandomVariable := X : Omega -> R with Borel sigma-algebra
DiscreteRandomVariable := X with countable support
ContinuousRandomVariable := X whose distribution admits a density relative to Lebesgue measure
MixedRandomVariable := X whose law contains both atomic and non-atomic components
Distribution := mu_X : SigmaS -> [0,1]
CDF := F_X : R -> [0,1]
PMF := p_X : S -> [0,1] (countable support)
PDF := f_X : R -> [0,infinity) (when density exists)
Expectation := E[X] (when integrable or extended expectation well-defined)
Variance := Var(X) (when second moment finite)
JointRandomVector := (X_1,...,X_n)

3. AXIOMS AND DEFINITIONS
RV-01: F is a sigma-algebra on Omega; P(Omega)=1 and P is countably additive.
RV-02: X is measurable iff X^{-1}(B) in F for every B in SigmaS.
RV-03: mu_X(B) = P(X^{-1}(B)); the distribution is the pushforward X_*P.
RV-04: For real X, F_X(x)=P(X<=x), nondecreasing, right-continuous, with limits 0 and 1 at negative and positive infinity.
RV-05: For discrete X, p_X(x)=P(X=x), p_X(x)>=0 and sum_x p_X(x)=1.
RV-06: If X has a PDF, P(X in B)=integral_B f_X(x) dx; f_X>=0 almost everywhere and integral_R f_X dx=1.
RV-07: A continuous CDF alone does not imply existence of a PDF (singular laws exist).
RV-08: E[g(X)] = integral_S g(s) mu_X(ds), subject to integrability or valid extended integral conditions.
RV-09: Var(X)=E[(X-E[X])^2]=E[X^2]-E[X]^2 if E[X^2]<infinity.
RV-10: Equality almost surely differs from pointwise equality; equality in distribution does not imply almost-sure equality.

4. RELATIONSHIPS
RandomVariable --DEFINED_ON--> ProbabilitySpace
RandomVariable --MAPS_OUTCOME_TO--> MeasurableCodomain
RandomVariable --REQUIRES--> Measurability
RandomVariable --INDUCES--> Distribution
Distribution --DESCRIBED_BY--> CDF
DiscreteRandomVariable --MAY_HAVE--> PMF
AbsolutelyContinuousRandomVariable --HAS--> PDF
RandomVariable --MAY_HAVE--> Expectation
RandomVariable --MAY_HAVE--> Variance
RandomVariable --COMBINES_WITH--> JointRandomVector
JointRandomVector --INDUCES--> JointDistribution
JointDistribution --MARGINALISES_TO--> MarginalDistribution
RandomVariable --TRANSFORMED_BY--> MeasurableFunction

5. TRANSFORMATION RULES
T-01: If g:S->T is measurable, Y=g(X) is a random variable.
T-02: Law(g(X))=g_*(Law(X)).
T-03: E[aX+b]=aE[X]+b when X integrable and a,b finite.
T-04: Var(aX+b)=a^2 Var(X) when variance exists.
T-05: For independent integrable X,Y, E[XY]=E[X]E[Y] if XY integrable (e.g. both square-integrable).
T-06: For square-integrable X,Y, Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).
T-07: Independence implies zero covariance when covariance exists; converse is false in general.

6. INFERENCE RULES
I-01: VALID_PROBABILITY_SPACE and MEASURABLE(X) => VALID_RANDOM_VARIABLE(X).
I-02: VALID_RANDOM_VARIABLE(X) => EXISTS_UNIQUE_PUSHFORWARD_DISTRIBUTION(X).
I-03: DISCRETE(X) and NORMALISED_PMF(X) => VALID_DISCRETE_LAW(X).
I-04: NONNEGATIVE_DENSITY(f) and INTEGRAL(f)=1 => VALID_ABSOLUTELY_CONTINUOUS_LAW(f).
I-05: FINITE_SECOND_MOMENT(X) => FINITE_EXPECTATION(X) and FINITE_VARIANCE(X).
I-06: INDEPENDENT(X,Y) and FINITE_SECOND_MOMENTS(X,Y) => COV(X,Y)=0.
I-07: MEASURABLE(g) and RANDOM_VARIABLE(X) => RANDOM_VARIABLE(g(X)).
I-08: EQUAL_ALMOST_SURELY(X,Y) => EQUAL_IN_DISTRIBUTION(X,Y).
I-09: EQUAL_IN_DISTRIBUTION(X,Y) =/=> EQUAL_ALMOST_SURELY(X,Y).

7. SEMANTIC DISTINCTIONS
Random variable is a function, not an individual random outcome.
Sample space is the set of possible outcomes, not the variable's value space.
Distribution is a probability measure; a PMF or PDF is a representation available only under suitable conditions.
A PDF value is not itself a point probability; for absolutely continuous X, P(X=x)=0.
A continuous-valued random variable need not have an absolutely continuous distribution.
Independence is a property of joint law, not inferred from matching marginals.

8. VALIDATION
V-01: Confirm measurable domain, codomain and sigma-algebras.
V-02: Check P is nonnegative, normalised and countably additive.
V-03: Check PMF sums to one or PDF integrates to one where applicable.
V-04: Guard undefined moments and non-integrable transformations.
V-05: Do not infer independence from zero correlation.
V-06: Distinguish pointwise, almost-sure and distributional equality.
V-07: Attach assumptions and counterexamples to inference records.

9. CONFIDENCE AND PROVENANCE
CONFIDENCE: formal definitions and standard theorems = high under explicit assumptions; empirical parameter estimates require data, methodology and uncertainty.
PROVENANCE: source URL, authored date, theorem reference, assumption set and revision identifier.
SEMANTIC_EQUIVALENCE: RandomVariable ~ MeasurableMappingFromProbabilitySpace; NOT equivalent to ProbabilityDistribution or Realisation.

10. FLOW_HASH AND UPDATE_MODEL
FLOW_HASH := SHA256(canonical_UTF8(ontology_id, version, typed_entities, axioms, relations, inference_rules, validation_rules))
Canonicalisation: deterministic field order, Unicode NFC, normalised line endings; exclude the computed hash field itself.
UPDATE_MODEL: bump version on semantic edits; recalculate FLOW_HASH; preserve change log and superseded rule identifiers.

11. AI_CONSUMPTION
INPUT: probability space, random variable specification, distributions, assumptions, requested query.
PROCESS: type-check -> verify measurability -> identify law -> select admissible rules -> validate assumptions -> infer -> report.
OUTPUT: typed entities, formulae, derived claims, uncertainty, confidence, provenance, FLOW_HASH metadata.
FAIL_CLOSED: flag missing measurability, unsupported density assumptions, undefined moments or unjustified independence.

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