45.05.08 · mathematical-statistics / 05-empirical-processes-nonparametric

Orthogonal-Series and Wavelet Density Estimation

shipped3 tiersLean: none

Anchor (Master): Tsybakov 2009 Introduction to Nonparametric Estimation (Springer) Ch. 1-3 (kernel vs. projection estimators, the minimax risk over Sobolev/Holder classes, the lower bounds); Donoho & Johnstone 1994 Biometrika 81 (ideal spatial adaptation by wavelet shrinkage; the universal threshold and near-minimaxity over Besov balls); Hardle, Kerkyacharian, Picard & Tsybakov 1998 Wavelets, Approximation, and Statistical Applications (Springer) Ch. 9-10 (wavelet density estimation, Besov-class adaptivity)

Intuition Beginner

You have a sample of numbers and you want to draw the curve they came from — the density that says where values are common and where they are rare. One way you have already met is the histogram, or its smooth cousin the kernel estimate: slide a little bump over each data point and add them up. This unit takes a different route. Instead of building the curve out of bumps, build it out of waves.

Think of any musical chord as a sum of pure tones: a low hum for the overall shape, then higher tones adding finer wiggles. A density can be written the same way. Pick a fixed library of standard wave shapes — say cosine curves of increasing frequency. The true density is some particular recipe: so much of the slow cosine, so much of the next, and so on. Each amount in the recipe is just an average you can estimate from the data.

Keep the first few terms, throw away the rest, and you have a smooth estimate. How many terms you keep is the one knob: too few and you miss real features, too many and you start tracing the noise.

The catch is that fixed waves spread across the whole line. If your density is smooth in most places but has one sharp spike, the cosine recipe has to use many high-frequency terms everywhere just to build that one spike, and those terms add ripples far away from it. Kernels have the same trouble: one bandwidth for the whole curve cannot be both wide where the curve is flat and narrow where it is sharp.

Wavelets fix this. A wavelet is a little wave that is localized — it lives in one small region and is silent elsewhere — and it comes in a whole family of sizes and positions. You spend coarse wavelets on the broad shape and fine wavelets only near the spike, where detail is actually needed. Better still, you can look at all the estimated wavelet amounts and simply delete the small ones, which are almost surely just noise. Keeping only the few large amounts gives a clean estimate that automatically uses fine detail where the function wiggles and stays smooth where it does not.

Visual Beginner

The table contrasts how the two families spend their "budget" of terms, and what the deletion rule does.

Approach What the building blocks look like Where detail goes What you tune
Cosine series full-width waves, low to high frequency spread evenly over the whole curve how many terms to keep (the cutoff)
Kernel / bump one bump shape, one width the same everywhere the single bandwidth
Wavelets, keep all coarse small localized waves at many scales and places a fixed amount at each scale the finest scale
Wavelets, delete small ones same localized waves concentrated only where the curve wiggles the deletion level (threshold)

The single picture to carry forward: a series estimate decides how many waves to keep; a thresholded wavelet estimate decides which waves to keep, deleting the small noisy ones. Choosing which, not just how many, is what lets wavelets put detail exactly where the curve needs it.

Worked example Beginner

We estimate the first few cosine amounts of a density from a tiny sample, by direct averaging. Use the cosine library on the interval from to . Its members are the flat function and the cosines for . The amount of in the true density is the average value of when is drawn from , written . So we can estimate by plugging each data point into and averaging.

Take four data points: . We estimate , the amount of the first cosine .

Step 1. Evaluate at each point. With : at , , so . At , , so . At , , so . At , , so .

Step 2. Average the four values: .

Step 3. Read the meaning. The estimate is small and positive, saying the data lean only slightly toward the low end where is positive. The estimate of is always exactly , because averages to for any sample.

Step 4. Build a two-term estimate: . This is a gentle tilt away from flat.

What this tells us: every amount in the recipe is just a sample average, so building a series density estimate is the same averaging idea behind the empirical distribution, applied to wave shapes instead of step thresholds. Keep more terms to add finer features; stop early to stay smooth.

Check your understanding Beginner

Formal definition Intermediate+

