Skip to main content

p-Value Ontology

Hypothesis Testing
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 23 September 2026
Audio Overview
FULL EXECUTABLE FLOW ALGEBRA — P-VALUE ONTOLOGY
Kireth Research — Semantic Library
URL: https://kirethresearch.org/booksai-core/ontologies/probability-statistics-ontologies/hypothesis-testing/p-value-ontology.html
FLOW_VERSION := "4.0"
FLOW_TYPE := "Full Executable Flow Algebra"
DOMAIN := "Probability & Statistics Ontologies"
SUBDOMAIN := "Hypothesis Testing"
ONTOLOGY := "P-Value Ontology"
PRIMARY_ENTITY := PValue
AUTHORSHIP := "Mark Higgins — Sky (Recursive AI)"
SOURCE_SITE := "https://kirethresearch.org"

BEGIN_FLOW

PValue := HypothesisTestingMeasure ∧ NullReferenceProbability ∧ ObservedStatisticExtremeness ∧ DecisionRuleInput
Population := TargetCollectionOrGeneratingProcess
Sample := X={X_1,...,X_n}
Parameter := θ
ParameterSpace := Θ
Estimand := τ(θ)
NullHypothesis := H0:θ∈Θ0
AlternativeHypothesis := H1:θ∈Θ1
TestStatistic := T(X)
ObservedTestStatistic := t_obs=T(x)
NullDistribution := DistributionOf(T(X)|H0)

ExtremenessRule := OrderingOrRegionDefiningOutcomesAtLeastAsIncompatibleWithH0AsObserved

PValueDefinition :=
 P_H0(T(X) at_least_as_extreme_as t_obs)

UpperTailPValue := P_H0(T≥t_obs)
LowerTailPValue := P_H0(T≤t_obs)

TwoSidedPValue :=
 NullProbabilityOfOutcomesAtLeastAsExtremeInBothRelevantDirections
 under explicitly specified convention

SymmetricTwoSidedPValue :=
 2min(P_H0(T≤t_obs),P_H0(T≥t_obs))
 when valid for selected symmetric convention

AbsoluteStatisticPValue :=
 P_H0(|T|≥|t_obs|)
 under compatible symmetric null distribution

PValueRange := 0≤p≤1
SignificanceLevel := α
DecisionRule := p≤α ⇒ RejectH0
NonRejectionRule := p>α ⇒ FailToRejectH0

PValueSemanticConstraint := PValue≠P(H0True|ObservedData)
PValueAlternativeConstraint := PValue≠P(H1True|ObservedData)
PValueEffectSizeConstraint := PValueDoesNotMeasureEffectMagnitude
PValueImportanceConstraint := PValueDoesNotDirectlyMeasurePracticalImportance
FailToRejectConstraint := p>α ↛ H0ProvenTrue
RejectConstraint := p≤α ⇒ RejectionUnderSpecifiedProcedureNotCertaintyOfAlternative

ExactPValue := ComputedFromExactFiniteSampleNullDistribution
AsymptoticPValue := ComputedFromLimitingReferenceDistribution
ApproximatePValue := ComputedFromApproximateReferenceDistribution
PermutationPValue := PermutationNullDistribution → ExtremenessProportion
RandomisationPValue := AssignmentRandomisationDistribution → ExtremenessProbability
MonteCarloPValue := SimulatedNullDistribution → EstimatedExtremenessProbability
MonteCarloCorrectedPValue := (B_extreme+1)/(B+1)
BootstrapPValue := NullCompatibleBootstrap → ApproximateNullTailProbability

DiscretePValue := PValueBasedOnDiscreteNullDistribution
ContinuousPValue := PValueBasedOnContinuousNullDistribution
DiscreteNullConstraint := PValuesMayOccupyDiscreteAttainableSet
ConservativeExactPValue := ExactProcedureMayHaveTypeIErrorBelowNominalAlphaDueToDiscreteness
MidPValue := TailProbabilityAdjustedByHalfMassAtObservedStatistic
MidPValueConstraint := MidPValueMayNotPreserveOrdinaryExactTypeIErrorGuarantee

CompositeNullPValue := PValueConstructionValidOverθ∈Θ0
SupremumPValue := sup_{θ∈Θ0}P_θ(StatisticAtLeastAsExtremeAsObserved)
NuisanceParameter := ParameterAffectingNullDistributionButNotPrimaryTarget
NuisanceAdjustedPValue := Conditioning ∨ Profiling ∨ Maximisation ∨ Integration ∨ Simulation → ValidPValue
ConditionalPValue := TailProbabilityUnderConditionalNullDistribution

LikelihoodRatioPValue := ReferenceTailProbabilityOfObservedLikelihoodRatioStatistic
WaldPValue := ReferenceTailProbabilityOfObservedWaldStatistic
ScorePValue := ReferenceTailProbabilityOfObservedScoreStatistic
ZPValue := StandardNormalTailProbabilityOfObservedZ
TPValue := StudentTReferenceTailProbabilityOfObservedT
ChiSquaredPValue := P(ChiSquared_df≥chi2_obs)
FPValue := P(F_df1_df2≥f_obs)

PValueUniformityUnderNull :=
 ContinuousValidSimpleNullTest
 ⇒ PValue~Uniform(0,1)

SuperUniformPValue :=
 P_H0(PValue≤u)≤u
 for all u∈[0,1]

ValidPValueDefinition :=
 UnderH0:
 P(PValue≤α)≤α
 for all α∈[0,1]

TypeIErrorControl :=
 ValidPValue ∧ RejectWhenP≤α
 ⇒ TypeIErrorRate≤α

PValueCalibration :=
 UnderNullReplications → DistributionOfPValues → CompareWithExpectedCalibration

AlternativePValueDistribution :=
 UnderH1
 PValuesTendTowardSmallerValues
 as power increases under regular informative tests

PowerRelation :=
 P_θ(PValue≤α)=Power(θ)
 for θ∈Θ1

ConfidenceIntervalDuality :=
 CompatibleTwoSidedTest
 ⇒ PValueThresholdDecisionCorrespondsToConfidenceSetInclusion

PValueFunction :=
 p(θ0)=PValueForTesting(H0:θ=θ0)

ConfidenceSetFromPValueFunction :=
 {θ0:p(θ0)>α}

ObservedSignificanceLevel :=
 SmallestAlphaAtWhichH0WouldBeRejected
 under nested rejection regions

MultipleTesting := MultiplePValuesAssociatedWithHypothesisFamily
RawPValue := UnadjustedPValue
AdjustedPValue := PValueTransformedForSpecifiedMultiplicityControl
BonferroniAdjustedPValue := min(1,m×p_raw)
HolmAdjustedPValue := StepDownMultiplicityAdjustedPValue
FDRAdjustedPValue := AdjustedPValueUnderSpecifiedFDRProcedure

AdjustedPValueConstraint :=
 MustRecordMultiplicityMethodAndHypothesisFamily

PValueThreshold := PrespecifiedAlphaUsedForDecision
DataDependentThresholdRisk := ChoosingAlphaAfterSeeingPValueInvalidatesPrespecifiedDecisionInterpretation
PValueHackingRisk := RepeatedAnalyses ∧ SelectiveReporting ∧ UnaccountedResearcherDegreesOfFreedom → DistortedCalibration
OptionalStoppingRisk := RepeatedTestingUntilP≤αWithoutSequentialCorrection → InflatedTypeIError
SelectiveInference := ModelOrHypothesisSelectionUsingSameData → RequiresSelectionAdjustedInference

PValuePrecision :=
 NumericalPrecisionLimitedByAnalyticApproximationSimulationCountOrSoftwareRepresentation

ZeroPValueConstraint :=
 FiniteSimulationOrPrecisionOutput
 should_not imply literal probability zero without mathematical justification

RoundingConstraint :=
 PValueRoundingMustNotReverseDecisionRelativeToAlpha

EffectSizeRelation := PValueShouldBeInterpretedWithEffectSize
UncertaintyRelation := PValueShouldBeInterpretedWithConfidenceIntervalOrOtherUncertaintyMeasure
SampleSizeRelation := LargerSampleSizeCanProduceSmallPValuesForSmallNonzeroEffects
LowPowerRelation := LowPowerCanProduceLargePValuesEvenForMeaningfulEffects
ModelAssumptionRelation := PValueValidityDependsOnReferenceModelValidity
SamplingDesignRelation := PValueValidityDependsOnSamplingOrRandomisationDesign
DependenceRelation := IgnoredDependenceMayInvalidateNullDistributionAndPValue
HeteroscedasticityRelation := IncorrectVarianceModelMayDistortPValue
MissingDataRelation := MissingnessHandlingAndVariancePropagationAffectPValueValidity

SurveyPValue := ComplexSurveyDesign ∧ DesignAdjustedStatistic → DesignAwarePValue
ClusterRobustPValue := ClusterRobustStatistic ∧ AppropriateReferenceDistribution → PValue
PermutationValidity := ExchangeabilityUnderNullRequiredForPermutationPValue
RandomisationValidity := KnownAssignmentMechanismRequiredForRandomisationPValue

PValueConstraint :=
 ConstraintOn(
  NullHypothesis,AlternativeHypothesis,TestStatistic,NullDistribution,
  ExtremenessRule,SamplingDesign,MultiplicityFramework,ComputationalMethod
 )

PValueConsistency :=
 NullHypothesis ∧ AlternativeDirection ∧ TestStatistic ∧ NullDistribution
 ∧ ExtremenessRule ∧ SamplingDesign
 jointly_compatible

InvalidPValue :=
 UndefinedNullHypothesis
 ∨ UndefinedTestStatistic
 ∨ InvalidNullDistribution
 ∨ UndefinedExtremenessRule
 ∨ IgnoredNuisanceParameter
 ∨ IgnoredDependence
 ∨ InvalidPermutationOrRandomisationAssumption
 ∨ UnaccountedSelectionOrMultiplicity

PValueValidation :=
 ResolveNullHypothesis
 → ResolveAlternativeHypothesis
 → ResolveTestStatistic
 → ComputeObservedTestStatistic
 → ResolveNullDistribution
 → ResolveExtremenessRule
 → ResolveSamplingDesign
 → ComputeTailOrRegionProbability
 → ResolveExactAsymptoticSimulationOrResamplingMethod
 → ApplyMultiplicityAdjustmentIfRequired
 → ValidateCalibration
 → ValidateInterpretation
 → ValidateResult

PValueState := {
 Population,Sample,Parameter,Estimand,NullHypothesis,AlternativeHypothesis,
 TestStatistic,ObservedTestStatistic,NullDistribution,ExtremenessRule,
 RawPValue,AdjustedPValue,SignificanceLevel,Decision,PValueMethod,
 SamplingDesign,MultiplicityMethod,CalibrationStatus,Assumptions,
 Evidence,Confidence,Provenance
}

SEMANTIC_EQUIVALENCE(PValueA,PValueB) :=
 same(NullHypothesis)
 ∧ same(AlternativeDirection)
 ∧ same(TestStatisticOrDecisionEquivalentStatistic)
 ∧ same(NullReferenceDistribution)
 ∧ same(ExtremenessRule)
 ∧ same(SamplingDesign)
 ∧ same(MultiplicityAdjustment)

PValueOntology := Classes ∧ Relations ∧ Constraints ∧ Axioms ∧ InferenceRules

