Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Statlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import Statlib.ForMathlib.Probability.StrongLaw
import Statlib.ForMathlib.Topology.Order.MonotoneConvergence
import Statlib.Inference.Inference
import Statlib.Inference.QMD
import Statlib.PValues.PValue
import Statlib.Testing.Binary
import Statlib.Testing.BinaryRenyi
import Statlib.Testing.ChangeMeasure
Expand Down
37 changes: 37 additions & 0 deletions Statlib/PValues/PValue.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/-
Copyright (c) 2026 Rajarshi Mukherjee. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rajarshi Mukherjee
-/

module

public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure

/-!
# P-values for composite null hypotheses

A p-value is a measurable function taking values in [0, 1] that
uniformly has prescribed tail probability
under every probability measure in the null hypothesis.
-/

@[expose] public section

open scoped ENNReal

open MeasureTheory

variable {𝓧 : Type*} [m𝓧 : MeasurableSpace 𝓧]

namespace ProbabilityTheory

/-- A valid p-value for the composite null hypothesis `S`. -/
structure IsPValue (Pval : 𝓧 β†’ ℝβ‰₯0∞)
(S : Set (ProbabilityMeasure 𝓧)) : Prop where
measurable : Measurable Pval := by fun_prop
le_one : βˆ€ Ο‰, Pval Ο‰ ≀ 1
s_uniform : βˆ€ ΞΌ ∈ S, βˆ€ Ξ± : ℝβ‰₯0∞,
(ΞΌ : Measure 𝓧) {Ο‰ | Pval Ο‰ ≀ Ξ±} ≀ Ξ±

end ProbabilityTheory
Loading