Let be i.i.d. with an unknown density , and fix an orthonormal basis of with respect to the Lebesgue inner product . The development follows Wasserman [Wasserman, L. — All of Nonparametric Statistics] Ch. 8-9 and Tsybakov [Tsybakov, A. B. — Introduction to Nonparametric Estimation] Ch. 1-3. The plug-in averaging that defines the coefficient estimates is the same device that produces the empirical distribution and its functionals 45.05.02.

Definition (Fourier coefficients in a basis). Since is a complete orthonormal system, in , with coefficients

The representation of is Parseval's identity for the basis ; the -theory of such expansions, with Bessel's inequality and Parseval's identity, is developed for the trigonometric system in 02.10.01, and the abstract Hilbert-space version is 02.11.08. The standard choices are the cosine basis , , and the Legendre or Fourier bases.

Definition (orthogonal-series / projection estimator). Because each is an expectation, estimate it by the sample average , an unbiased estimator with . Truncating at a resolution (cutoff) gives the orthogonal-series (or projection) density estimator

The cutoff is the smoothing parameter, the series analogue of a kernel bandwidth: small oversmooths, large undersmooths.

Definition (Sobolev ellipsoid). A density has Sobolev smoothness of order with radius if its coefficients lie in the ellipsoid

which for the trigonometric basis encodes square-integrable weak derivatives. The decay rate is the smoothness; faster decay of means a smoother .

Definition (multiresolution analysis). A multiresolution analysis (MRA) of is a nested sequence of closed subspaces with , , the scaling relation , and a father wavelet (scaling function) whose integer shifts form an orthonormal basis of . The orthogonal complement is the detail space, spanned by the shifts of a mother wavelet .

Definition (wavelet basis and DWT). From one forms the dilated-translated families

and is an orthonormal basis of . The expansion has approximation coefficients at the coarse scale and detail coefficients at finer scales. The map from samples of to the finite array via the cascade filter recursion is the discrete wavelet transform (DWT); the prototype is the Haar MRA, and .

Definition (thresholding). Given empirical detail coefficients and a threshold , the hard-threshold and soft-threshold estimators are

Hard thresholding keeps a coefficient unchanged or deletes it; soft thresholding additionally shrinks the survivors toward zero by . The soft-threshold operator is exactly the proximal map of , the same shrinkage that produces sparsity in the lasso 45.06.06.

Counterexamples to common slips

  • The estimated density need not be a density. The truncated series can be negative and need not integrate to one (though is forced to a constant by orthonormality with ). Post-processing — truncating negatives and renormalizing — restores a bona fide density without changing the rate.
  • The cutoff is not a count of "good" terms. Linear truncation keeps all coefficients up to , including small ones full of noise, and discards all beyond , including occasional large ones. This is precisely the rigidity that nonlinear thresholding removes by deciding coefficient-by-coefficient.
  • A high-resolution wavelet basis is not a higher-order kernel. A linear wavelet estimator at fixed finest scale is a kernel-type (linear) estimator and shares the kernel's inability to adapt to inhomogeneous smoothness 26.08.01; the adaptivity comes only from the nonlinear thresholding step, not from the basis alone.
  • Soft and hard thresholding differ in bias. Hard thresholding is unbiased on survivors but discontinuous in the data; soft thresholding is continuous but biases every survivor by . The continuity is why soft thresholding has the clean oracle inequality below.

Key theorem with proof Intermediate+

The signature result for the linear (series) estimator is the bias-variance decomposition of its integrated risk and the optimal cutoff and rate it forces over a Sobolev class.

Theorem (risk of the projection estimator and the optimal rate). Let with , and assume (a uniform-boundedness condition met by the cosine and trigonometric bases). Then the integrated mean-squared error decomposes as

If lies in the Sobolev ellipsoid with , then choosing gives

which is the minimax-optimal rate over .

Proof. Orthonormality gives the Pythagorean split. Write ; these two pieces are orthogonal in (disjoint index sets), so . Taking expectations and using (unbiasedness) yields the displayed decomposition. For the variance, is an average of i.i.d. terms, so . Summing over and using the uniform bound ,