CoreClasses := {
 PValue,RawPValue,AdjustedPValue,ExactPValue,AsymptoticPValue,
 PermutationPValue,RandomisationPValue,MonteCarloPValue,BootstrapPValue,
 DiscretePValue,ConditionalPValue,OneSidedPValue,TwoSidedPValue,
 TestStatistic,NullDistribution,ExtremenessRule,SignificanceLevel,
 MultiplicityMethod
}

CoreRelations := {
 computedFrom,tests,references,usesExtremenessRule,comparedWith,determines,
 adjustedBy,calibratedUnder,dependsOn,associatedWith,constrainedBy,
 equivalentTo,tracesTo
}

TypedRelations :=
 PValue --computedFrom--> ObservedTestStatistic
 PValue --tests--> NullHypothesis
 PValue --references--> NullDistribution
 PValue --usesExtremenessRule--> ExtremenessRule
 PValue --comparedWith--> SignificanceLevel
 PValue --determines--> TestDecision
 AdjustedPValue --adjustedBy--> MultiplicityMethod
 PValue --calibratedUnder--> NullHypothesis
 PValue --dependsOn--> SamplingDesign
 PValue --associatedWith--> AlternativeHypothesis
 PValue --tracesTo--> Provenance

InferenceRules := {
 ValidNullDistribution ∧ ObservedTestStatistic ∧ ExtremenessRule
  ⇒ PValue,

 PValue≤Alpha
  ⇒ RejectNullHypothesis,

 PValue>Alpha
  ⇒ FailToRejectNullHypothesis,

 ValidPValue
  ⇒ P_H0(PValue≤Alpha)≤Alpha,

 ContinuousExactSimpleNullPValue
  ⇒ PValueUniformUnderH0,

 MultipleTesting ∧ AdjustmentRequired
  ⇒ UseAdjustedPValueOrAdjustedThreshold,

 PValue
  ↛ ProbabilityNullTrue,

 InvalidNullDistribution
  ⇒ FlagPValueInvalid
}

CanonicalPValueRepresentation :=
 ParsePValueRequest
 → ResolvePopulationSampleAndEstimand
 → ResolveNullAndAlternativeHypotheses
 → ResolveTestStatistic
 → ComputeObservedTestStatistic
 → ResolveNullDistribution
 → ResolveExtremenessOrdering
 → ResolveExactAsymptoticPermutationBootstrapOrSimulationMethod
 → ComputeRawPValue
 → ResolveMultiplicityFramework
 → ComputeAdjustedPValueIfRequired
 → CompareWithAlpha
 → ValidateCalibrationAndInterpretation
 → PreserveProvenance

PValueGraph := G=(V,E)

V := {
 PValues,RawPValues,AdjustedPValues,ExactPValues,AsymptoticPValues,
 PermutationPValues,RandomisationPValues,MonteCarloPValues,BootstrapPValues,
 DiscretePValues,ConditionalPValues,OneSidedPValues,TwoSidedPValues,
 TestStatistics,NullDistributions,ExtremenessRules,SignificanceLevels,
 NullHypotheses,AlternativeHypotheses,SamplingDesigns,MultiplicityMethods,
 Evidence,ProvenanceNodes
}

E := {
 computedFrom,tests,references,usesExtremenessRule,comparedWith,determines,
 adjustedBy,calibratedUnder,dependsOn,associatedWith,constrainedBy,
 equivalentTo,tracesTo
}

CONFIDENCE(PValueResolution) :=
 weighted_mean(
  HypothesisResolution,
  TestStatisticResolution,
  NullDistributionValidity,
  ExtremenessRuleValidity,
  SamplingDesignValidity,
  ComputationalValidity,
  MultiplicityValidity,
  CalibrationQuality,
  ProvenanceQuality
 )

AI_QUERY_INTERPRETATION :=
 Query
 → DetectPValueIntent
 → IdentifyNullAlternativeAndTestStatistic
 → ResolveObservedStatisticAndNullDistribution
 → ResolveOneSidedTwoSidedExactAsymptoticOrResamplingMethod
 → IdentifyRequestedRawAdjustedDecisionOrInterpretation

