Documentation

CslibFrontier.Foundations.Data.Finset.ExpectResample

Resampling a coordinate and even powers of averages #

Two facts about uniform averages used by Cauchy–Schwarz arguments that double a sample. An average raised to the power 2 ^ m is at most the average of the 2 ^ m-th powers (Finset.pow_two_pow_expect_le_expect_pow_two_pow), by m applications of Finset.sq_expect_le_expect_sq. Resampling one coordinate of a uniformly random dependent function ∀ i, X i keeps it uniformly random (Fintype.expect_expect_update_pi), the dependent form of Fintype.expect_expect_update, with no nonemptiness assumption.

Main results #

theorem Finset.pow_two_pow_expect_le_expect_pow_two_pow {ι : Type u_1} {R : Type u_2} [CommSemiring R] [LinearOrder R] [IsStrictOrderedRing R] [ExistsAddOfLE R] [Module ℚ≥0 R] [PosSMulMono ℚ≥0 R] (s : Finset ι) (f : ι → R) (m : ℕ) :
(s.expect fun (i : ι) => f i) ^ 2 ^ m ≤ s.expect fun (i : ι) => f i ^ 2 ^ m

An average raised to the power 2 ^ m is at most the average of the 2 ^ m-th powers, by repeated Cauchy–Schwarz (Finset.sq_expect_le_expect_sq). Over ℝ this is a case of the even-power Jensen inequality Real.pow_arith_mean_le_arith_mean_pow_of_even; this form needs no convexity and holds in any linearly ordered semiring averaged over ℚ≥0.

theorem Fintype.expect_expect_update_pi {ι : Type u_1} {M : Type u_2} [Fintype ι] [AddCommMonoid M] [Module ℚ≥0 M] [DecidableEq ι] {X : ι → Type u_3} [(i : ι) → Fintype (X i)] (F : ((i : ι) → X i) → M) (i : ι) :
(Finset.univ.expect fun (s : (a : ι) → X a) => Finset.univ.expect fun (a : X i) => F (Function.update s i a)) = Finset.univ.expect fun (s : (i : ι) → X i) => F s

Resampling one coordinate of a uniformly random dependent function keeps it uniformly random: the dependent form of Fintype.expect_expect_update, with no nonemptiness assumption.