Thresholding a Regression Coefficient
A wavelet expansion represents a regression function using coefficients at different locations and scales. The earlier material on empirical wavelet coefficients explains how these coefficients are estimated; thresholding is a subsequent, coefficient-by-coefficient transformation. Its purpose is to suppress estimates that are small relative to a chosen threshold while retaining evidence of larger coefficients. This can reduce the influence of noisy coefficients, but it also changes their bias and variance.
The transformation is not the same as simply deciding which scales to keep. A threshold is applied to the magnitude of an estimated coefficient: hard thresholding either keeps that estimate unchanged or sets it to zero, while soft thresholding also reduces the magnitude of estimates that survive. To study the consequences precisely, begin with one coefficient and one scalar noise model.
At \(|y|=\lambda\), hard thresholding returns zero because its rule retains values only when \(|y|>\lambda\). Soft thresholding also returns zero there. For a surviving positive value, hard thresholding returns \(y\), whereas soft thresholding returns \(y-\lambda\); for a surviving negative value, soft thresholding adds \(\lambda\) to \(y\), moving it toward zero.
Worked Example: Thresholding a Short Coefficient Vector
Suppose three estimated coefficients, in a fixed wavelet basis, are \(1.8\), \(-0.7\), and \(-2.5\), and use \(\lambda=1\). Apply both rules to each coefficient.
For \(1.8\), the magnitude exceeds 1. Hard thresholding gives \(H_1(1.8)=1.8\), while soft thresholding gives \(S_1(1.8)=1.8-1=0.8\).
For \(-0.7\), the magnitude is below 1. Both rules give zero: \(H_1(-0.7)=0\) and \(S_1(-0.7)=0\).
For \(-2.5\), the magnitude exceeds 1. Hard thresholding gives \(H_1(-2.5)=-2.5\), while soft thresholding gives \(S_1(-2.5)=-2.5+1=-1.5\).
The hard-thresholded vector is therefore \((1.8,0,-2.5)\), and the soft-thresholded vector is \((0.8,0,-1.5)\). In an orthonormal wavelet basis, these transformed coefficients can be used in the same basis expansion to form a regression estimate. The example shows the rules’ deterministic difference; it does not by itself quantify sampling bias or variance.
Exact Scalar Bias and Variance Under Gaussian Noise
For a precise scalar comparison, suppose the unthresholded coefficient estimate satisfies \(Y=\theta+\tau Z\), where \(\theta\) is the true coefficient, \(\tau>0\) is the standard deviation of its estimation error, and \(Z\sim N(0,1)\). Thus \(Y\sim N(\theta,\tau^2)\). The calculations below concern the marginal distribution of one coefficient; they do not require different coefficient estimates to be independent.
Write \(\phi\) and \(\Phi\) for the standard normal density and distribution function, and let \(\overline{\Phi}(u)=1-\Phi(u)\). Define \(a=(\lambda-\theta)/\tau\), \(b=(-\lambda-\theta)/\tau\), and \(p=\overline{\Phi}(a)+\Phi(b)\). Here \(p=P(|Y|>\lambda)\), the probability that the noisy estimate falls outside the threshold interval.
These formulas follow by integrating over the two regions where the estimate survives. For completeness, the required truncated normal moments and substitutions are derived here.
On \(Y>\lambda\), the standard normal change of variable \(z=(y-\theta)/\tau\) has lower limit \(a\). The identities \(\int_a^\infty z\phi(z)\,dz=\phi(a)\) and \(\int_a^\infty z^2\phi(z)\,dz=\overline{\Phi}(a)+a\phi(a)\) give $$ \begin{aligned} E[Y\mathbf{1}\{Y>\lambda\}]&=\theta\overline{\Phi}(a)+\tau\phi(a),\\ E[Y^2\mathbf{1}\{Y>\lambda\}]&=(\theta^2+\tau^2)\overline{\Phi}(a) +\tau(\theta+\lambda)\phi(a). \end{aligned} $$
On \(Y<-\lambda\), the upper limit after the same change of variable is \(b\). Using \(\int_{-\infty}^b z\phi(z)\,dz=-\phi(b)\) and \(\int_{-\infty}^b z^2\phi(z)\,dz=\Phi(b)-b\phi(b)\) gives $$ \begin{aligned} E[Y\mathbf{1}\{Y<-\lambda\}]&=\theta\Phi(b)-\tau\phi(b),\\ E[Y^2\mathbf{1}\{Y<-\lambda\}]&=(\theta^2+\tau^2)\Phi(b) +\tau(\lambda-\theta)\phi(b). \end{aligned} $$
Hard thresholding equals \(Y\) on both tail events and zero between them. Adding the two first-moment expressions gives \(m_H\); adding the second-moment expressions gives \(q_H\).
On the upper tail, \(S_\lambda(Y)=Y-\lambda\); on the lower tail, it is \(Y+\lambda\). Thus \(m_S=m_H-\lambda\overline{\Phi}(a)+\lambda\Phi(b)\). For the second moment, expand \((Y-\lambda)^2\) and \((Y+\lambda)^2\) on their respective tails and substitute the first- and second-moment expressions from Steps 1 and 2. This gives the stated \(q_S\).
The final variance step uses the identity \(\operatorname{Var}(W)=E[W^2]-(E[W])^2\), which applies here because the displayed truncated Gaussian moments are finite. No approximation is needed for these scalar Gaussian formulas.
Worked Example: Zero Signal at the Noise Standard Deviation
Let \(\theta=0\), \(\tau=1\), and \(\lambda=1\). Symmetry of \(Y\sim N(0,1)\) makes both thresholded estimates have mean zero, so both have zero bias. Here \(a=1\), \(b=-1\), and \(p=2\overline{\Phi}(1)\approx 0.317311\), using \(\overline{\Phi}(1)\approx0.158655\) and \(\phi(1)\approx0.241971\).
For hard thresholding, the second moment is \(q_H=p+2\phi(1)\approx0.317311+0.483942=0.801253\). Its variance is therefore \(0.801253-0^2=0.801253\).
For soft thresholding, symmetry again gives mean zero. Its second moment simplifies to \(q_S=4\overline{\Phi}(1)-2\phi(1)\approx0.634620-0.483942=0.150678\). Its variance is \(0.150678\). In this example both rules have zero bias, but soft thresholding has much smaller variance because even the surviving noise values are pulled toward zero.
What Happens Near and Below the Threshold?
When \(\theta=0\), symmetry ensures that the mean of either thresholded estimate is zero, regardless of the positive values of \(\lambda\) and \(\tau\). But zero bias does not mean zero error: random noise can cross the threshold. Hard thresholding then retains the full noise realization, whereas soft thresholding retains only its excess beyond the threshold.
The distinction is also visible directly from the functions. For every realized value \(y\), both rules set the estimate to zero when \(|y|\leq\lambda\). When \(|y|>\lambda\), hard thresholding preserves \(y\), but soft thresholding subtracts \(\lambda\) from its magnitude. Soft thresholding therefore introduces shrinkage of surviving estimates. For positive signals this can make its bias more negative; for negative signals symmetry gives the corresponding bias toward zero.
Worked Example: A True Coefficient at the Threshold
Take \(\theta=1\), \(\lambda=1\), and \(\tau=0.5\). Then \(a=0\), \(b=-4\), \(\overline{\Phi}(0)=0.5\), \(\Phi(-4)\approx0.00003167\), \(\phi(0)\approx0.398942\), and \(\phi(4)\approx0.00013383\).
The survival probability is \(p=0.5+0.00003167=0.50003167\). For hard thresholding, \(m_H=p+0.5\{\phi(0)-\phi(4)\}\approx0.699436\), so its bias is \(0.699436-1=-0.300564\). Its second moment is \(q_H=1.25p+0.5\{2\phi(0)+0\phi(4)\}\approx1.023982\), and its variance is \(1.023982-(0.699436)^2\approx0.534772\).
For soft thresholding, \(m_S=m_H-\{0.5-\Phi(-4)\}\approx0.199468\), giving bias \(0.199468-1=-0.800532\). Its second moment is $$ q_S=0.25(0.5)+0+ 4.25\Phi(-4)-\phi(4)\approx0.125001. $$ Its variance is \(0.125001-(0.199468)^2\approx0.085213\). At the threshold, soft thresholding has substantially lower variance in this example, but it also has substantially greater bias toward zero. The calculation illustrates a trade-off, not a claim that one rule has smaller total error for every signal and noise level.
A useful limiting comparison comes from letting the noise level decrease while keeping the true coefficient fixed. If \(|\theta|<\lambda\), the estimate increasingly falls inside the threshold interval, so both rules increasingly return zero; their errors then approach the omitted coefficient. If \(|\theta|>\lambda\), threshold crossings become uncommon: hard thresholding approaches the unthresholded coefficient, while soft thresholding approaches a value shifted toward zero by \(\lambda\). Exactly at the boundary, small noise can move the estimate to either side, making hard thresholding’s all-or-nothing decision especially sensitive to small perturbations.
To prove the variance comparison, first note that \(H_\lambda(Y)\) and \(S_\lambda(Y)\) are both odd functions of \(Y\). Since \(Y\sim N(0,\tau^2)\) is symmetric when \(\theta=0\), their means are zero. For every real \(y\), their magnitudes satisfy \(|S_\lambda(y)|\leq |H_\lambda(y)|\): inside the threshold both are zero, and outside it \(|S_\lambda(y)|=|y|-\lambda<|y|=|H_\lambda(y)|\). Squaring and taking expectations gives \(E[S_\lambda(Y)^2]\leq E[H_\lambda(Y)^2]\). The inequality is strict because \(P(|Y|>\lambda)>0\) for a nondegenerate Gaussian and the squared magnitudes differ strictly on that event. Since both means are zero, these second moments are their variances. This proves the result. \(\square\)
Common Pitfall and Practical Interpretation
Common mistake: “Both methods set subthreshold observations to zero, so they must have the same bias and variance.” This reasoning considers only estimates that fall below the threshold. Above the threshold, hard thresholding keeps the full estimate, while soft thresholding shrinks it. The probabilities and sizes of those surviving values affect both the mean and the second moment. The exact formulas, or a direct calculation under a specified noise model, are needed to compare their scalar bias and variance.
For a wavelet regression estimate, the scalar analysis applies separately to each estimated coefficient and its noise distribution. Thresholding may create many zero coefficients, but the resulting regression error depends on both the coefficient-level errors and how the basis combines coefficients. The results here explain the local bias–variance behavior of the two transformations; they do not prescribe a threshold or establish a global risk guarantee.
Check Your Understanding
Use the definitions and scalar calculations above to check your understanding.
- For \(\lambda=2\), calculate the hard- and soft-thresholded values of \(y=2\) and \(y=-3\).
- Under the Gaussian model, why are both thresholded estimates unbiased when \(\theta=0\), even though their variances are positive?
- For \(\theta=1\), \(\lambda=1\), and \(\tau=0.5\), which rule has greater absolute bias in the worked calculation, and which has smaller variance?
- Explain why a surviving soft-thresholded coefficient has smaller magnitude than the corresponding hard-thresholded coefficient.
- Does a coefficient estimate below the threshold imply that the true coefficient is zero? Explain using the distinction between a realized estimate and its sampling distribution.