For the bias, membership in means with , so the tail obeys . The risk is therefore bounded by . Minimizing over balances the two terms at , i.e. , giving and common value of order .

Bridge. The decomposition's engine is orthonormality, which turns the global error into a coordinatewise sum and so reduces nonparametric estimation to an infinite collection of one-dimensional mean estimation problems in the Fourier coefficients. This builds toward the Master-tier Gaussian sequence model, where becomes the exact model , and the projection estimator is then literally "keep the first coordinates," whose risk is the same bias-tail-plus-variance sum; the optimal-rate calculation appears again there as the Pinsker problem of choosing a coordinatewise filter. The foundational reason the curse of dimensionality is escaped is that smoothness forces the coefficients to decay, so only of them carry signal above the noise floor , and this is exactly the effective-dimension bookkeeping that the cutoff performs. The linear estimator here generalises to the nonlinear thresholded estimator, which keeps coordinates by size rather than by index: where the projection estimator keeps a fixed prefix and is optimal over a single smoothness class, thresholding keeps a data-chosen set and is near-optimal over a whole scale of classes at once. Putting these together, the cutoff and the threshold are the two faces of one question — which coordinates carry signal — and the central insight is that for inhomogeneously smooth functions the answer is not a prefix, which is precisely where kernels 26.08.01 and linear series estimators are beaten by wavelet thresholding.

Exercises Intermediate+

Lean formalization Intermediate+

Mathlib hosts the Hilbert-space substrate (HilbertBasis, the L2 inner-product API, Parseval) but none of the statistical estimation objects, so no module is wired in (lean_status: none). The intended statement of the projection-estimator risk decomposition and of the soft-threshold map, once a sampling-and-empirical-coefficient API exists, would read roughly as follows.

-- Intended shape; not part of the current Babel Bible Lean build.
-- Requires: an orthonormal `HilbertBasis ℕ ℝ (L2 [0,1])` and an empirical-coefficient map.
variable {n : ℕ} (φ : ℕ → (L2 (Set.Icc (0:ℝ) 1)))
  (hφ : Orthonormal ℝ φ) (f : L2 (Set.Icc (0:ℝ) 1))

-- Soft-thresholding: the proximal map of λ‖·‖₁, shared with the lasso unit.
noncomputable def softThreshold (lam y : ℝ) : ℝ :=
  Real.sign y * max (|y| - lam) 0

-- Bias-variance decomposition of the projection estimator's integrated risk.
-- E ‖f̂_J - f‖² = Σ_{j>J} βⱼ² + Σ_{j≤J} Var(β̂ⱼ).
theorem projection_risk_decomposition (J : ℕ) (β : ℕ → ℝ)
    (hβ : ∀ j, β j = inner (f) (φ j)) :
    True := by
  trivial  -- placeholder: the empirical-coefficient/Var API is absent in Mathlib

the Mathlib gap analysis records what is missing: the orthogonal-series and wavelet density estimators, the bias-variance risk decomposition and the Sobolev rate, the multiresolution-analysis predicate and the Haar (and smooth) wavelet HilbertBasis, the soft/hard-threshold maps, and the Donoho-Johnstone oracle inequality with the universal threshold .

Advanced results Master

The series-estimator risk and the thresholding theory unify in the Gaussian sequence model, the canonical reduction of nonparametric estimation. Under the orthonormal basis the empirical coefficients satisfy with approximately independent , which is the model , . In this model the projection estimator is diagonal truncation and the threshold estimators are diagonal nonlinearities, and the entire rate theory is the analysis of coordinatewise risk.

Theorem 1 (Pinsker: sharp asymptotic minimaxity of linear filters). Over the Sobolev ellipsoid in the sequence model with noise , the minimax risk is attained, to leading order, by a linear filter with Pinsker weights , and equals for an explicit Pinsker constant [Tsybakov, A. B. — Introduction to Nonparametric Estimation]. With this is the rate with the exact optimal constant, and it shows that linear estimators are not merely rate-optimal but constant-optimal over a single Sobolev class — the projection estimator's only deficiency is its fixed grid, which Pinsker's tapering refines.

