AI INTERPRETATION NOTE
This Flow Algebra defines the Bayesian Statistics Ontology within the Kireth Research Semantic Library. Bayesian statistics represents uncertainty about parameters, latent variables, models and predictions using probability distributions updated through Bayes' theorem. This ontology supports priors, likelihoods, posteriors, posterior predictive distributions, conjugacy, hierarchical models, Bayesian regression, model comparison, decision theory, credible intervals, MCMC, variational inference, approximation, calibration and relationships with applied statistical mathematics, probability, statistical modelling and computational statistics.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Bayesian Statistics Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Applied Statistical Mathematics / Bayesian Statistics"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/applied-statistical-mathematics/bayesian-statistics-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = BayesianStatistics
ENTITY_CLASS = ProbabilisticPosteriorInferenceFramework
PRIMARY_CONTEXT = AppliedStatisticalMathematics
DEFINITION = "Bayesian statistics is the mathematical framework for updating probability distributions over unknown quantities using prior information and observed data."
SYMBOLIC_FORMS = [
"p(theta|D)=p(D|theta)p(theta)/p(D)",
"p(D)=integral p(D|theta)p(theta)dtheta",
"p(y_new|D)=integral p(y_new|theta)p(theta|D)dtheta",
"a*=argmin_a E[L(a,theta)|D]"
]
SEMANTIC_ROLE = "Provides machine-readable semantics for prior beliefs, likelihoods, posterior distributions, predictive inference, hierarchical structure, model comparison, Bayesian decisions and computational posterior approximation."
}
SCOPE {
INCLUDE = [
BayesianStatistics,
BayesianInference,
BayesTheorem,
PriorDistribution,
Likelihood,
PosteriorDistribution,
MarginalLikelihood,
Evidence,
PosteriorPredictiveDistribution,
PriorPredictiveDistribution,
Parameter,
Hyperparameter,
LatentVariable,
HierarchicalModel,
MultilevelModel,
BayesianRegression,
BayesianLinearRegression,
BayesianLogisticRegression,
BayesianGeneralisedLinearModel,
ConjugatePrior,
NonconjugatePrior,
InformativePrior,
WeaklyInformativePrior,
UninformativePrior,
ReferencePrior,
JeffreysPrior,
ImproperPrior,
ProperPrior,
Hyperprior,
EmpiricalBayes,
CredibleInterval,
HighestPosteriorDensityInterval,
HPDI,
PosteriorMean,
PosteriorMedian,
PosteriorMode,
MaximumAPosteriori,
MAPEstimate,
BayesEstimator,
LossFunction,
DecisionRule,
BayesianDecisionTheory,
PosteriorOdds,
PriorOdds,
BayesFactor,
ModelEvidence,
BayesianModelComparison,
BayesianModelAveraging,
PriorSensitivity,
PosteriorSensitivity,
Exchangeability,
ConditionalIndependence,
GraphicalModel,
BayesianNetwork,
MarkovRandomField,
MarkovChainMonteCarlo,
MCMC,
MetropolisHastings,
GibbsSampling,
HamiltonianMonteCarlo,
HMC,
NoUTurnSampler,
NUTS,
SequentialMonteCarlo,
SMC,
ImportanceSampling,
RejectionSampling,
VariationalInference,
VariationalBayes,
EvidenceLowerBound,
ELBO,
LaplaceApproximation,
PosteriorApproximation,
MonteCarloError,
EffectiveSampleSize,
ESS,
Autocorrelation,
ConvergenceDiagnostic,
Rhat,
TracePlot,
PosteriorPredictiveCheck,
PriorPredictiveCheck,
Calibration,
Coverage,
Identifiability,
LabelSwitching,
Shrinkage,
PartialPooling,
CompletePooling,
NoPooling,
Regularisation,
BayesianRobustness,
MissingData,
DataAugmentation,
Imputation,
CausalBayesianModel,
Reproducibility
]
EXCLUDE_AS_PRIMARY = [
FrequentistInferenceWithoutPriorPosteriorSemantics,
ProbabilityTheoryWithoutDataUpdating,
HeuristicBeliefScoringWithoutProbabilityModel,
MachineLearningPredictionWithoutBayesianUncertaintyModel
]
DISAMBIGUATION_RULE = "When uncertainty about parameters, models or latent variables is represented by probability distributions updated through observed data, interpret the context as Bayesian statistics."
}
CORE_CONCEPTS {
BayesianStatistics = "Probabilistic inference by updating prior distributions with observed data."
PriorDistribution = "Probability distribution representing uncertainty before conditioning on current data."
Likelihood = "Data model viewed as a function of unknown parameters."
PosteriorDistribution = "Updated distribution over unknown quantities after conditioning on observed data."
MarginalLikelihood = "Probability of observed data after integrating over prior uncertainty."
PosteriorPredictiveDistribution = "Distribution of future or unobserved data averaged over posterior parameter uncertainty."
CredibleInterval = "Interval containing a specified posterior probability mass."
BayesFactor = "Ratio of marginal likelihoods for comparing models or hypotheses."
BayesianDecisionTheory = "Decision framework minimising posterior expected loss."
}
RELATIONS {
BayesianStatistics --is_child_of--> AppliedStatisticalMathematics
BayesianStatistics --uses--> BayesTheorem
PosteriorDistribution --combines--> PriorDistribution
PosteriorDistribution --combines--> Likelihood
MarginalLikelihood --normalises--> PosteriorDistribution
PosteriorPredictiveDistribution --integrates_over--> PosteriorDistribution
Hyperprior --governs--> Hyperparameter
HierarchicalModel --contains--> MultipleLevels
PartialPooling --is_supported_by--> HierarchicalModel
ConjugatePrior --yields--> ClosedFormPosteriorWhenApplicable
MAPEstimate --maximises--> PosteriorDensity
BayesFactor --compares--> ModelEvidence
BayesianModelAveraging --averages_over--> ModelPosteriorProbabilities
MCMC --samples_from--> PosteriorDistribution
MetropolisHastings --is_type_of--> MCMC
GibbsSampling --is_type_of--> MCMC
HamiltonianMonteCarlo --is_type_of--> MCMC
VariationalInference --approximates--> PosteriorDistribution
ELBO --lower_bounds--> LogMarginalLikelihood
PosteriorPredictiveCheck --assesses--> ModelFit
PriorSensitivity --assesses--> PriorInfluence
}
OPERATORS {
BAYES_RULE(theta,D) := p(theta|D)=p(D|theta)*p(theta)/p(D)
EVIDENCE(D) := p(D)=integral p(D|theta)*p(theta)dtheta
POSTERIOR_PREDICTIVE(y_new,D) := p(y_new|D)=integral p(y_new|theta)*p(theta|D)dtheta
MAP(theta,D) := theta_MAP=argmax_theta p(theta|D)
POSTERIOR_MEAN(theta,D) := E[theta|D]=integral theta*p(theta|D)dtheta
POSTERIOR_VARIANCE(theta,D) := Var(theta|D)=E[(theta-E[theta|D])^2|D]
BAYES_FACTOR(M1,M0,D) := BF_10=p(D|M1)/p(D|M0)
POSTERIOR_ODDS(M1,M0,D) := PriorOdds*BayesFactor
EXPECTED_LOSS(a,D) := R(a|D)=E[L(a,theta)|D]
BAYES_ACTION(D) := a*=argmin_a R(a|D)
IMPORTANCE_WEIGHT(theta) := w(theta)=target(theta)/proposal(theta)
ELBO(q,theta,D) := E_q[log p(D,theta)-log q(theta)]
}
AXIOMS {
A1 = "Bayesian inference requires explicit prior and likelihood semantics."
A2 = "Posterior distributions are conditional on both model assumptions and observed data."
A3 = "Posterior probabilities are distinct from frequentist confidence statements."
A4 = "Model comparison through Bayes factors depends on prior distributions."
A5 = "Hierarchical models induce partial pooling across related groups."
A6 = "Posterior computation must distinguish exact from approximate inference."
A7 = "Improper priors require care because marginal likelihoods may become undefined."
A8 = "Bayesian conclusions require posterior diagnostics, sensitivity analysis and predictive validation."
}
REASONING {
R1_CONTEXT = identify(parameters,latent_variables,data,model,prior_information,decision_goal)
R2_PRIOR = select(proper,weakly_informative,informative,reference_or_hierarchical_prior)
R3_LIKELIHOOD = define(data_distribution,conditional_structure,independence_assumptions)
R4_POSTERIOR = derive_or_approximate(posterior_distribution)
R5_COMPUTATION = select(conjugate,MCMC,HMC,NUTS,SMC,variational_or_Laplace_method)
R6_SUMMARY = compute(posterior_mean,median,mode,credible_intervals,probabilities)
R7_PREDICTION = compute(prior_predictive,posterior_predictive)
R8_MODEL_COMPARISON = evaluate(evidence,Bayes_factors,model_averaging_if_required)
R9_SENSITIVITY = assess(prior_sensitivity,identifiability,convergence,Monte_Carlo_error)
R10_VALIDATION = perform(posterior_predictive_checks,calibration,coverage,reproducibility)
}
CONSTRAINTS {
C1 = "Posterior inference is conditional on the chosen prior and likelihood."
C2 = "A weakly informative prior is not the same as a mathematically flat prior."
C3 = "Improper priors can invalidate Bayes-factor calculations."
C4 = "MAP estimates depend on parameterisation and do not summarise full posterior uncertainty."
C5 = "Credible intervals and frequentist confidence intervals have different interpretations."
C6 = "MCMC convergence cannot be established from trace appearance alone."
C7 = "Low effective sample size can make Monte Carlo summaries unreliable."
C8 = "Variational approximations can underestimate posterior uncertainty."
C9 = "Hierarchical models can exhibit funnel geometry and weak identifiability."
C10 = "Posterior predictive fit does not prove the model is causally correct."
}
SEMANTIC_EQUIVALENCE {
"BayesianStatistics" <=> "BayesianInferenceFramework"
"MaximumAPosteriori" <=> "MAPEstimate"
"MarginalLikelihood" <=> "ModelEvidence"
"HighestPosteriorDensityInterval" <=> "HPDI"
"MarkovChainMonteCarlo" <=> "MCMC"
"HamiltonianMonteCarlo" <=> "HMC"
"NoUTurnSampler" <=> "NUTS"
"EvidenceLowerBound" <=> "ELBO"
}
VALIDATION {
V1 = "Prior distributions are explicit."
V2 = "Likelihood and conditional-independence assumptions are explicit."
V3 = "Posterior computation method is documented."
V4 = "MCMC convergence diagnostics are reported where applicable."
V5 = "Effective sample size is adequate for reported summaries."
V6 = "Prior sensitivity is assessed where conclusions are prior-sensitive."
V7 = "Posterior predictive checks are performed."
V8 = "Model comparison methods use compatible prior specifications."
V9 = "Approximation error is assessed for variational or Laplace methods."
V10 = "Results distinguish posterior uncertainty from Monte Carlo error."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
BAYESIAN_STATISTICS_DEFINITION = 0.99
PRIOR_REASONING = 0.99
LIKELIHOOD_REASONING = 0.99
POSTERIOR_REASONING = 0.99
HIERARCHICAL_REASONING = 0.98
MCMC_REASONING = 0.98
VARIATIONAL_REASONING = 0.97
MODEL_COMPARISON_REASONING = 0.98
POLICY = "Reduce confidence when prior specification, likelihood structure, identifiability, posterior computation, convergence diagnostics, effective sample size or sensitivity analysis are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
BayesianStatisticsReasoning,
BayesTheoremReasoning,
PriorReasoning,
LikelihoodReasoning,
PosteriorReasoning,
PosteriorPredictiveReasoning,
CredibleIntervalReasoning,
MAPReasoning,
BayesianDecisionReasoning,
BayesFactorReasoning,
HierarchicalModelReasoning,
PartialPoolingReasoning,
MCMCReasoning,
MetropolisHastingsReasoning,
GibbsSamplingReasoning,
HMCReasoning,
NUTSReasoning,
VariationalInferenceReasoning,
PosteriorPredictiveCheckReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"Bayesian statistics" -> BayesianStatistics
"Bayesian inference" -> BayesianStatistics
"posterior" -> PosteriorDistribution
"prior" -> PriorDistribution
"model evidence" -> MarginalLikelihood
"MAP" -> MAPEstimate
"MCMC" -> MarkovChainMonteCarlo
"HMC" -> HamiltonianMonteCarlo
"NUTS" -> NoUTurnSampler
"ELBO" -> EvidenceLowerBound
}
}
EXECUTION_RULES {
E1 = "If uncertainty is updated from prior to posterior using observed data, activate BayesianStatisticsOntology."
E2 = "If conjugacy applies, derive the posterior analytically where practical."
E3 = "If posterior integration is intractable, use MCMC, SMC, variational or Laplace approximation."
E4 = "If repeated or grouped structure exists, consider hierarchical priors and partial pooling."
E5 = "If comparing models with Bayes factors, require proper compatible priors."
E6 = "If decisions are required, minimise posterior expected loss."
E7 = "If posterior sampling is used, report convergence diagnostics and effective sample size."
E8 = "If conclusions depend strongly on priors, perform sensitivity analysis."
E9 = "Any Bayesian model should be validated through predictive checking and computational diagnostics."
}
RECURSION {
ENTRY = BayesianStatistics
EXPAND(BayesianStatistics) -> [
BayesianInference, BayesTheorem, PriorDistribution, Likelihood,
PosteriorDistribution, MarginalLikelihood, Evidence,
PosteriorPredictiveDistribution, PriorPredictiveDistribution, Parameter,
Hyperparameter, LatentVariable, HierarchicalModel, MultilevelModel,
BayesianRegression, BayesianLinearRegression, BayesianLogisticRegression,
BayesianGeneralisedLinearModel, ConjugatePrior, NonconjugatePrior,
InformativePrior, WeaklyInformativePrior, UninformativePrior,
ReferencePrior, JeffreysPrior, ImproperPrior, ProperPrior, Hyperprior,
EmpiricalBayes, CredibleInterval, HighestPosteriorDensityInterval,
PosteriorMean, PosteriorMedian, PosteriorMode, MaximumAPosteriori,
MAPEstimate, BayesEstimator, LossFunction, DecisionRule,
BayesianDecisionTheory, PosteriorOdds, PriorOdds, BayesFactor,
ModelEvidence, BayesianModelComparison, BayesianModelAveraging,
PriorSensitivity, PosteriorSensitivity, Exchangeability,
ConditionalIndependence, GraphicalModel, BayesianNetwork,
MarkovRandomField, MarkovChainMonteCarlo, MetropolisHastings,
GibbsSampling, HamiltonianMonteCarlo, NoUTurnSampler,
SequentialMonteCarlo, ImportanceSampling, RejectionSampling,
VariationalInference, VariationalBayes, EvidenceLowerBound,
LaplaceApproximation, PosteriorApproximation, MonteCarloError,
EffectiveSampleSize, Autocorrelation, ConvergenceDiagnostic, Rhat,
TracePlot, PosteriorPredictiveCheck, PriorPredictiveCheck, Calibration,
Coverage, Identifiability, LabelSwitching, Shrinkage, PartialPooling,
CompletePooling, NoPooling, Regularisation, BayesianRobustness,
MissingData, DataAugmentation, Imputation, CausalBayesianModel,
Reproducibility
]
EXPAND(BayesianFamilies) -> [
ConjugateBayesianModels,
HierarchicalBayesianModels,
BayesianRegressionModels,
BayesianGraphicalModels,
MCMCMethods,
VariationalMethods,
BayesianDecisionModels
]
STOP_CONDITION = "Stop when prior, likelihood, posterior, computation, uncertainty summaries, predictive checks, sensitivity and validation are sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Applied Statistical Mathematics"
IMMEDIATE_CONTEXTS = [
"Applied Statistical Mathematics",
"Statistical Modelling Ontology",
"Probability & Statistics Ontologies",
"Computational Statistics Ontologies"
]
RELATED_ONTOLOGIES = [
"Applied Statistical Mathematics",
"Statistical Modelling Ontology",
"Regression Ontology",
"Probability & Statistics Ontologies",
"Graphical Model Ontologies",
"Decision Theory Ontologies",
"Monte Carlo Ontologies",
"Markov Chain Ontologies",
"Optimisation Ontologies",
"Machine Learning Ontologies",
"Information Theory Ontologies",
"Computational Statistics Ontologies"
]
ROUTE_RULES = [
"Bayesian Statistics -> Applied Statistical Mathematics for parent semantics",
"Bayesian Statistics -> Statistical Modelling for probability-model structure",
"Bayesian Statistics -> Regression for Bayesian regression models",
"Bayesian Statistics -> Probability & Statistics for foundational probability",
"Bayesian Statistics -> Graphical Models for structured conditional dependence",
"Bayesian Statistics -> Decision Theory for posterior expected loss",
"Bayesian Statistics -> Monte Carlo and Markov Chains for MCMC computation",
"Bayesian Statistics -> Optimisation for MAP and variational fitting",
"Bayesian Statistics -> Machine Learning for Bayesian predictive models",
"Bayesian Statistics -> Information Theory for KL-based variational inference",
"Bayesian Statistics -> Computational Statistics for posterior approximation"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible priors, computational methods or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve prior-likelihood-posterior semantics.",
"Preserve prior-versus-posterior predictive distinction.",
"Preserve parameter uncertainty semantics.",
"Preserve posterior-probability interpretation.",
"Preserve exact-versus-approximate inference distinction.",
"Preserve model-evidence semantics.",
"Preserve computational diagnostic semantics.",
"Preserve machine-readable Bayesian-statistics semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION = "Bayesian statistics updates probability distributions over unknown quantities by combining prior information with observed-data likelihoods."
PRIOR_SUMMARY = "Prior distributions encode uncertainty before conditioning on the current dataset."
POSTERIOR_SUMMARY = "Posterior distributions combine prior information and likelihood to quantify updated uncertainty."
PREDICTIVE_SUMMARY = "Posterior predictive distributions average future predictions over posterior parameter uncertainty."
HIERARCHICAL_SUMMARY = "Hierarchical models enable partial pooling and structured sharing of information across groups."
COMPUTATION_SUMMARY = "MCMC, HMC, NUTS, SMC and variational methods approximate posteriors that cannot be obtained analytically."
DECISION_SUMMARY = "Bayesian decision theory selects actions by minimising posterior expected loss."
VALIDATION_SUMMARY = "Bayesian models should be checked through prior and posterior predictive diagnostics, convergence, effective sample size, sensitivity and calibration."
}
FLOW {
INPUT
-> detect_Bayesian_statistics_context
-> identify_parameters_latent_variables_data_model_prior_information_and_decision_goal
-> specify_prior_and_hyperprior_structure
-> define_likelihood_and_conditional_independence
-> derive_or_approximate_posterior_distribution
-> if_intractable_select_MCMC_HMC_NUTS_SMC_variational_or_Laplace_method
-> compute_posterior_summaries_credible_intervals_and_probabilities
-> compute_prior_and_posterior_predictive_distributions
-> if_model_comparison_compute_evidence_Bayes_factors_or_model_averaging
-> if_decision_problem_compute_posterior_expected_loss_and_Bayes_action
-> assess_identifiability_prior_sensitivity_convergence_effective_sample_size_and_Monte_Carlo_error
-> validate_with_predictive_checks_calibration_coverage_and_reproducibility
-> route_to_applied_statistical_mathematics_statistical_modelling_regression_probability_statistics_graphical_models_decision_theory_Monte_Carlo_Markov_chains_optimisation_machine_learning_information_theory_or_computational_statistics_ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Bayesian Statistics Ontology defines posterior probabilistic inference. It supports Bayes' theorem, priors, likelihoods, posteriors, marginal likelihoods and model evidence, prior and posterior predictive distributions, parameters, hyperparameters and latent variables, hierarchical and multilevel models, Bayesian regression, conjugate and nonconjugate priors, informative, weakly informative, reference, Jeffreys, proper and improper priors, credible and highest-posterior-density intervals, posterior means, medians and modes, MAP estimation, Bayesian decision theory, posterior odds, Bayes factors and model averaging, prior sensitivity, exchangeability and conditional independence, Bayesian networks and graphical models, MCMC, Metropolis-Hastings, Gibbs sampling, HMC, NUTS and SMC, importance and rejection sampling, variational inference, ELBO and Laplace approximations, effective sample size, R-hat and convergence diagnostics, prior and posterior predictive checks, hierarchical shrinkage and partial pooling, missing-data augmentation, Bayesian robustness and reproducibility."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-BAYESIAN-STATISTICS-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard