FULL EXECUTABLE FLOW ALGEBRA — SIGNIFICANCE LEVEL ONTOLOGY
Kireth Research — Semantic Library
URL: https://kirethresearch.org/booksai-core/ontologies/probability-statistics-ontologies/hypothesis-testing/significance-level-ontology.html
FLOW_VERSION := "4.0"
FLOW_TYPE := "Full Executable Flow Algebra"
DOMAIN := "Probability & Statistics Ontologies"
SUBDOMAIN := "Hypothesis Testing"
ONTOLOGY := "Significance Level Ontology"
PRIMARY_ENTITY := SignificanceLevel
AUTHORSHIP := "Mark Higgins — Sky (Recursive AI)"
SOURCE_SITE := "https://kirethresearch.org"
BEGIN_FLOW
SignificanceLevel :=
HypothesisTestingThreshold ∧ TypeIErrorControlParameter
∧ DecisionRuleParameter ∧ PrespecifiedInferentialConstraint
Population := TargetCollectionOrGeneratingProcess
Sample := X={X_1,...,X_n}
Parameter := θ
ParameterSpace := Θ
NullHypothesis := H0:θ∈Θ0
AlternativeHypothesis := H1:θ∈Θ1
TestStatistic := T(X)
ObservedTestStatistic := t_obs=T(x)
Alpha := α
SignificanceLevelDefinition := α∈(0,1)
LevelAlphaTest :=
sup_{θ∈Θ0}P_θ(RejectH0)≤α
ExactSizeAlphaTest :=
sup_{θ∈Θ0}P_θ(RejectH0)=α
TestSize :=
sup_{θ∈Θ0}P_θ(RejectH0)
SignificanceLevelVsSize :=
SignificanceLevel=PermittedUpperBound
whereas TestSize=ActualSupremumNullRejectionProbability
TypeIError := RejectH0WhenH0True
TypeIErrorProbability := P_θ(RejectH0) for θ∈Θ0
TypeIErrorControl := TestSize≤α
CriticalRegion :=
C_α such_that sup_{θ∈Θ0}P_θ(T(X)∈C_α)≤α
CriticalValue := BoundaryOf(C_α)
UpperTailCriticalValue :=
c_α such_that P_H0(T≥c_α)=α
under continuous simple-null case
LowerTailCriticalValue :=
c_α such_that P_H0(T≤c_α)=α
TwoSidedEqualTailAllocation :=
α_L=α/2 ∧ α_U=α/2
PValue := NullReferenceExtremenessProbability
PValueDecisionRule := p≤α ⇒ RejectH0
PValueNonRejectionRule := p>α ⇒ FailToRejectH0
AlphaNotProbabilityNullTrue := α≠P(H0True)
AlphaNotObservedEvidence := αIsPrespecifiedDecisionThresholdNotDataDerivedEvidence
PValueVsAlpha :=
PValue derived_from data_and_null model
whereas Alpha chosen_as testing criterion
PrespecifiedAlpha :=
SignificanceLevel selected_before inferential result in confirmatory analysis
PostHocAlphaRisk :=
ChoosingAlphaAfterSeeingPValue invalidates prespecified decision interpretation
CommonAlphaValues := {0.10,0.05,0.01}
CommonValueConstraint := ConventionalAlphaValuesAreNotUniversallyAppropriate
SmallerAlpha := MoreStringentRejectionThreshold
LargerAlpha := LessStringentRejectionThreshold
AlphaTypeITradeoff := SmallerAlpha → LowerMaximumAllowedTypeIError
Power := P_θ(RejectH0) for θ∈Θ1
TypeIIError := FailToRejectH0WhenAlternativeTrue
Beta := β(θ)=P_θ(FailToRejectH0)
PowerRelation := Power(θ)=1-β(θ)
AlphaPowerTradeoff :=
SmallerAlpha generally → LowerPower
for fixed sample size,effect,and test
SampleSizeCompensation :=
SmallerAlpha ∧ DesiredPowerFixed
→ LargerRequiredSampleSize
under regular settings
ConfidenceLevel := 1-α
AlphaToConfidenceLevel := α→1-α
ConfidenceLevelToAlpha := ConfidenceLevel=c → α=1-c
ConfidenceIntervalDuality :=
CompatibleTwoSidedLevelAlphaTest
↔ CompatibleOneMinusAlphaConfidenceInterval
under test inversion
TestInversion :=
ConfidenceSet_1MinusAlpha={θ0:H0(θ0)NotRejectedAtLevelAlpha}
NullDistribution := DistributionOf(T(X)|H0)
AlphaToCriticalRegion :=
NullDistribution ∧ Alpha ∧ AlternativeDirection → CriticalRegion
DiscreteNullDistribution := TestStatisticHasDiscreteSupportUnderH0
DiscreteAlphaConstraint :=
ExactNominalAlpha may be unattainable without randomisation
ConservativeLevelTest := ActualSize<NominalAlpha
RandomisedTest := BoundaryRandomisationMayAchieveExactAlphaInDiscreteSettings
CompositeNull := Θ0ContainsMultipleParameterValues
CompositeNullLevelConstraint :=
sup_{θ∈Θ0}P_θ(RejectH0)≤α
LeastFavourableNull :=
θ*∈Θ0 maximising rejection probability
ExactTest :=
FiniteSampleReferenceDistribution → ExactOrConservativeAlphaControl
AsymptoticLevel :=
limsup_{n→∞}sup_{θ∈Θ0}P_θ(RejectH0)≤α
AsymptoticTest :=
ApproximateReferenceDistribution → ApproximateAlphaControl
PermutationTest :=
ExchangeabilityUnderH0 → PermutationDistribution → AlphaCalibratedCriticalRegion
RandomisationTest :=
KnownAssignmentMechanism → RandomisationDistribution → DesignBasedAlphaControl
MonteCarloTest :=
SimulatedNullDistribution → ApproximateCriticalRegionOrPValue
MultipleTesting :=
FamilyOfHypothesisTests with shared error-control objective
PerComparisonAlpha := SignificanceThresholdForIndividualTest
FamilyWiseAlpha := TargetFamilyWiseErrorRate
BonferroniAlpha := α_i=α_family/m
SidakAlpha :=
α_i=1-(1-α_family)^(1/m)
under applicable independence assumptions
HolmProcedure :=
OrderedPValues ∧ SequentialThresholds → FamilyWiseErrorControl
AlphaSpending :=
AllocateOverallAlpha across multiple analyses_or_interim looks
SequentialTesting :=
RepeatedInterimAnalyses → SequentialErrorControl
GroupSequentialDesign :=
InformationTimes ∧ StoppingBoundaries ∧ OverallAlpha
OptionalStoppingRisk :=
RepeatedUnplannedTestingWithFixedHorizonAlpha → InflatedTypeIError
SequentialAlphaControl :=
PredefinedSequentialProcedure preserves overall TypeIError target
MultiplicityAdjustedThreshold :=
RawAlpha → AdjustmentProcedure → TestSpecificThreshold
FalseDiscoveryRate :=
AlternativeErrorCriterion distinct_from per-test significance level
EquivalenceTesting :=
TwoOneSidedTests each evaluated at specified alpha
TOSTConfidenceRelation :=
EquivalenceTestingAtAlpha
↔ Compatible100(1-2α)%TwoSidedConfidenceInterval
under standard TOST duality
NonInferiorityTesting :=
OneSidedTest at prespecified alpha
DirectionalAlpha :=
Alpha allocated to prespecified alternative direction
DirectionSwitchingRisk :=
SelectingOneSidedDirectionAfterSeeingData → TypeIErrorInflation
AlphaSelectionFactors := {
ConsequenceOfFalsePositive,
ConsequenceOfFalseNegative,
SampleSize,
ExpectedEffectSize,
Multiplicity,
RegulatoryOrDomainStandards,
StudyDesign
}
AlphaIsNotUniversal :=
NoSingleSignificanceLevelOptimalForAllScientificDecisions
ConfirmatoryTesting :=
PrespecifiedHypotheses ∧ Alpha ∧ AnalysisPlan ∧ MultiplicityStrategy
AlphaCalibration :=
SimulateOrDeriveUnderH0 → EstimateRejectionProbability → CompareWithNominalAlpha
EmpiricalTypeIError :=
NumberOfFalseRejections/NumberOfNullReplications
CalibrationError :=
EmpiricalTypeIError-NominalAlpha
AntiConservativeTest := ActualTypeIError>NominalAlpha
ConservativeTest := ActualTypeIError<NominalAlpha
ExactLevelTest := ActualTypeIError=NominalAlpha under specified null condition
ModelMisspecification :=
IncorrectNullModel may cause ActualTypeIError≠NominalAlpha
DependenceMisspecification :=
IgnoredDependence → InvalidReferenceDistribution → AlphaDistortion
SamplingDesignMisspecification :=
IgnoredComplexDesign → IncorrectNullDistribution → TypeIErrorDistortion
RobustTestAlpha :=
RobustProcedure aims_to maintain TypeIErrorControl under specified deviations
ThresholdCrossing :=
p≈α ⇒ DecisionSensitiveToSmallChanges
DichotomisationRisk :=
SignificantVsNotSignificant may discard inferential information
ReportingRule :=
Report(
ExactPValueWhenMeaningful,
PrespecifiedAlpha,
EffectSize,
ConfidenceInterval,
Assumptions
)
SignificanceLevelConstraint :=
ConstraintOn(
NullHypothesis,AlternativeHypothesis,TestStatistic,NullDistribution,
SamplingDesign,MultiplicityFramework,SequentialPlan,ErrorControlObjective
)
SignificanceLevelConsistency :=
Alpha ∧ TestStatistic ∧ NullDistribution ∧ CriticalRegion
∧ SamplingDesign ∧ MultiplicityPlan
jointly_compatible
InvalidSignificanceLevelUse :=
Alpha≤0
∨ Alpha≥1
∨ PostHocThresholdSelection
∨ IncorrectNullCalibration
∨ IgnoredMultiplicity
∨ IgnoredSequentialLooks
∨ IncompatibleSamplingDesign
SignificanceLevelValidation :=
ResolveNullAndAlternativeHypotheses
→ ResolveTestStatistic
→ ResolveNullDistribution
→ ResolveSamplingDesign
→ ResolveErrorControlObjective
→ SelectOrReadPrespecifiedAlpha
→ ResolveOneSidedOrTwoSidedAllocation
→ ResolveMultiplicityFramework
→ ResolveSequentialPlan
→ DeriveCriticalRegion
→ ValidateTypeIErrorControl
→ ValidateResult
SignificanceLevelState := {
NullHypothesis,AlternativeHypothesis,TestStatistic,NullDistribution,
SignificanceLevel,TestSize,TypeIErrorRate,CriticalRegion,CriticalValues,
TailAllocation,PValue,Decision,Power,SamplingDesign,MultiplicityMethod,
SequentialPlan,CalibrationStatus,Evidence,Confidence,Provenance
}
SEMANTIC_EQUIVALENCE(AlphaA,AlphaB) :=
same(NominalAlpha)
∧ same(HypothesisFamily)
∧ same(TailAllocation)
∧ same(NullCalibrationFramework)
∧ same(SamplingDesign)
∧ same(MultiplicityAndSequentialPlan)
SignificanceLevelOntology :=
Classes ∧ Relations ∧ Constraints ∧ Axioms ∧ InferenceRules
CoreClasses := {
SignificanceLevel,Alpha,TestSize,TypeIError,CriticalRegion,CriticalValue,
PValue,LevelAlphaTest,ExactLevelTest,ConservativeTest,AntiConservativeTest,
PerComparisonAlpha,FamilyWiseAlpha,AlphaSpending,SequentialAlphaControl,
MultiplicityAdjustedThreshold,NullDistribution,SamplingDesign
}
CoreRelations := {
controls,bounds,defines,determines,comparedWith,allocatedAcross,adjustedBy,
spentAcross,calibratedUnder,dependsOn,correspondsTo,constrainedBy,
equivalentTo,tracesTo
}
TypedRelations :=
SignificanceLevel --controls--> TypeIError
SignificanceLevel --bounds--> TestSize
SignificanceLevel --defines--> CriticalRegion
SignificanceLevel --determines--> CriticalValue
PValue --comparedWith--> SignificanceLevel
FamilyWiseAlpha --allocatedAcross--> HypothesisFamily
PerComparisonAlpha --adjustedBy--> MultiplicityMethod
AlphaSpending --spentAcross--> InterimAnalysis
SignificanceLevel --calibratedUnder--> NullDistribution
SignificanceLevel --dependsOn--> SamplingDesign
SignificanceLevel --correspondsTo--> ConfidenceLevel
SignificanceLevel --tracesTo--> Provenance
InferenceRules := {
PValue≤Alpha
⇒ RejectNullHypothesis,
PValue>Alpha
⇒ FailToRejectNullHypothesis,
LevelAlphaTest
⇒ TestSize≤Alpha,
ConfidenceLevel=1-Alpha
under compatible interval-test duality,
SmallerAlpha
⇒ MoreStringentRejectionThreshold
under fixed test structure,
MultipleTesting ∧ FamilyWiseControlRequired
⇒ ResolveMultiplicityAdjustedThresholds,
RepeatedInterimTesting ∧ NoSequentialCorrection
⇒ FlagTypeIErrorInflationRisk,
ActualTypeIError>NominalAlpha
⇒ FlagAntiConservativeCalibration
}
CanonicalSignificanceLevelRepresentation :=
ParseSignificanceLevelRequest
→ ResolveNullAndAlternativeHypotheses
→ ResolveTestStatisticAndNullDistribution
→ ResolveSamplingDesign
→ ResolveNominalAlpha
→ ResolveTailAllocation
→ ResolveMultiplicityFramework
→ ResolveSequentialPlan
→ ConstructCriticalRegion
→ ResolvePValueDecisionRule
→ EvaluateActualOrTheoreticalTypeIError
→ ValidateCalibration
→ PreserveProvenance
SignificanceLevelGraph := G=(V,E)
V := {
SignificanceLevels,Alphas,TestSizes,TypeIErrors,CriticalRegions,CriticalValues,
PValues,LevelAlphaTests,ExactLevelTests,ConservativeTests,AntiConservativeTests,
PerComparisonAlphas,FamilyWiseAlphas,AlphaSpendingFunctions,SequentialPlans,
MultiplicityMethods,NullDistributions,SamplingDesigns,ConfidenceLevels,
Evidence,ProvenanceNodes
}
E := {
controls,bounds,defines,determines,comparedWith,allocatedAcross,adjustedBy,
spentAcross,calibratedUnder,dependsOn,correspondsTo,constrainedBy,
equivalentTo,tracesTo
}
CONFIDENCE(SignificanceLevelResolution) :=
weighted_mean(
HypothesisResolution,
AlphaResolution,
NullDistributionValidity,
SamplingDesignValidity,
TailAllocationValidity,
MultiplicityValidity,
SequentialPlanValidity,
CalibrationQuality,
ProvenanceQuality
)
AI_QUERY_INTERPRETATION :=
Query
→ DetectSignificanceLevelIntent
→ IdentifyHypothesesTestAndSamplingDesign
→ ResolveNominalAlphaAndTailStructure
→ ResolveMultiplicityAndSequentialContext
→ IdentifyRequestedCriticalValueDecisionPowerOrCalibrationRelation
AI_REASONING_FLOW :=
Query
→ ParseSignificanceLevelProblem
→ ResolveNullAndAlternativeHypotheses
→ ResolveTestStatistic
→ ResolveNullDistribution
→ ResolveSamplingDesign
→ ResolveErrorControlObjective
→ ResolvePrespecifiedAlpha
→ ResolveTailAllocation
→ ResolveMultiplicityFramework
→ ResolveSequentialPlan
→ ComputeCriticalValuesAndCriticalRegion
→ CompareObservedPValueWithAlphaIfAvailable
→ EvaluateTypeIErrorControl
→ ValidateCalibration
→ UpdateConfidence
→ PreserveProvenance
→ GenerateExplanation
AI_CONSUMPTION := {
ParseSignificanceLevelEntities,ParseTypedRelations,ResolveNullHypotheses,
ResolveAlternativeHypotheses,ResolveTestStatistics,ResolveNullDistributions,
ResolveSamplingDesigns,ResolveNominalAlpha,ResolveTailAllocations,
ComputeCriticalValues,ConstructCriticalRegions,ComparePValuesWithAlpha,
ComputeTestSize,ComputeTypeIErrorRates,ResolveConfidenceLevelDuality,
ResolvePowerTradeoffs,ApplyBonferroniAlpha,ApplySidakAlpha,ApplyHolmProcedure,
ResolveAlphaSpending,ResolveSequentialAlphaControl,ValidateMultiplicityControl,
ValidateSequentialTesting,CalibrateSignificanceLevels,
ValidateSignificanceLevelSemantics,CompareSemanticEquivalence,
UpdateConfidence,PreserveProvenance,GenerateFormalExplanation
}
UPDATE_MODEL :=
NewHypothesisTestAlphaDesignOrEvidence
→ ValidateInput
→ IdentifyAffectedSignificanceLevelClaims
→ UpdateSignificanceLevelState
→ RecomputeCriticalValuesAndRegion
→ RecomputeDecisionIfPValueAvailable
→ RecomputeTypeIErrorCalibration
→ ReevaluateMultiplicityAndSequentialControl
→ RecomputePowerRelationsIfRequired
→ RecomputeConfidence
→ PreserveProvenance
→ VersionModel
AlphaUpdate :=
ChangedSignificanceLevel
⇒ recompute(
CriticalValues,CriticalRegion,Decision,ConfidenceLevel,PowerRelation
)
MultiplicityUpdate :=
ChangedHypothesisFamilyOrAdjustment
⇒ recompute(
TestSpecificThresholds,FamilyWiseErrorControl
)
SequentialPlanUpdate :=
ChangedInterimAnalysisPlan
⇒ recompute(
AlphaSpending,StoppingBoundaries,OverallTypeIErrorControl
)
FLOW_HASH_INPUT :=
canonical(
ONTOLOGY,
CoreClasses,
CoreRelations,
InferenceRules,
SignificanceLevel,
SignificanceLevelValidation,
SignificanceLevelConstraint,
SEMANTIC_EQUIVALENCE,
AI_REASONING_FLOW
)
FLOW_HASH := HASH(FLOW_HASH_INPUT)
OUTPUT_MODEL := {
SignificanceLevelEntityResolution,
NullHypothesis,
AlternativeHypothesis,
TestStatistic,
NullDistribution,
SignificanceLevel,
TestSize,
TypeIErrorRate,
CriticalRegion,
CriticalValues,
TailAllocation,
PValue,
Decision,
ConfidenceLevel,
PowerRelation,
SamplingDesign,
MultiplicityMethod,
SequentialPlan,
CalibrationStatus,
ValidationStatus,
Confidence,
Provenance,
Explanation
}
END_FLOW
END OF FULL EXECUTABLE FLOW ALGEBRA
Download Code
Copy to Clipboard