A finite-sum version of the weak law of large numbers for the binomial distribution: with success probability \(a\) and failure probability \(b\) (\(a + b = 1\)), in \(n\) trials the weight of exactly \(k\) successes is denoted \(w(k) = \binom{n}{k} a^k b^{n-k}\). We deal with a **finite sum** of weights, not probabilities, so measure theory is not needed, and only equations and inequalities over the real numbers \(\mathbb{R}\) (Freeks/reals) are required.
To show: (1) \(\sum_k w(k) = 1\), (2) \(\sum_k k\,w(k) = na\), (3) \(\sum_k (k - na)^2 w(k) = nab\), (4) a Chebyshev-type inequality \(n \varepsilon^2 \sum_{|k - na| \ge n\varepsilon} w(k) \le ab\) (that is, \(\Pr[\,|k/n - a| \ge \varepsilon\,] \le ab / (n \varepsilon^2)\)). (4) is the weak law of large numbers.
11 The reals form a commutative ring
12 (1) Sum of the weights (from the binomial theorem)
Put the success and failure probabilities into \(a, b\) of the binomial theorem (Freeks/arith). Since \(a + b = 1\), \(\sum_k w(k) = (a+b)^n = 1^n = 1\).
Wsum …
\(a , b \in \mathbb{R} , a + b = 1 \Longrightarrow \forall n \in \mathbb{M} . \sum_{ k \in 0 \mathinner{\ldotp\ldotp} n } n \mathrm{C} k \cdot ( a ^ k \cdot b ^ { n - k } ) = 1\) \(\blacktriangleleft\) RCR ,RCRing ,L1pR ,\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} , a , b \in X \Longrightarrow \forall n \in \mathbb{M} . ( a + b ) ^ n = \sum_{ k \in 0 \mathinner{\ldotp\ldotp} n } n \mathrm{C} k \cdot ( a ^ k \cdot b ^ { n - k } )\) ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+13 Tools for weighted sums (hidden lemmas)
For the weight \(w_n(k)\) and a function \(F\), the sum of their products \(E_n[F] = \sum_{k \le n} w_n(k) F(k)\) satisfies \(E_{n+1}[F] = b\,E_n[F] + a\,E_n[F(\cdot + 1)]\) by Pascal's recurrence (RecF). A linear combination of terms gives a linear combination of sums (Lin), and termwise inequalities give an inequality of sums (Lmon).
14 (2) Mean
The weighted sum of the deviation from the mean \(k - na\) is 0. From \(E_{n+1}[k - (n+1)a] = E_n[b(k - na - a) + a(k - na + b)] = E_n[k - na]\) (\(a + b = 1\)), by induction on \(n\); together with \(\sum w(k) = 1\), \(\sum k\,w(k) = na\).
Wmean …
\(a , b \in \mathbb{R} , a + b = 1 \Longrightarrow \forall n \in \mathbb{M} . \sum_{ k \in 0 \mathinner{\ldotp\ldotp} n } n \mathrm{C} k \cdot ( ( a ^ k \cdot b ^ { n - k } ) \cdot k ) = n \cdot a\) \(\blacktriangleleft\) RCR ,RCRing ,LMn ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,AxΣ15 (3) Variance
Using \(F(k) = (k - (n+1)a)^2\) in the same recurrence gives \(b(u - a)^2 + a(u + b)^2 = u^2 + ab\) (\(u = k - na\)), so \(V(n+1) = V(n) + ab\).
Wvar …
\(a , b \in \mathbb{R} , a + b = 1 \Longrightarrow \forall n \in \mathbb{M} . \sum_{ k \in 0 \mathinner{\ldotp\ldotp} n } n \mathrm{C} k \cdot ( ( a ^ k \cdot b ^ { n - k } ) \cdot ( ( k + ( - ( n \cdot a ) ) ) \cdot ( k + ( - ( n \cdot a ) ) ) ) ) = n \cdot ( a \cdot b )\) \(\blacktriangleleft\) RCR ,RCRing ,LVs ,LV00 ,LO0 ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,AxΣ16 (4) The weak law of large numbers (Chebyshev type)
The sum over the "set of bad \(k\)" is written using a selection function \(s\): \(s(k) = 0\), or \(s(k) = 1\) and \((n\varepsilon)^2 \le (k - na)^2\) (a function that selects only elements of \(|k/n - a| \ge \varepsilon\), namely \(k\), satisfies this condition). Since \((n\varepsilon)^2 s(k) \le (k - na)^2\) for each term, \((n\varepsilon)^2 \sum s\,w \le \sum (k - na)^2 w = nab\). Dividing by \(n\) gives \(n \varepsilon^2 \sum s\,w \le ab\) (a form avoiding division).
Wcheb …
\(a , b , e \in \mathbb{R} , a + b = 1 , 0 \le a , 0 \le b , 0 < e , n \in \mathbb{M} ^{\times} , \forall k \in \mathbb{M} . ( {s} ( k ) = 0 \mathbin{\rm o\!r} ( {s} ( k ) = 1 , ( ( n \cdot e ) \cdot ( n \cdot e ) ) \le ( k + ( - ( n \cdot a ) ) ) \cdot ( k + ( - ( n \cdot a ) ) ) ) ) \Longrightarrow ( n \cdot ( e \cdot e ) ) \cdot \sum_{ k \in 0 \mathinner{\ldotp\ldotp} n } n \mathrm{C} k \cdot ( ( a ^ k \cdot b ^ { n - k } ) \cdot {s} ( k ) ) \le a \cdot b\) \(\blacktriangleleft\) AxR ,Lmo ,Wvar ,Lcan ,Lc∈ ,Lpw ,RM1 ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,AxΣ