Documentation

CslibFrontier.Probability.BitString.Rademacher

Rademacher sums #

A Rademacher sum is Y = ∑ i, a i * signVal (x i) for a uniformly random x : ι → Bool, that is, a weighted sum of independent uniform signs. This file proves the moment and moment-generating-function bounds used for random sign projections.

Main results #

References #

A uniform sign has mean zero.

A sign squares to one.

theorem Cslib.BitString.expect_sq_sum_mul_signVal {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) :
(Finset.univ.expect fun (x : ι → Bool) => (∑ i : ι, a i * signVal (x i)) ^ 2) = ∑ i : ι, a i ^ 2

The second moment of a Rademacher sum: 𝔼 (∑ i, a i signVal (x i))² = ∑ i, a i ².

theorem Cslib.BitString.expect_norm_sum_signVal_smul_sq {ι : Type u_1} [Fintype ι] [DecidableEq ι] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (v : ι → E) :
(Finset.univ.expect fun (x : ι → Bool) => ‖∑ i : ι, signVal (x i) • v i‖ ^ 2) = ∑ i : ι, ‖v i‖ ^ 2

The second moment of a vector Rademacher sum: for vectors v i in a real inner product space, 𝔼 ‖∑ i, signVal (x i) • v i‖² = ∑ i, ‖v i‖², because distinct signs are uncorrelated.

theorem Cslib.BitString.expect_sum_mul_signVal_pow_four {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) :
(Finset.univ.expect fun (x : ι → Bool) => (∑ i : ι, a i * signVal (x i)) ^ 4) = 3 * (∑ i : ι, a i ^ 2) ^ 2 - 2 * ∑ i : ι, a i ^ 4

The fourth moment of a Rademacher sum: 𝔼 (∑ i, a i signVal (x i))⁴ = 3 (∑ i, a i ²)² - 2 ∑ i, a i ⁴.

theorem Cslib.BitString.expect_sum_mul_signVal_pow_four_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) :
(Finset.univ.expect fun (x : ι → Bool) => (∑ i : ι, a i * signVal (x i)) ^ 4) ≤ 3 * (∑ i : ι, a i ^ 2) ^ 2

The fourth moment of a Rademacher sum is at most that of a Gaussian with the same variance: 𝔼 (∑ i, a i signVal (x i))⁴ ≤ 3 (∑ i, a i ²)².

theorem Cslib.BitString.expect_sq_inv_sqrt_card_mul_sum_signVal {ι : Type u_1} [Fintype ι] [DecidableEq ι] [Nonempty ι] :
(Finset.univ.expect fun (x : ι → Bool) => ((√↑(Fintype.card ι))⁻¹ * ∑ i : ι, signVal (x i)) ^ 2) = 1

The normalized sum ∑ᵢ xᵢ / √n of n ≥ 1 uniform signs has second moment one.

theorem Cslib.BitString.expect_sq_inv_sqrt_card_mul_sum_signVal_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] :
(Finset.univ.expect fun (x : ι → Bool) => ((√↑(Fintype.card ι))⁻¹ * ∑ i : ι, signVal (x i)) ^ 2) ≤ 1

The normalized sum ∑ᵢ xᵢ / √n of n uniform signs has second moment at most one, for every n, including n = 0.

theorem Cslib.BitString.expect_exp_mul_sum_mul_signVal {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) (s : ℝ) :
(Finset.univ.expect fun (x : ι → Bool) => Real.exp (s * ∑ i : ι, a i * signVal (x i))) = ∏ i : ι, Real.cosh (s * a i)

The moment generating function of a Rademacher sum: 𝔼 exp (s ∑ i, a i signVal (x i)) = ∏ i, cosh (s a i).

theorem Cslib.BitString.expect_exp_mul_sum_mul_signVal_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) (s : ℝ) :
(Finset.univ.expect fun (x : ι → Bool) => Real.exp (s * ∑ i : ι, a i * signVal (x i))) ≤ Real.exp ((s ^ 2 * ∑ i : ι, a i ^ 2) / 2)

Rademacher sums are sub-Gaussian: 𝔼 exp (s ∑ i, a i signVal (x i)) ≤ exp (s² ∑ i, a i ² / 2).

theorem Cslib.BitString.expect_exp_mul_sq_sum_mul_signVal_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) {t : ℝ} (ht : 0 ≤ t) (hta : t * ∑ i : ι, a i ^ 2 < 1 / 2) :
(Finset.univ.expect fun (x : ι → Bool) => Real.exp (t * (∑ i : ι, a i * signVal (x i)) ^ 2)) ≤ (√(1 - 2 * (t * ∑ i : ι, a i ^ 2)))⁻¹

Gaussian comparison for the square of a Rademacher sum: for 0 ≤ t and t ∑ i, a i ² < 1 / 2, 𝔼 exp (t (∑ i, a i signVal (x i))²) ≤ 1 / √(1 - 2 t ∑ i, a i ²). The right side is 𝔼 exp (t (∑ i, a i ²) Z²) for a standard Gaussian Z.