Printed statistics: schema #
The primitive values of Data/Statistics/<Paper>.lean, the per-paper modules that
scripts/gen_statistics.py generates from Data/Statistics/<Paper>.json. A paper's own coding
labels (its factors, response types, predictors) become generated enums, and each table it
prints becomes a generated structure with one row per printed line; this file holds only what
every paper shares.
This is data: it imports nothing from Linglib/ and states no theorems about theories.
A statistic is kept as printed, Decimal recording the digits so that 75 and 75.0 differ,
and a study reads it through Decimal.toRat. A p-value is a PValue, kept with the relation it
is printed with, so that p < .05 and p = .05 differ, and read at a level through
PValue.Significant. What a study concludes from the numbers (a prototype, a preference, the
effects it counts as found) is a definition in the study, not a stored label.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Data.Statistics.instReprDecimal = { reprPrec := Data.Statistics.instReprDecimal.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- d.instDecidableLtRatOfNatToRat = decidable_of_iff' (0 < d.mantissa) ⋯
Equations
- d.instDecidableLtRatToRatOfNat = decidable_of_iff' (d.mantissa < 0) ⋯
The printed value in hundredths, exact when at most two places are printed: a proportion printed to two places, in percent.
Equations
- d.hundredths = d.mantissa * 100 / 10 ^ d.exponent
Instances For
Equations
The printed value is the percentage 100 * k / n rounded to the printed places.
Equations
- d.RoundsPercent k n = d.Rounds (100 * k) n
Instances For
Equations
Some count out of n rounds to the printed percentage.
Equations
- d.AttainablePercent n = ∃ (k : Fin (n + 1)), d.RoundsPercent (↑k) n
Instances For
Equations
- d.instDecidableAttainablePercent n = { decide := decide (∃ k < n + 1, ∀ (h : k < n + 1), (fun (x : Fin (n + 1)) => d.RoundsPercent (↑x) n) ⟨k, h⟩), reflects_decide := ⋯ }
Equations
- Data.Statistics.instDecidableEqPValue.decEq { relation := a, value := a_1 } { relation := b, value := b_1 } = if h : a = b then h ▸ if h : a_1 = b_1 then h ▸ isTrue ⋯ else isFalse ⋯ else isFalse ⋯
Instances For
Equations
- Data.Statistics.instReprPValue = { reprPrec := Data.Statistics.instReprPValue.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
A printed p-value is significant at level α when every p-value it allows is below α.
Equations
- p.Significant α = ∀ (q : ℚ), compare q p.value.toRat = p.relation → q < α
Instances For
Equations
- { relation := Ordering.lt, value := value }.instDecidableSignificant α = decidable_of_iff' (value.toRat ≤ α) ⋯
- { relation := Ordering.eq, value := value }.instDecidableSignificant α = decidable_of_iff' (value.toRat < α) ⋯
- { relation := Ordering.gt, value := value }.instDecidableSignificant α = isFalse ⋯
The sign of a binary feature in the [+F] / [-F] notation.
Instances For
Equations
- Data.Statistics.instDecidableEqSign x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Data.Statistics.instReprSign = { reprPrec := Data.Statistics.instReprSign.repr }
Equations
- One or more equations did not get rendered due to their size.
- Data.Statistics.instReprSign.repr Data.Statistics.Sign.plus prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Data.Statistics.Sign.plus")).group prec✝