How this calculation works
Estimate a latent one-dimensional density under known independent Gaussian measurement error using a compact Fourier regularization kernel.
f̂(x)=(1/πn)Σ_j∫₀^(1/h)cos[t(x−Y_j)](1−h²t²)³ exp(σ²t²/2)dt.A worked example
The default known noise SD 0.2 and bandwidth 0.6 give estimated density≈0.2218484351 at zero. The coarse grid from −2 to 2 has trapezoid mass≈0.7357722712, which is reported rather than forced to one.
Good to know
20–500 observations, 3–80 increasing grid points and n×grid≤4000; known independent Gaussian noise, σ≥0, h>0, σ/h≤3, evaluation/data separation≤80 bandwidths. Compact cubic Fourier window with quadrature refinement. Negative density artifacts retained; finite-window mass diagnostic only. No individual denoising, unknown-noise identification, automatic bandwidth or full density certification.
Reference: Wang and Wang: density deconvolution in measurement-error models (opens in a new tab) ↗
Noisy density and latent density differ
If an observation is the sum of a latent quantity and independent measurement error, its density is a convolution. An ordinary kernel density estimate smooths the noisy observations and therefore estimates the observed distribution, not automatically the latent one. Deconvolution attempts to undo a specified error mechanism at the distributional level.
The distinction is important: this page does not estimate the true value behind each individual measurement. It estimates a curve for the population distribution under a known Gaussian error model. Unknown error variance, correlated errors or a non-Gaussian error law cannot be inferred merely by selecting a smaller smoothing bandwidth.
Compare this with the Kernel density estimate calculator with bandwidth selection. Estimate an unobserved signal density by undoing a specified additive measurement-error convolution; ordinary KDE estimates the distribution of the noisy observations themselves.
Known error variance is model information
The entered Gaussian standard deviation describes independent, identically distributed additive measurement error in the same units as the observations. It is not the sample standard deviation of the noisy data. The latent variation and measurement-error variation have different roles, so substituting one for the other changes the inverse problem.
The bandwidth is a regularization choice, also in measurement units. A smaller bandwidth retains higher frequencies but can amplify noise strongly when the error standard deviation is large. The interface requires a positive bandwidth and limits the ratio of error standard deviation to bandwidth so that unsupported amplification is rejected explicitly.
Divide Fourier information with regularization
Convolution multiplies characteristic functions. Gaussian error has a Fourier transform that decays exponentially, so reversing the convolution requires multiplying by an exponentially growing factor. That inversion makes high-frequency sampling noise unstable. A compact Fourier kernel suppresses frequencies above one divided by the bandwidth and tapers smoothly before the cutoff.
The chosen window is the cube of one minus squared normalized frequency on its supported interval. Its cosine inversion gives the displayed real density estimate. The implementation evaluates that integral with adaptive quadrature and a tighter refinement check rather than treating a finite oscillatory sum as an automatically converged inversion.
Negative values are diagnostic, not hidden
A regularized inverse estimate need not remain nonnegative at every evaluation point. The page retains negative values and counts them on the supplied grid instead of clipping them and presenting a modified curve as though it came from the stated formula. Negative artifacts can reveal aggressive inversion or limited sample information.
A trapezoidal integral over the entered grid is also reported. That finite-window diagnostic is neither a proof that the complete density integrates correctly nor a reason to divide the curve by its displayed mass. Grid range and spacing affect the diagnostic, while statistical error, regularization bias and truncation affect the estimate itself.
Inspect the default center and finite window
The default uses twenty observations, known error standard deviation 0.2 and bandwidth 0.6. At zero, the estimated latent density is approximately 0.2218484351 in inverse measurement units. The five evaluation points extend from minus two to two, deliberately making the integration grid coarse enough to inspect directly.
Their trapezoidal mass is approximately 0.7357722712. The page reports that number honestly rather than normalizing away the discrepancy or claiming that the remaining mass lies at a known location. A wider or finer grid can help inspect the estimate, but changing the bandwidth answers a different regularized inverse question.
Understand the computational restrictions
The product of observation count and grid size is capped to bound the number of oscillatory integrals. Evaluation points cannot be more than eighty bandwidths from any observation, and the error-to-bandwidth ratio cannot exceed three. These limits support the numerical checks; they are not statistical recommendations for choosing an optimal estimator.
The grid must increase strictly, which makes its trapezoidal interpretation unambiguous. The code does not select a bandwidth, construct confidence bands or guarantee positivity. An unresolved quadrature is rejected rather than returned with a misleadingly smooth plot, since smooth visual appearance alone cannot establish the accuracy of an inverse calculation.
Compare with a zero-noise reference
Setting the known error standard deviation to zero removes the exponential inverse factor and leaves the corresponding ordinary kernel estimate. This is a useful mathematical check on the Fourier normalization and measurement units. Translating both observations and evaluation points must also translate the estimated density without changing its values.
For real applications, measurement-error assumptions should come from an independent calibration or an explicitly justified model. The same noisy observations generally do not identify both an arbitrary latent density and an arbitrary unknown error density. The returned curve is conditional on the supplied Gaussian model and should be interpreted with that limitation visible.
A few questions, answered
Does this denoise each observation?
No. It estimates a latent distribution under an error model and does not reconstruct individual true measurements.
Why are some densities allowed to be negative?
Regularized Fourier inversion can produce negative artifacts. They are shown rather than silently clipped or renormalized.
Should noise SD equal the sample SD?
No. Noise SD describes the known measurement error, while the sample SD also includes latent variation.
Is finite-window mass a normalization certificate?
No. It is a trapezoidal diagnostic on the supplied grid, not the total integral over the real line.