Integrated mean squared error Created 2026-10-05 Updated 2026-10-07
The integrated mean squared error is over a specified domain . The Tonelli theorem permits integration of the pointwise bias-variance decomposition of mean squared error.
In kernel density estimation, take a kernel for density estimation that is nonnegative, symmetric, and has integral one, finite , and finite . Its smoothing bandwidth gives and the kernel density estimator
from an independent and identically distributed sample with probability density function . Nonnegativity and unit mass make the estimate itself a probability density function. We compare kernel for density estimation shapes by their optimized mean integrated squared error, rather than by their performance at an arbitrarily common numerical smoothing bandwidth.
For the usual second-order theory, assume, for example, that belongs to the Sobolev space and , and let , . The expectation is the convolution . The vanishing first moment of the symmetric kernel for density estimation and the integral Taylor remainder give
Continuity of translations in the L2 norm, with domination by , shows that in the L2 norm. Hence the integrated squared bias of a kernel density estimator is
By independence, the exact integrated variance of a kernel density estimator is
Indeed the integrated second moment of a single summand is , and its integrated squared mean is . The latter quantity is bounded by , by Young's convolution inequality, so its contribution is . The bias-variance decomposition of mean squared error therefore yields the leading criterion
This asymptotic mean integrated squared error displays the bias-variance tradeoff: a small smoothing bandwidth increases integrated variance, while a large one increases squared bias of an estimator.
Differentiating the asymptotic mean integrated squared error with respect to gives . It changes sign once, from negative to positive, so its unique minimum is
At this minimum the integrated variance term is four times the squared bias of an estimator term. Substitution gives
Thus the leading rate is , and the shape comparison reduces to minimizing .
There is an essential scale ambiguity: if , then . Changing the scale of the kernel for density estimation merely changes the numerical convention for the smoothing bandwidth. Moreover
A comparison at the same raw is therefore not a fair comparison of shape. One can normalize the second moment to one, but that does not make the optimal smoothing bandwidth independent of shape.
The canonical kernel for density estimation instead chooses the unique scale
It satisfies , and so
Consequently all canonical kernels share the same leading optimal bandwidth . Only the multiplicative constant depends on shape. This is precisely the separation of shape choice and scale choice that makes the canonical kernel normalization useful. For an original unscaled kernel for density estimation, its corresponding optimal smoothing bandwidth is .
To prove optimal shape, scale a candidate kernel for density estimation to have second moment one. Let and
Direct integration gives , , and . Thus is a rescaled Epanechnikov kernel. For any admissible with the same mass and second moment,
Outside , and , because . The integral inside is therefore nonnegative, and multiplying by gives . Expanding the square now proves
Equality forces almost everywhere. At fixed second moment, minimizing is equivalent to minimizing . Since is scale invariant, this proves the optimality of the Epanechnikov kernel over all nonnegative symmetric second-order kernels for density estimation, including the equality case up to rescaling.
In its usual scale, the optimal Epanechnikov kernel is
Its canonical scale is , giving
The optimal Epanechnikov kernel shape is therefore a truncated parabola, rather than a particular support radius. The canonical kernel and unit-second-moment version represent the same shape but different scale conventions.
The numerical gains over other reasonable kernels for density estimation are modest. Define asymptotic relative efficiency against the optimal Epanechnikov kernel by the sample-size fraction giving the same optimized leading mean integrated squared error:
For the Gaussian density kernel , and , so its efficiency is . For the uniform smoothing kernel , and , giving efficiency . The Gaussian density kernel is infinitely smooth, whereas the optimal Epanechnikov kernel has compact support and allows each observation to affect only a finite window. Such computational and smoothness considerations may outweigh a small leading-efficiency difference.
In practice is unknown. A plug-in estimator estimates this roughness functional from a pilot estimate of the second derivative and substitutes it into the optimal smoothing bandwidth formula. Alternatively, Leave-one-out cross-validation minimizes
where uses the other observations. By independence, the expectation of the second term is , so . Thus it targets integrated error without knowing . The choice of smoothing bandwidth remains important: even for the optimal Epanechnikov kernel, setting multiplies the leading minimum error by .
The preceding optimum concerns nonnegative second-order kernels for density estimation and twice-smooth densities on the real line. Signed kernels of order ell can cancel higher moments for smoother densities and yield different rates, but may produce negative density estimates. A support boundary or a density jump also requires separate bias of a kernel density estimator analysis. These settings do not contradict the proved second-order optimality of the Epanechnikov kernel.
Iterating the recurrence yields
Thus every finite collection of the is a linear transformation of independent standard normal random variables, and has a multivariate Gaussian distribution. The expected values are zero. Independence of the gives
For , the recurrence writes plus a sum of future innovations independent of . Hence . The required vector law is
The covariance matrix is positive definite: the lower-triangular transformation from has nonzero diagonal entries . This also identifies a stationary autoregressive process of order one, with marginal density .
With the standard normal density as the kernel for density estimation, the two characteristic functions are and . The Gaussian random variable has mean zero and variance , so
This expression is real. Substitution in the given integrated covariance expression, followed by the Gaussian integral for , gives
To bound the total Gaussian autoregressive kernel variance correction, apply the mean value theorem to . For , the whole interval between and is bounded below by . Therefore
Summing the geometric series gives the uniform bound
It follows from the supplied variance identity that
The constant depends on the fixed , but not on or . In particular this applies to the requested shrinking-bandwidth regime; the covariance bound itself does not need .
All observations have the same marginal density , so dependence changes the variance but not the bias of a kernel density estimator: . Write and . For a smooth density with , the integrated variance of a kernel density estimator in the independent case is . A second-order Taylor expansion of the convolution gives in the L2 norm. Thus the bias-variance decomposition of mean squared error gives
The first two terms are the asymptotic mean integrated squared error. The additional dependence term is smaller than , so the leading optimal bandwidth and optimal rate are the same as for independent data:
Here both and are the standard normal density. Since , direct Gaussian integrals give
Consequently the explicit leading bandwidth is
At this bandwidth the leading integrated variance is four times the leading integrated squared bias, which is also a check on the minimization constant.
In a linear regression model, a large number of predictors or nearly dependent columns of the design matrix can make some eigenvalues of small. The ordinary least squares estimate has covariance matrix , so these directions have large variance, even though the estimator is unbiased. Ridge regression reduces this variance by shrinking the estimate towards zero, at the cost of introducing bias. This bias-variance tradeoff can improve the mean squared error when the signal is not too large in the shrunken directions.
For the usual preprocessing with a regression intercept, separate the constant column from the predictors and leave the intercept unpenalized. Subtract the sample mean from the response and from each nonconstant predictor, then divide each centered predictor column by its positive scale, for example its Euclidean norm. Thus all predictor columns have squared norm one; using squared norm instead simply changes the convention for the penalty. Centering is performed on the slope columns, not on the constant column. A full-rank design containing an intercept retains full rank on its centered slope columns. A model without an intercept should retain its specified mean structure unless an intercept is deliberately introduced.
Let be the resulting scaled, centered slope design matrix, let be the centered response, and let denote the coefficients in these standardized coordinates. The ridge regression problem is
Here is the number of slopes; it is one less than the original number of columns when a constant column was present. The gradient of this objective is . Its Hessian matrix is a positive-definite matrix, giving the unique closed-form ridge regression estimator
The regression intercept in the original coordinates is recovered as , and the original slopes are , where is the scale used for column . This is the unpenalized intercept in ridge regression convention. For a fixed full-rank coefficient design written simply as , with response and coefficient , the same formula reads
The risk comparison below first uses the fixed coefficient coordinates in which this quadratic penalty is imposed, and then addresses reversal of the scaling.
Assume at least one penalized coefficient, zero-mean errors with covariance matrix , and . No normal distribution assumption is needed for this mean squared error calculation. Put and . The covariance and bias of a ridge regression estimator follow directly from its linear expression:
For the centered slope model, the response errors have covariance matrix , where . Since , the same coefficient covariance matrix formula still holds with .
By the spectral theorem for real symmetric matrices, write , with orthogonal and every , and put . The bias-variance decomposition of mean squared error now gives
The expression at is the ordinary least squares mean squared error. Its right derivative is
Therefore, for every fixed coefficient vector, all sufficiently small positive penalties strictly improve mean squared error.
An explicit sufficient choice follows by subtracting the ordinary least squares risk term by term:
Since , every summand is negative whenever
When , every positive penalty works. This is a pointwise result: the permitted penalty may depend on the true coefficient vector. A fixed positive penalty cannot improve risk for all arbitrarily large signals, because its squared bias grows quadratically with the signal. The same distinction appears in uniform directional risk improvement by ridge regression and unbounded directional risk of fixed ridge shrinkage. In centered coordinates the unpenalized intercept contributes the same to both coefficient risks, so it does not affect the improvement. Reversing a fixed predictor scaling measures coefficient error with a fixed positive-definite matrix instead of the identity matrix. For this weighted loss the squared bias still has derivative zero at , while the variance term has derivative
The inequality follows because . Thus sufficiently small penalties also improve the original-coordinate mean squared error, though the explicit sufficient bound above was for the unweighted coordinates. Recovering an uncentered intercept adds a fixed nonnegative quadratic form to the slope loss, and its sample-mean error is uncorrelated with the centered slope errors, so the same weighted argument applies. A model with only an unpenalized intercept gives identical estimators. If the noise variance were zero, the strict improvement assertion would fail; positive noise variance is essential.
Use the usual probability-kernel convention: , , and , in addition to symmetry and compact support. These conditions are needed for the stated finite bound; symmetry and compact support by themselves do not impose normalization or nonnegativity. Interpret the differentiability assumption in the usual Sobolev space sense , or assume classical regularity sufficient for the integral Taylor remainder. The kernel density estimator is
The bias-variance decomposition of mean squared error, followed by Tonelli theorem, yields
Independence and a change of variables give the exact integrated variance of a kernel density estimator
All changes of integration order are justified either by nonnegativity or by the displayed finite integrals.
For the bias of a kernel density estimator, symmetry gives . Taylor's integral remainder, with translations understood in , gives
The Minkowski inequality and translation invariance of the L2 norm imply
where . Consequently we obtain the slightly stronger conclusion
Since , this proves the requested bound. For signed kernels, the same argument has in place of ; the printed bound is not generally justified merely by signed-kernel symmetry. For example, let and . This symmetric compactly supported signed kernel has integral one and , but its fourth moment is nonzero. For a normal density its convolution has nonzero bias at any fixed positive bandwidth. Sending would therefore contradict a bound containing only the integrated variance term.
Writing the requested bound as , differentiation gives when . Thus gives mean integrated squared error of order . With the sharper constant one instead has ; the rate is identical.
A direct heuristic for is to choose a twice differentiable pilot kernel , estimate by the second derivative kernel density estimator
and integrate its square. Its integrated variance contains a diagonal term , which should not be mistaken for the target. A useful corrected U-statistic removes that diagonal:
Its expectation is . Thus smoothing bias of an estimator, rather than the diagonal contribution, remains. For a smooth compactly supported probability pilot kernel, the same variance calculation gives
The second term tends to zero because convolution with a shrinking probability kernel approximates every function. Thus and make the raw squared pilot estimate consistent for the quadratic density derivative functional. If , then
so the diagonal-corrected U-statistic is consistent under the same choice. Consistency already uses the assumed ; the additional third-derivative hypothesis is relevant to more ambitious rate heuristics.
Three bounded continuous derivatives do not justify a general root- estimation rate for . For a smooth perturbation with compact support, the directional derivative is
where the last expression requires a fourth derivative in the appropriate weak sense. A regular root- argument would need an influence function proportional to , with finite variance under . Three derivatives do not supply that condition.
For a more quantitative heuristic, impose the additional assumption , use a smooth Fourier cutoff of width , and estimate the quadratic functional by its off-diagonal U-statistic. The tail bias of an estimator is because the Plancherel theorem weights this functional by frequency to the fourth power. The degenerate part of its standard deviation is : the squared norm of the quadratic kernel scales as . At , these two terms balance at and have size , already slower than ; any additional first-order variance cannot improve that balance. To make both terms requires and , which are compatible only when . This is an illustrative smoothness calculation under extra Sobolev and moment assumptions, not a rate theorem asserted solely from bounded third derivatives. Particular much smoother probability density functions may of course permit root- estimation.
By the bias-variance decomposition of mean squared error,
For , comparison with the unbiased estimator reduces to
Its roots are and , so
Equality at either endpoint gives the same risk as . At , every risk is zero, so no strict improvement is possible. This illustrates shrinking a sample mean with variance proportional to mean squared: allowing a small bias can reduce variance enough to improve total risk. The best constant is , whose mean squared error is .
For an estimator with finite second moment, its bias and mean squared error are
Write . On squaring and taking expectations, the cross term vanishes. This proves the bias-variance decomposition of mean squared error:
For the sample mean, independence gives , . Thus has bias . Unbiasedness throughout the parameter family requires
At the single parameter value , all these estimators are zero almost surely; that special value does not change the requirement of unbiasedness for all .
Represent the subset model by a set of column indices and let contain those columns. Its ordinary least squares estimator sets the omitted coefficients to zero and has
For , use . Full column rank of implies full column rank for each . The matrix is an orthogonal projection matrix of rank .
Put and . Projection orthogonality gives the bias-variance decomposition of mean squared error
while the expected residual sum of squares is
These equations distinguish the mean-vector prediction risk in this problem from the additional noise in predicting a new response vector.
First take . Let project onto the full column space of . Since the full model contains , the residual estimate of Gaussian noise variance
is unbiased: its numerator has expectation . Consequently an unbiased Gaussian projection risk estimate is
Indeed its expectation is for every , even when the subset model omits true effects. Independence of the two terms is not needed for this expectation calculation. The full-model variance estimate is important: the subset residual variance generally includes omitted-variable bias.
For a finite candidate collection, choose a model minimizing , breaking ties in favour of a smaller model. The term is common to all models, so this amounts to minimizing
the Mallows Cp form. The fit improvement competes with an increasing dimension penalty. Unbiasedness holds for each fixed model; the estimate at the data-selected model need not remain unbiased, because selection favours downward fluctuations. The method is a heuristic model selection rule, rather than an assertion that it finds the true model with certainty.
The printed includes a genuine qualification. If , there are no full-model residual degrees of freedom. Except in the balanced case , no integrable data-only unbiased estimator can satisfy the requested identity for all means and unknown variances. Here is a proof of the unknown-variance risk estimation in a saturated Gaussian model obstruction. Since is invertible, ranges over all . Suppose had the required expectation at every and variance . For , let and let . Marginally . Applying the assumed identity conditionally gives
whereas applying it to the marginal distribution gives . Their difference is , which must vanish. Integrability under the marginal Gaussian justifies conditioning. If , the obstruction disappears and the residual sum of squares alone has expectation . Thus
The general construction therefore requires , or an independently available unbiased variance estimate.
For independent and identically distributed random variables sampled from a probability density function , a kernel density estimator with kernel for density estimation and smoothing bandwidth is
The usual kernel for density estimation is nonnegative; finite makes the integrated variance finite. The mean integrated squared error and its bias-variance decomposition of mean squared error are
The interchange is justified by the Tonelli theorem.
For the exponential distribution and the specified unit-width uniform kernel, put . The expected value is . Intersecting this interval with the positive half-line gives
On the true probability density function vanishes, whereas
Here for . This leakage across the support boundary proves the integrated squared bias from a density jump:
In particular, and suffice. The phenomenon differs from a smooth interior bias of a kernel density estimator: the order-one boundary error persists over a region of width proportional to .
By independence, . Integrating the first term and using yields
Also : the kernel density estimator mean is an average of translates of , so the Jensen inequality followed by the Tonelli theorem bounds its squared integral.
To optimize over every , we must establish that useful smoothing bandwidths approach zero, rather than optimize only a formal small- expression. An exact calculation supplies that justification. The autocorrelation integral of the exponential distribution density is
Averaging over the two uniform windows, or integrating the piecewise expression for , gives
These formulas show that is continuous on , is strictly positive there because on , and tends to as . Consequently, is bounded away from zero on for every . Its expansion agrees with the supplied .
The choice gives
Choose smoothing bandwidths within of the infimum. Their mean integrated squared error tends to zero, and nonnegativity of the integrated variance gives , hence . For any , eventually
The last step is the arithmetic-geometric mean inequality. Taking the lower limit and then matches the upper bound. Thus
The original PDF has this constant; the TeX aid's is a transcription error.
Put , which is a positive-definite matrix by the full column-rank assumption. The ordinary least squares estimator is
For ridge regression use the criterion . Differentiating gives
If instead the squared-error term is normalized by , replace in this formula and the calculations below by . Only the scale of the tuning parameter changes.
As usual for this linear regression model, use zero-mean errors; more generally suffices. Since the columns are centred, , so the random centring term disappears from both estimators. Thus
Let . The bias and covariance matrix of the ridge regression estimator are
The bias-variance decomposition of mean squared error therefore represents directional risk by the quadratic forms
Their difference has the useful factorization
To check it, multiply on both sides by : the resulting matrix is .
The Cauchy-Schwarz inequality gives in the Loewner order. Therefore the middle matrix is positive-definite whenever . For example,
works, independently of the eigenvalues of . Since is invertible, the risk difference is strictly positive for every nonzero , in particular simultaneously for every unit . This proves uniform directional risk improvement by ridge regression. For the normalized-loss convention, take the displayed choice divided by .
For the final assertion, fix any and choose a unit eigenvector of with eigenvalue . Put and . Directly,
Choosing
makes the squared bias alone greater than , proving the required strict inequality. Thus unbounded directional risk of fixed ridge shrinkage is compatible with the existence of a beneficial signal-dependent small penalty: no fixed positive penalty uniformly improves risk over all possible signals.
The mean assumption matters if the printed covariance condition is read in isolation. With , , , and , the columns and response are still centred and , but the ordinary least squares risk is . Writing , the ridge regression risk is for every . Hence the standard zero-mean regression-error convention, or its stated orthogonality version, is necessary for the first risk comparison; covariance alone is insufficient.
Use the same as in part (a). The error of the weighted realized variance splits into its centered fluctuation and its deterministic quadrature error:
The Hölder continuity of controls this bias:
Since , the bias-variance decomposition of mean squared error has no cross term. Part (a) therefore gives
Hence is a universal choice. This argument separately controls the statistical fluctuation and the Riemann sum approximation.
Put and , where is a nonnegative integer and is the smoothing bandwidth. The local polynomial estimator is the intercept of the weighted least squares fit
When the local polynomial Gram matrix is invertible, the normal equations give
A singular local polynomial Gram matrix requires a selection convention and may leave the intercept unidentified; an arbitrary nonnegative regression kernel alone does not guarantee uniqueness. At , provided , the Nadaraya–Watson estimator is
Multiplying every weight by changes neither fit.
For the uniform kernel, let and . Then . For and , the interval is inside , and the regular design has
The same lower bound holds when the interval starts at zero, despite the absence of the design point zero. In particular the Nadaraya–Watson estimator is defined throughout the integration interval.
For every Lipschitz continuous mean function in , the bias of an estimator and variance satisfy
Here the variance uses the independence of the errors in the fixed-design nonparametric regression model. The bias-variance decomposition of mean squared error and Tonelli theorem give a slightly stronger integrated mean squared error bound than required:
Thus
The printed integration interval represents a nonnegative risk function for . For , the written integral has reversed limits and is nonpositive, making the displayed upper bound trivial; it should not be interpreted as an integrated mean squared error in that range. For , evaluation outside would additionally require a specified extension of the mean function. The subsequent optimization restricts to .
Minimizing the stated right side gives
For sufficiently large , and . For example take . Therefore the upper bound holds with
For the lower bound, the PDF has the mean squared error ; the TeX erroneously moves the square outside the expected value. The PDF's suggested smooth bump function is , with value zero at the endpoints, rather than the corrupted TeX formula. A triangular alternative suffices because only Lipschitz continuity is needed.
The Le Cam two-point lemma says that for two data laws with parameter separation , every estimator satisfies
Indeed, classify according to the nearer parameter value. Misclassification incurs squared-error loss at least , and the sum of the two error probabilities is at least one minus the total variation distance. Averaging the two risk functions proves the stated form.
Let , , and use the two-point lower bound with a triangular bump
Both functions are in , and . Assume first that and . At most design points meet the bump's support. The Kullback-Leibler divergence between normal distributions and chain rule for relative entropy give
The Pinsker's inequality therefore gives . The Le Cam two-point lemma yields the pointwise minimax rate for Lipschitz regression
This universal constant is valid for .
If the printed lower bound is read as applying to all positive integers , it also holds with a smaller constant depending on the fixed . For , use the constant mean functions and . They have Kullback-Leibler divergence , so Pinsker's inequality and the Le Cam two-point lemma give minimax risk at least . Combining the two ranges gives the explicit all- choice
The universal asymptotic constant and this parameter-dependent all- constant are distinct conventions; the latter supplies the assertion without inserting an unstated large- restriction.
Treat and as mean detected counts, or as photon counts with unit quantum efficiency. Let the independent patch measurements be and . For the specified unweighted background subtraction ,
The first error is a fixed bias of an estimator; the last expression is the sum of independent photon shot noise variances. Since are already patch totals, no extra factor of the pixel count is needed, and read noise is neglected.
To obtain the systematic-error ceiling requested in the following clause, define the accuracy measure using total root-mean-square error relative to the true source count. By the bias-variance decomposition of mean squared error,
For , the shot-noise term is approximately , but the mismatch term must be retained.
There is a terminology qualification: the usual variance-based signal-to-noise ratio in photon counting is and does not include a fixed bias as noise. The printed next-part limit requires the root-mean-square accuracy convention above. A deterministic background mismatch contributes to mean squared error, not to the statistical variance.
The estimator is unbiased because , and
The bias-variance decomposition of mean squared error therefore gives
The quadratic is maximized at , so
For
the bias and variance are
The bias-variance decomposition of mean squared error yields
This is the risk formula for an affine shrinkage estimator for a binomial proportion.