Theorem 2 (Donoho-Johnstone oracle inequality and the universal threshold). In the sequence model , , the soft-threshold estimator with the universal threshold satisfies, for all ,

so it pays at most a factor over the oracle diagonal-projection risk [Donoho, D. L. & Johnstone, I. M. — Ideal spatial adaptation by wavelet shrinkage]. The threshold is universal because with probability tending to one: at this level pure noise is, with high probability, killed entirely, so the estimator is noise-free under the null . The same paper proves hard thresholding obeys a comparable bound; soft thresholding is preferred for its continuity and the resulting clean risk algebra.

Theorem 3 (Besov-ball adaptivity and near-minimaxity). Translating the sequence-model oracle inequality back through the wavelet isometry, the thresholded wavelet estimator with is simultaneously near-minimax over a full scale of Besov balls — including spaces of inhomogeneous and spatially varying smoothness — attaining the minimax rate up to a factor without knowing the smoothness , , [Donoho, D. L. & Johnstone, I. M. — Ideal spatial adaptation by wavelet shrinkage]. The Besov scale is the natural home for wavelet thresholding because the Besov norm is equivalent to a weighted norm of the wavelet coefficients; functions with a jump or a cusp lie in a Besov ball for but in no Sobolev ball of comparable index, and over such balls no linear estimator — kernel, spline, or fixed-cutoff series — can attain the minimax rate. The nonlinearity of thresholding is essential, not incidental.

Theorem 4 (wavelet density estimation). For i.i.d. , the linear wavelet density estimator with , attains the rate over when ; its thresholded version with attains the Besov-class rates adaptively [Wasserman, L. — All of Nonparametric Statistics]. The empirical coefficients are again pure plug-in averages of basis functions — the density-estimation specialization of the empirical-measure functionals of 45.05.02 — so the variance bookkeeping is identical to the projection theorem, scale by scale.

