Variance of the Zipf distribution
ProvedZipfLaw.zipfPMF_varianceharmonic-numberspower-lawzipf-law
For and real , the variance of the rank under the Zipf distribution is
Preamble
import Mathlib import Definitions.Def_ZipfLaw_Defs
Formal statement
namespace ZipfLaw
theorem zipfPMF_variance (N : ℕ) (hN : 1 ≤ N) (s : ℝ) :
(∑ k ∈ Finset.Icc 1 N, (k : ℝ) ^ 2 * zipfPMF N s k) -
(∑ k ∈ Finset.Icc 1 N, (k : ℝ) * zipfPMF N s k) ^ 2 =
genHarmonic N (s - 2) / genHarmonic N s -
genHarmonic N (s - 1) ^ 2 / genHarmonic N s ^ 2 := by sorry
end ZipfLawSource
Wikipedia, "Zipf's law" (https://en.wikipedia.org/wiki/Zipf%27s_law), snapshot uploaded by the proposer, infobox (Variance ).
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent as the drafter
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement, with full knowledge of the source article and of the intended meaning. It is not a blind audit by an independent reader, and no reviewer should treat it as one. Please compare it against the Lean code yourself.
For every natural and real :
with a natural-exponent power of the real .
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.