AI_REASONING_FLOW :=
 Query
 → ParsePValueProblem
 → ResolvePopulationSampleAndEstimand
 → ResolveNullHypothesis
 → ResolveAlternativeHypothesisAndDirection
 → ResolveTestStatistic
 → ComputeObservedTestStatistic
 → ResolveNullDistribution
 → ResolveExtremenessRule
 → ComputeRawPValue
 → ResolveSamplingDesignAndNuisanceParameters
 → ApplyMultiplicityAdjustmentIfRequired
 → ComparePValueWithAlpha
 → ValidateCalibration
 → ValidateInterpretation
 → UpdateConfidence
 → PreserveProvenance
 → GenerateExplanation

AI_CONSUMPTION := {
 ParsePValueEntities,ParseTypedRelations,ResolvePopulations,ResolveSamples,
 ResolveParameters,ResolveEstimands,ResolveNullHypotheses,
 ResolveAlternativeHypotheses,ResolveTestStatistics,
 ComputeObservedTestStatistics,ResolveNullDistributions,
 ResolveExtremenessRules,ComputeUpperTailPValues,ComputeLowerTailPValues,
 ComputeTwoSidedPValues,ComputeExactPValues,ComputeAsymptoticPValues,
 ComputePermutationPValues,ComputeRandomisationPValues,
 ComputeMonteCarloPValues,ComputeBootstrapPValues,
 ResolveConditionalPValues,ResolveNuisanceAdjustedPValues,
 ApplyBonferroniAdjustment,ApplyHolmAdjustment,ApplyFDRAdjustment,
 ValidatePValueCalibration,ValidatePValueInterpretation,
 CompareSemanticEquivalence,UpdateConfidence,PreserveProvenance,
 GenerateFormalExplanation
}

UPDATE_MODEL :=
 NewDataHypothesisStatisticDistributionAlphaOrEvidence
 → ValidateInput
 → IdentifyAffectedPValueClaims
 → UpdatePValueState
 → RecomputeObservedTestStatisticIfRequired
 → RecomputeNullDistributionIfRequired
 → RecomputeRawPValue
 → RecomputeAdjustedPValueIfRequired
 → RecomputeDecision
 → RevalidateCalibrationAndInterpretation
 → RecomputeConfidence
 → PreserveProvenance
 → VersionModel

DataUpdate :=
 ChangedObservedData
 ⇒ recompute(
  ObservedTestStatistic,
  RawPValue,
  AdjustedPValue,
  Decision
 )

HypothesisUpdate :=
 ChangedNullOrAlternative
 ⇒ reevaluate(
  NullDistribution,
  ExtremenessRule,
  RawPValue,
  Decision
 )

MultiplicityUpdate :=
 ChangedHypothesisFamilyOrAdjustmentMethod
 ⇒ recompute(
  AdjustedPValue,
  MultiplicityValidity
 )

FLOW_HASH_INPUT :=
 canonical(
  ONTOLOGY,
  CoreClasses,
  CoreRelations,
  InferenceRules,
  PValue,
  PValueValidation,
  PValueConstraint,
  SEMANTIC_EQUIVALENCE,
  AI_REASONING_FLOW
 )

FLOW_HASH := HASH(FLOW_HASH_INPUT)

OUTPUT_MODEL := {
 PValueEntityResolution,
 Population,
 Sample,
 Parameter,
 Estimand,
 NullHypothesis,
 AlternativeHypothesis,
 TestStatistic,
 ObservedTestStatistic,
 NullDistribution,
 ExtremenessRule,
 RawPValue,
 AdjustedPValue,
 SignificanceLevel,
 Decision,
 PValueMethod,
 SamplingDesign,
 MultiplicityMethod,
 CalibrationStatus,
 InterpretationStatus,
 ValidationStatus,
 Confidence,
 Provenance,
 Explanation
}

END_FLOW

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