Chebyshev's integral inequality and empirical covariance [UPSTREAM] #
Two real random variables that monovary have nonnegative covariance, and two that antivary
have nonpositive covariance. On a finite measure the statement is
(∫ X ∂μ) * ∫ Y ∂μ ≤ μ.real univ * ∫ X * Y ∂μ, the integral form of Chebyshev's sum
inequality (MonovaryOn.sum_mul_sum_le_card_mul_sum); on a probability measure it reads
0 ≤ cov[X, Y; μ].
Under the uniform measure on a finite type the covariance is the sample covariance, the mean of the products less the product of the means, and it is positive exactly when the sum of products exceeds the product of the sums divided by the sample size.
Main declarations #
Monovary.integral_mul_integral_le_measureReal_univ_mul_integral,Antivary.measureReal_univ_mul_integral_le_integral_mul_integral: Chebyshev's integral inequality on a finite measure and its dual.Monovary.covariance_nonneg,Antivary.covariance_nonpos: the covariance forms.covariance_uniformOn_univ,covariance_uniformOn_univ_pos_iff: the sample covariance under the uniform measure on a finite type and the sign of its numerator.
Implementation notes #
The proof integrates 0 ≤ (X ω - X ω') * (Y ω - Y ω'), pointwise nonnegative by
Monovary.sub_mul_sub_nonneg, over the product measure μ.prod μ, where it expands to twice
the covariance defect. The dual follows by negating X.
Chebyshev's integral inequality: when X and Y monovary, the product of their
integrals is at most the total mass times the integral of their product.
Chebyshev's integral inequality: when X and Y antivary, the product of their
integrals is at least the total mass times the integral of their product.
Random variables that monovary have nonnegative covariance.
Random variables that antivary have nonpositive covariance.
The integral under the uniform measure on a finite type is the sample mean.
The covariance under the uniform measure on a finite type is the sample covariance.
The sample covariance is positive exactly when the product of the sums is less than the sample size times the sum of the products.