Synthesis. The foundational reason orthogonal-series, kernel, and wavelet estimation are one subject is that each reduces, under an orthonormal basis, to estimating the coordinates of in the Gaussian sequence model, and the only question is which coordinates carry signal above the noise floor . This is exactly the bias-variance trade-off the cutoff resolves for linear estimators and the threshold resolves for nonlinear ones, and the central insight is that the optimal answer is a prefix of coordinates when smoothness is homogeneous (where Pinsker's linear filter is even constant-optimal) but a data-selected sparse set when smoothness is inhomogeneous (where only thresholding attains the rate).

The thresholding step is dual to the lasso 45.06.06: soft thresholding is the proximal map of in an orthonormal design, so the oracle inequality is the sequence-model twin of the lasso oracle inequality, and the universal threshold is the sequence-model twin of the lasso penalty — both arise from the Gaussian maximal inequality controlling the largest noise coordinate. Putting these together, wavelets generalise the global waves of Fourier analysis 02.10.01 by localizing them at every scale, which is what lets the coefficient array become sparse for functions with isolated features, and the bridge from kernels 26.08.01 to wavelets is precisely the move from a single bandwidth — one resolution everywhere — to a multiresolution analysis whose coefficients can be selected one at a time, restoring the spatial adaptivity that a fixed-resolution method structurally cannot have.

Full proof set Master

The projection-estimator risk decomposition and optimal rate, the unbiasedness and variance of , the soft- and hard-threshold derivations, and the Haar orthonormality are proved in full in the Key theorem and Exercises. The remaining Master claims are recorded here.

Proposition 1 (oracle inequality for soft thresholding, single coordinate). In the model , , the soft-threshold estimator with obeys . Summing over independent coordinates gives Theorem 2.

Proof (sketch following Donoho-Johnstone). Two regimes. For the noise-dominated regime : , and a Gaussian tail computation gives where is the standard normal survival function; at , , so the per-coordinate null risk is , the source of the additive term after summation. For the signal regime, soft thresholding is a non-expansive map with pointwise and keeps within of , so a case split on versus bounds by up to the additive null term; the factor is exactly . Combining the two regimes coordinatewise gives the stated bound. The constant is unimprovable in the worst case: it is the price of controlling all noise coordinates simultaneously through the maximal inequality .

Proposition 2 (the universal threshold from the Gaussian maximal inequality). For i.i.d. , for every , so at the soft-threshold estimator sets every coordinate of pure noise to zero with probability tending to one.

Proof. By the Gaussian tail and a union bound, . At , , so the bound is since . Thus eventually, and annihilates each such coordinate. The matching lower bound a.s. shows is the exact threshold at which noise is just killed; any smaller multiple leaves spurious survivors.

Proposition 3 (Besov norm = weighted of wavelet coefficients). For a sufficiently regular wavelet basis, the Besov seminorm is equivalent to the sequence norm on the wavelet coefficients.

Proof (statement; full proof in the cited monograph). The equivalence is the wavelet characterization of Besov spaces: the analysis/synthesis operators between and its coefficient array are bounded both ways on provided the wavelet has more than vanishing moments and matching smoothness, which the cascade construction supplies for Daubechies wavelets of high enough order. The consequence used in Theorem 3 is structural: a thresholding rule, which acts coordinatewise on , is natural for Besov balls because the ball is itself a coordinatewise (weighted-) constraint, whereas a Sobolev ball is a weighted- ellipsoid for which linear filtering is natural. The mismatch — Besov for versus the geometry of linear estimators — is the precise reason linear estimators fail to achieve the minimax rate over Besov balls and thresholding succeeds. This is stated without independent proof here; see [Donoho, D. L. & Johnstone, I. M. — Ideal spatial adaptation by wavelet shrinkage] and the Härdle-Kerkyacharian-Picard-Tsybakov monograph.

Proposition 4 (variance of the linear wavelet density estimator). With and the wavelet normalization on compact support of width , , and summing the nonvanishing coefficients at scale over scales up to gives total variance .

Proof. The single-coefficient variance bound is the wavelet instance of Exercise 3: , and since with on the support, this is . At scale the support partition of has cells, so coefficients are nonzero, contributing to the variance; summing the geometric series over gives . Balancing this against the Sobolev bias tail reproduces and the rate , matching the projection theorem with the resolution playing the role of the cutoff .

Connections Master

The empirical distribution and Glivenko-Cantelli theory 45.05.02 is the parent device: every coefficient estimate is the empirical measure applied to the basis function , so the orthogonal-series and wavelet density estimators are plug-in functionals of , and their variance bookkeeping is the law-of-large-numbers control of those averages. Where Glivenko-Cantelli gives uniform consistency of over a single function class, this unit organizes the averages into a basis and trades uniform control for the coordinatewise bias-variance trade-off that yields rates.

Kernel density estimation and the bandwidth trade-off 26.08.01 is the linear-estimator counterpart: a kernel estimate is, in the Fourier domain, a multiplier (a linear filter) exactly like the projection estimator's hard cutoff or Pinsker's taper, and it shares the single-resolution limitation that thresholded wavelets overcome. The bandwidth, the cutoff , and the finest scale are three names for one smoothing parameter; the move from kernels to thresholded wavelets is the move from one resolution to a selectable multiresolution.

The lasso, sparsity, and oracle inequalities 45.06.06 shares the exact analytic engine: soft thresholding is the proximal map of , so wavelet shrinkage is the lasso solved in the orthonormal wavelet design, where the KKT conditions decouple coordinatewise into soft thresholds. The Donoho-Johnstone oracle inequality and the lasso oracle inequality are the same theorem in the Gaussian sequence model, with the universal threshold and the lasso penalty both produced by the Gaussian maximal inequality bounding the largest noise coordinate.

Fourier series and the -isometry of coefficients 02.10.01 supplies the orthonormal-expansion machinery — Bessel's inequality, Parseval's identity , and completeness — on which the whole risk decomposition rests, since the Pythagorean split of the integrated error into a coefficient-variance sum and a squared-bias tail is Parseval applied to . Wavelets extend that global trigonometric system into a localized multiresolution basis, replacing one frequency index by a scale-and-position index.

Historical & philosophical context Master

Orthogonal-series density estimation dates to Čencov (1962) and Schwartz (1967), who proposed estimating the Fourier-coefficient sequence of a density by sample averages and truncating; the method sat alongside the kernel estimators of Rosenblatt (1956) and Parzen (1962) as the two classical routes to nonparametric density estimation. The sharp minimax theory of linear estimators over Sobolev ellipsoids was completed by Pinsker (1980), whose exact asymptotic constant for the risk remains the benchmark against which adaptive procedures are measured [Tsybakov, A. B. — Introduction to Nonparametric Estimation].

Wavelets entered statistics after the multiresolution-analysis framework of Mallat and Meyer (1986-1989) and Daubechies's (1988) compactly supported orthonormal wavelets gave a basis that is simultaneously localized in space and frequency and computable by a fast cascade transform. The decisive statistical step was taken by David Donoho and Iain Johnstone in a sequence of papers beginning with the 1994 Biometrika article on ideal spatial adaptation [Donoho, D. L. & Johnstone, I. M. — Ideal spatial adaptation by wavelet shrinkage], which introduced the universal threshold , the oracle inequality against the ideal diagonal-projection risk, and the proof that simple coordinatewise thresholding is near-minimax over a whole scale of Besov classes at once — a single estimator, ignorant of the unknown smoothness, that matches the best estimator tailored to each class up to a logarithmic factor. With Kerkyacharian and Picard they established the Besov-ball adaptivity that explains why thresholding succeeds precisely where linear methods fail: the Besov norm is a coordinatewise constraint on wavelet coefficients, and functions with localized features inhabit Besov but not Sobolev balls. The convergence of this line with the -penalization of Tibshirani's lasso, both governed by soft thresholding and the Gaussian maximal inequality, is recorded in the high-dimensional-statistics literature of the following two decades.

Bibliography Master

@article{DonohoJohnstone1994,
  author  = {Donoho, David L. and Johnstone, Iain M.},
  title   = {Ideal spatial adaptation by wavelet shrinkage},
  journal = {Biometrika},
  volume  = {81},
  number  = {3},
  year    = {1994},
  pages   = {425--455}
}

@article{DJKP1995,
  author  = {Donoho, David L. and Johnstone, Iain M. and Kerkyacharian, G\'erard and Picard, Dominique},
  title   = {Wavelet shrinkage: asymptopia?},
  journal = {Journal of the Royal Statistical Society, Series B},
  volume  = {57},
  number  = {2},
  year    = {1995},
  pages   = {301--369}
}

@book{Wasserman2006,
  author    = {Wasserman, Larry},
  title     = {All of Nonparametric Statistics},
  publisher = {Springer},
  series    = {Springer Texts in Statistics},
  address   = {New York},
  year      = {2006}
}

@book{Tsybakov2009,
  author    = {Tsybakov, Alexandre B.},
  title     = {Introduction to Nonparametric Estimation},
  publisher = {Springer},
  series    = {Springer Series in Statistics},
  address   = {New York},
  year      = {2009}
}

@book{HKPT1998,
  author    = {H\"ardle, Wolfgang and Kerkyacharian, G\'erard and Picard, Dominique and Tsybakov, Alexander},
  title     = {Wavelets, Approximation, and Statistical Applications},
  publisher = {Springer},
  series    = {Lecture Notes in Statistics 129},
  address   = {New York},
  year      = {1998}
}

@article{Pinsker1980,
  author  = {Pinsker, Mark S.},
  title   = {Optimal filtering of square-integrable signals in {Gaussian} noise},
  journal = {Problems of Information Transmission},
  volume  = {16},
  number  = {2},
  year    = {1980},
  pages   = {120--133}
}

@article{Daubechies1988,
  author  = {Daubechies, Ingrid},
  title   = {Orthonormal bases of compactly supported wavelets},
  journal = {Communications on Pure and Applied Mathematics},
  volume  = {41},
  number  = {7},
  year    = {1988},
  pages   = {909--996}
}

@article{Cencov1962,
  author  = {\v{C}encov, Nikolai N.},
  title   = {Evaluation of an unknown distribution density from observations},
  journal = {Soviet Mathematics Doklady},
  volume  = {3},
  year    = {1962},
  pages   = {1559--1562}
}