Why Wavelet Scaling Errors Matter
A wavelet calculation can use a familiar transform and a standard threshold yet still produce the wrong estimate. The usual cause is not a subtle property of wavelets: it is a mismatch in units. A coefficient defined using an empirically normalized basis is smaller by a factor of \(\sqrt n\) than the corresponding coefficient from a Euclidean-orthonormal transform. Its noise standard deviation and any threshold applied to it must be smaller by the same factor.
Resolution labels create a separate source of error. Different conventions assign different starting indices to scaling and detail coefficients. The index itself has no universal meaning apart from its definition and the number of coefficients at that level. This tutorial fixes conventions first, then uses short calculations to check the resulting scales.
Fixing the Basis and Coefficient Conventions
For comparison, let \(u_\ell=g_\ell/\sqrt n\). The vectors \(u_\ell\) are orthonormal in the usual Euclidean inner product, and the corresponding Euclidean coefficient is \(\theta_\ell=u_\ell^Tf_n\), with estimate \(\hat\theta_\ell=u_\ell^TY\). Thus the two coefficient conventions are related by \(\theta_\ell=\sqrt n\,\beta_\ell\) and \(\hat\theta_\ell=\sqrt n\,\hat\beta_\ell\).
These formulas describe an exactly orthonormal sampled basis, as occurs for an orthonormal transform of a length-\(n\) vector. For a general fixed design and sampled continuous wavelets, empirical orthogonality may only be approximate. In that case, covariance calculations must use the actual Gram matrix rather than treating the sampled basis as exactly orthonormal.
Worked Example: Converting a Four-Point Haar Coefficient
Take \(n=4\), response vector \(Y=(3,3,1,1)^T\), and the empirically normalized coarse detail vector \(g=(1,1,-1,-1)^T\). Its empirical squared norm is \(4^{-1}(1+1+1+1)=1\).
The empirical coefficient is \(\hat\beta=4^{-1}g^TY=4^{-1}(3+3-1-1)=1\). The Euclidean-normalized vector is \(u=g/2\), so the Euclidean coefficient is \(\hat\theta=u^TY=(6-2)/2=2\).
The conversion check gives \(\sqrt n\,\hat\beta=2(1)=2=\hat\theta\). Reporting the value \(2\) as an empirical coefficient, or the value \(1\) as a Euclidean coefficient, would mix conventions.
Resolution Indices and Coefficient Counts
For continuous wavelets on a dyadic domain, a common convention writes detail functions as \(\psi_{jk}(x)=2^{j/2}\psi(2^jx-k)\), with \(k=0,\ldots,2^j-1\) at resolution \(j\). Under this convention there are \(2^j\) detail coefficients at level \(j\). The factor \(2^{j/2}\) gives unit \(L^2\) norm when the unscaled wavelet has unit norm.
For a length-\(n\) dyadic discrete transform, set \(n=2^J\). One convenient indexing convention has one coarsest scaling coefficient and detail levels \(j=0,\ldots,J-1\); there are \(2^j\) details at level \(j\). The total number of coefficients is \(\displaystyle 1+\sum_{j=0}^{J-1}2^j=1+(2^J-1)=n\). Other transforms may use a different starting index or call the finest level \(J\). The safe check is to state the index range and count the coefficients, not to assume that a level label alone identifies a resolution.
Worked Example: Finding the Finest Detail Level
Suppose \(n=16=2^4\) and use the discrete convention just defined. Then \(J=4\), so the detail levels are \(j=0,1,2,3\), with respectively \(1,2,4,8\) coefficients.
There are \(1+2+4+8=15\) detail coefficients. Adding the one coarsest scaling coefficient gives \(16\), as required. A claim that this convention also has a detail level \(j=4\) would add \(2^4=16\) extra coefficients and give \(32\) coefficients in total. That is an off-by-one indexing error, not an extra resolution available in this length-16 transform.
Noise Scale Follows the Normalization
When a basis is orthonormal, the coefficient noise scale follows directly from the regression model. This calculation is a useful diagnostic because it identifies the threshold units before any thresholding rule is applied.
Derivation. Since \(Y=f_n+\varepsilon\), the empirical coefficient error is \(\hat\beta_\ell-\beta_\ell=n^{-1}g_\ell^T\varepsilon\). Independence and variance \(\sigma^2\) give \(\operatorname{Var}(g_\ell^T\varepsilon)=\sigma^2g_\ell^Tg_\ell=n\sigma^2\), because \(g_\ell^Tg_\ell=n\). Therefore \[ \operatorname{Var}(\hat\beta_\ell-\beta_\ell) =n^{-2}n\sigma^2=\frac{\sigma^2}{n}. \] For the Euclidean coefficient, the error is \(u_\ell^T\varepsilon\). Since \(u_\ell^Tu_\ell=1\), \(\operatorname{Var}(u_\ell^T\varepsilon)=\sigma^2\). More generally, the covariance of two empirical coefficient errors is \[ \operatorname{Cov}(\hat\beta_\ell-\beta_\ell,\hat\beta_m-\beta_m) =\frac{\sigma^2}{n^2}g_\ell^Tg_m =\begin{cases}\sigma^2/n,&\ell=m,\\0,&\ell\ne m.\end{cases} \] The Gaussian errors also imply that these orthogonal coefficient errors are independent. This proves the stated scale conversion. \(\square\)
This result depends on exact orthonormality and the stated homoskedastic error variance. With a nonorthogonal sampled basis, the variance instead involves \(g_\ell^Tg_m\); it cannot be read off from the resolution index alone.
Worked Example: Checking Coefficient Noise Units
Let \(n=64\) and \(\sigma=1.5\), with an exactly orthonormal discrete transform. A Euclidean coefficient error has standard deviation \(1.5\). The corresponding empirical coefficient error has standard deviation \(1.5/\sqrt{64}=1.5/8=0.1875\).
The variances check as well: the Euclidean variance is \(1.5^2=2.25\), while the empirical variance is \(2.25/64=0.03515625\). Their ratio is \(64\), as it must be because the coefficients differ by \(\sqrt{64}=8\). Assigning standard deviation \(1.5\) to the empirical coefficient would therefore overstate its noise scale by a factor of eight.
Thresholds Must Use the Same Units as Coefficients
For a coefficient \(z\) and nonnegative threshold \(\lambda\), hard thresholding retains \(z\) when \(|z|>\lambda\) and otherwise returns zero. Soft thresholding returns \(\operatorname{sign}(z)(|z|-\lambda)_+\), where \(a_+=\max(a,0)\). In either rule, \(z\) and \(\lambda\) must be measured on the same coefficient scale.
Proof. For hard thresholding, \(|cz|>c\lambda\) holds exactly when \(|z|>\lambda\), since \(c>0\). If this condition holds, the output is \(cz=cT^{\mathrm{hard}}_\lambda(z)\); otherwise both outputs are zero. For soft thresholding, positive rescaling preserves the sign and gives \[ \operatorname{sign}(cz)(|cz|-c\lambda)_+ =\operatorname{sign}(z)c(|z|-\lambda)_+ =cT^{\mathrm{soft}}_\lambda(z). \] Thus both identities hold in all cases. \(\square\)
Consequently, if \(\lambda_\theta\) is a threshold for Euclidean coefficients, the equivalent empirical-coefficient threshold is \(\lambda_\beta=\lambda_\theta/\sqrt n\). The coefficient and threshold are rescaled together; changing only one of them changes which coefficients are retained.
Worked Example: Applying a Threshold in the Wrong Units
Continue with \(n=64\) and \(\sigma=1.5\). Suppose an observed empirical coefficient is \(\hat\beta=0.60\), and the chosen numerical threshold in Euclidean units is \(\lambda_\theta=4.576\). The corresponding Euclidean coefficient is \(\hat\theta=8(0.60)=4.8\).
In Euclidean units, soft thresholding gives \(\operatorname{sign}(4.8)(4.8-4.576)_+=0.224\). Converted back to empirical units, the result is \(0.224/8=0.028\). Equivalently, use the empirical threshold \(4.576/8=0.572\): soft thresholding \(0.60\) gives \(0.60-0.572=0.028\).
If \(4.576\) is mistakenly applied directly to the empirical coefficient \(0.60\), the coefficient is set to zero. That is not a minor numerical discrepancy: it changes the fitted contribution from \(0.028\) to zero because the threshold was left in the wrong units.
Common Errors and Practical Checks
Several plausible shortcuts lead to inconsistent wavelet estimates. Check each quantity against the declared convention before interpreting a result.
- Mixing empirical and Euclidean normalization. Treating \(n^{-1}\sum_i g_\ell(x_i)^2=1\) as though \(\sum_i g_\ell(x_i)^2=1\) misses a factor of \(n\) in squared norms. State which inner product defines orthonormality.
- Changing coefficient scale but not threshold scale. A coefficient multiplied by \(\sqrt n\) requires a threshold multiplied by \(\sqrt n\). The thresholding identities above show why both must change together.
- Inferring the noise variance from the wavelet level. Under exact orthonormality and equal-variance regression noise, the coefficient variance follows from the basis normalization, not from whether the coefficient is coarse or fine. A different variance requires an additional feature of the model or design.
- Counting levels by their labels alone. Write the index range and sum the coefficient counts. For \(n=2^J\), the convention used here has detail levels \(0\) through \(J-1\), not \(0\) through \(J\).
- Assuming sampled continuous wavelets are exactly orthogonal. If the design and boundary treatment do not give exact discrete orthogonality, compute or account for the sampled Gram matrix before using the simple variance formula.
A reliable calculation records four items together: the basis inner product, the coefficient definition, the coefficient noise variance, and the threshold units. A disagreement among them is an immediate warning that the thresholded estimate may not represent the intended procedure.
Check Your Understanding
For each question, make the coefficient convention explicit before calculating.
- If \(n=25\) and empirical and Euclidean coefficients describe the same basis direction, what is the conversion factor between them?
- Under exact empirical orthonormality and independent \(N(0,\sigma^2)\) errors, derive the variance of an empirical coefficient error.
- For a length-32 transform using the stated discrete convention, list the detail-level indices and verify the total number of coefficients.
- An empirical coefficient is thresholded using a threshold defined for its Euclidean counterpart. What conversion is required for the threshold?
- Why is the simple coefficient variance formula not automatically valid for sampled wavelets that are not empirically orthogonal?