Absolute-error loss Created 2026-10-05 Updated 2026-10-14
The loss for estimating a real parameter by . Its risk of a decision rule is the corresponding expected value. Unlike squared-error loss, its pointwise size is a metric, so the triangle inequality gives a direct overlap version of the Le Cam two-point lemma.
Bayesian credibility 2026-10-14
Bayesian credibility estimates a risk's conditional mean by its Bayesian posterior expected value under squared-error loss. When that posterior mean is an affine combination of exposure-weighted individual experience and a prior mean, the coefficient of the experience is its credibility factor. Exact Bayesian credibility is distinct from merely selecting the best affine estimator when the true posterior mean is nonlinear.
Brier score 2026-10-14
The binary Brier score applies squared-error loss to a reported success probability and the observed indicator . It is a loss, so smaller is better. Its values lie in : predicting the outcome with certainty gives zero, while assigning it zero probability gives one. Unlike the logarithmic scoring rule loss, the binary Brier score remains bounded even for a confidently wrong forecast.
For a Bernoulli distribution with true success probability , averaging the two squared losses givesThe report controls only ; the remaining term is the variance of the Bernoulli random variable. Consequently the Brier score is a strictly proper scoring rule. At , the expected loss is , with unique minimum at . Reporting instead gives expected loss , despite its better loss on the particular outcome above.
For several possible categories, the Brier score sums the squared differences between reported probabilities and observed category indicators. With two categories that sum is , so its numerical values are twice the binary convention used here, with the same optimizing report. Brier's original [ref]
https://www.u-cursos.cl/ingenieria/2025/1/CI71C/1/material_docente/bajar?bajar=1&id=8745481. Verification of Forecasts Expressed in Terms of Probability (1950), equation (2)
averages these category-sum losses over forecasts. Strictly Proper Scoring Rules, Prediction, and Estimation by Tilmann Gneiting and others (Section 3.1, Example 1, and Table 1) gives the category-sum and binary forms as negative rewards; negating them gives the losses described here. Cross-validation Created 2026-09-24 Updated 2026-10-14
Cross-validation estimates predictive performance by repeatedly fitting on one part of the data and evaluating on held-out observations. In K-fold cross-validation, divide training data into disjoint folds ; identifies observation 's fold, and is fitted without fold . The displayed average scores each observation using a rule that did not train on it. Weight by observation count when fold sizes differ. Leave-one-out cross-validation uses one observation per fold. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, resampling methods
For the training error example, three folds contain indices with equal remainder modulo 3. Each fit uses eight observations. The squared-error loss averages for degrees 1, 2, and 7 are , , and respectively. Select degree 2 and refit on all twelve training data observations. The folds reuse scarce data while challenging each candidate to predict unseen responses; they do not touch the final test set.
Any learned preprocessing, including variable selection, must also be fitted within each training fold to avoid data leakage. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, the wrong and right way
Repeated tuning can itself overfit the cross-validation score; nested cross-validation uses inner folds for model selection and outer folds for assessment of that entire procedure. [ref]Folds use fewer training observations than the final refit, and their scores are dependent because training observations overlap. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, correlated fold estimates
Splitting must match deployment: for time series forecasting, rolling-origin cross-validation trains on the past and evaluates later observations, preventing future information from entering a forecast. Ordinary random folds need not answer that forecasting question. [ref] Gamma-exponential conjugacy Created 2026-09-24 Updated 2026-10-03
A gamma prior with shape and rate combined with independent observations from an exponential distribution of rate gives the posteriorUnder squared-error loss, the Bayes estimator is its posterior mean .
Suppose , , are independent and identically distributed with Laplace distribution , where . For realized values , the likelihood function and log-likelihood function areFor fixed , maximum likelihood estimation of the location therefore minimizes the sum of absolute losses. This connects the Laplace distribution to robust statistics: each observation contributes a cost growing linearly with its distance, whereas squared-error loss grows quadratically.
Why does a sample median minimize ? Between successive order statistics, moving a little to the right increases each distance to a value on the left and decreases each distance to a value on the right. Hence the slope is the number on the left minus the number on the right. It changes from negative to positive at the middle. More precisely, if , all minimizing locations areFor an even sample size, the objective is flat throughout the interval between the two central order statistics. The midpoint convention for the sample median selects one solution; it does not prove uniqueness. [ref]
Laplace (Double Exponential, Bilateral Exponential) Distribution. SciPy 1.18.0 documentation; SciPy reference guide, Laplace distribution, ML location estimator and the even-N interval between the two central order statistics
This is the finite-sample counterpart of median minimizes expected absolute loss.If , maximizing over givesThe derivative is positive below this value and negative above it. Moreover the maximized likelihood function is proportional to wherever , so the same minimizing locations give the joint maximum-likelihood estimates. [ref]
1.3.6.6.12. Double Exponential Distribution. NIST and SEMATECH e-Handbook of Statistical Methods; NIST/SEMATECH e-Handbook, Section 1.3.6.6.12, Parameter Estimation; median and average absolute deviation formulas
The scale estimate divides by ; this formula is not an assertion that it is an unbiased estimator.The boundary case matters: if all observations equal , choose . Then and as . There is no finite joint maximum-likelihood estimate in the parameter space . In particular, this always occurs for . Writing does not produce an admissible Laplace distribution.
Laplace regression Created 2026-09-24 Updated 2026-10-18
For linear regression with fixed predictor vectors , assume conditionally independent responses with a common scale :Each conditional median and mean is . The log-likelihood function is , so maximum likelihood estimation minimizes the sum of absolute regression residuals:This is least absolute deviations. With only an intercept, it reduces to the Laplace location and scale maximum likelihood problem, so a sample median is a fitted intercept. Provided the minimum , the scale estimate is ; the conditional standard deviation is . If the scale is denoted instead of , the conditional standard deviation is .
Minimizing a sum of absolute losses does not automatically give a unique coefficient vector. Even an intercept-only fit to an even sample size can have an interval of solutions, and redundant predictor columns can introduce further nonuniqueness. If a fit makes every regression residual zero, the joint likelihood function is unbounded as , so there is no finite joint maximum-likelihood estimate with positive scale.
The linear growth of absolute loss limits sensitivity to an extreme response at fixed predictors compared with squared-error loss. It does not protect against every outlier: an extreme predictor can have large regression leverage. The numerical example above changes a response in an intercept-only problem, and makes no general claim of immunity to such predictor changes.
Normal-normal credibility 2026-10-14
Conditionally independent normal distribution observations of mean and known variance , with normal prior mean and variance , give normal-normal conjugacy with known observation variance. Their posterior mean has the displayed exact credibility estimate form. It minimizes posterior squared-error loss and predicts the conditional mean of the next observation.
Past exam of the mathematics course of the University of Cambridge 2001 ib Paper 2 3D Solution Created 2026-09-24 Updated 2026-10-14
For an observed , the continuous uniform distribution likelihood is , with . Multiplying by the stated prior cancels the factor , giving . Its integral over the permitted parameter values is . Hence the posterior distribution isThis is the exponential posterior for a uniform endpoint. Its posterior mean is and its variance is one. The posterior expected squared-error loss decomposes asSince , its unique minimum occurs at the Bayes estimate . The positive loss multiplier changes the risk, not the optimizing action.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 iii Solution Created 2026-10-03 Updated 2026-10-14
For any prior density , the Bayes estimate under squared-error loss is the posterior mean:For the matched beta distribution, the integrals are beta integrals and their ratio isThe posterior mean minimizes posterior expected squared error because . The phrase Bayes point estimate depends on the loss: under absolute-error loss it would be a posterior median, while the posterior mode is a different summary and here equals .
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 i Solution Created 2026-10-03 Updated 2026-10-14
A beta distribution is a convenient prior for a probability and is conjugate to the binomial distribution of the death count. Match its mean and variance . For ,The moment matching for a beta prior formula givesConditional on , use and the observed count . Multiplying its likelihood by the prior density gives the Bayesian posterior through Beta-binomial conjugacy:Under squared-error loss, take its posterior mean as the point estimate. A 95% equal-tail credible interval is given by its 0.025 and 0.975 quantiles. Numerically,Matching two moments does not uniquely determine a prior distribution; the beta family is a justified convenient choice, not a conclusion forced by those moments. Its transfer to this hospital presumes that the historical between-hospital distribution is relevant to the present risk and case mix.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 v Solution Created 2026-10-03 Updated 2026-10-14
Use a hierarchical Bayesian model with binomial observation errors and a common distribution for the underlying risks:Give a shared hyperprior, or parameterize them by mean and concentration and put priors on and . Conditional on these hyperparameters, the risks are independent and identically distributed; after integrating them out they are exchangeable random variables with shared uncertainty. The data estimate the overall risk level and between-hospital variation. Conditional Beta-binomial conjugacy givesand full Bayes point estimates under squared-error loss areAn Empirical Bayes method instead estimates the hyperparameters from the marginal beta-binomial distribution likelihoodand inserts their fitted values in the conditional posterior means. Both approaches provide partial pooling, stronger for smaller hospitals. Full Bayes also propagates hyperparameter uncertainty into the credible intervals. If systematic covariates are needed, one can place exchangeable residual effects in a logistic regression model rather than assuming a common unconditional risk distribution.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 39 4 Solution Created 2026-10-03 Updated 2026-10-14
A credibility premium estimates a risk's expected future claims by combining its own observed experience with a collective or prior mean. In its basic form , the credibility factor is the weight assigned to individual experience. Larger credibility places less weight on pooling with the population. The amounts below are pure expected-claim premiums; no additional expense or profit loading is specified.
Under squared-error loss, the posterior risk for estimating the unknown conditional mean by isHence the Bayes estimator under squared error loss is the posterior mean. In the equal-year model, conditional independence makes the likelihood proportional to . Combining it with the normal prior and completing the square givesBecause , the required estimator is ; it also equals the predictive mean . The normal-normal credibility expression isThis is exact Bayesian credibility, not merely the best linear approximation to a possibly nonlinear posterior mean.
For unequal life counts use the usual exposure model: individual-life losses are conditionally independent with variance , and the annual totals are conditionally independent given the same . ThenThe dot denotes the stipulated normal approximation. The positive exposures are known. Define total past exposure and its experience mean byThe normal log-likelihood has quadratic term . With the prior , normal-normal conjugacy with unequal exposures gives posterior variance and meanTherefore the estimated pure premium per life for year has the normal-normal credibility with unequal exposures formIt is also an exact normal-model Bühlmann–Straub credibility estimate. The individual experience is exposure-weighted: the unweighted mean of the yearly per-life observations would generally discard the different precisions.
For positive , differentiation givesThus increasing the prior variance increases credibility, because greater between-risk heterogeneity makes the collective mean less representative of this risk. Increasing the individual process variance decreases credibility, because a fixed amount of observed experience becomes noisier. The future exposure supplies no new observation, so it does not enter . It only scales the total premium:The independent-life variance scaling is part of the usual exposure interpretation. Without it, a known variance for one life does not determine the variance of a total: a common pairwise conditional covariance would add to . Similarly, cross-year conditional dependence would change the joint likelihood. Those assumptions are implicit in applying the standard credibility model to the final paragraph.
Past exam of the mathematics course of the University of Cambridge 2004 ib Paper 4 19H i Solution Created 2026-09-24 Updated 2026-10-14
Under squared-error loss, the posterior expected loss decomposes asIt is uniquely minimized by the posterior mean. Integrating the Gamma posterior gives . Hence the Bayes estimator is
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 43 4 Solution 2026-10-14
A credibility estimate combines a risk's observed experience with collective or prior information, typically as . The credibility factor is the weight assigned to the individual experience: more reliable or more extensive data generally increases it. Bayesian credibility treats the risk parameter as random with a prior distribution and predicts future claims by averaging the conditional claim mean under its posterior distribution. Under squared-error loss this posterior predictive mean is optimal. It need not be an affine combination in every Bayesian model; the Poisson-gamma conjugacy calculation below yields that credibility form exactly, rather than as a best-linear approximation.
Past exam of the mathematics course of the University of Cambridge 2007 ib Paper 1 18C iii Solution Created 2026-09-24 Updated 2026-10-14
The uniform prior and likelihood give the posterior densitya Beta distribution with parameters . Under squared-error loss for , the posterior expected loss is , minimized uniquely at the posterior mean of , not at the product of the two posterior mean factors.
Using the supplied beta integral,Thus the Bayes estimate isThis remains positive even on the endpoint samples, unlike the extended MLE; it integrates over the posterior uncertainty in .
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 43 4 Solution 2026-10-14
A credibility estimate combines a risk's own observed experience with a collective or prior mean, in the form . The credibility factor is the weight given to that risk's experience. Bayesian credibility starts with a prior distribution for a latent risk parameter, updates it using observations, and estimates the conditional risk mean by its Bayesian posterior expected value under squared-error loss. In conjugate models this posterior mean can have exactly the displayed credibility form.
For the unequal policy exposures, defineConditional independence of the binomial distribution observations gives the likelihood, up to a factor not depending on ,Multiplication by the beta distribution prior therefore gives Beta-binomial conjugacy:Both posterior parameters are positive, since and the prior parameters are positive.
The conditional target is . To verify the quadratic-loss rule directly, for any proposed estimate and observed data ,The variance term does not depend on , so the unique Bayes estimator under squared error loss is the posterior mean. Applying the beta mean formula givesIt is also the posterior expected future claim count, by the tower property of conditional expectation.
Let be the collective prior claim probability and the observed claims per policy. ThenTherefore the exact beta-binomial credibility with unequal exposures isThe individual experience must be weighted by exposure: is the policy-weighted frequency, not the unweighted average of when the differ. The factor multiplies next-year expected counts after scaling both component probabilities by .
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 31 4 b Solution Created 2026-10-03 Updated 2026-10-06
Conditional on , summing the individual independent Poisson counts gives . The between-year conditional independence makes the likelihood functionMultiplying by the gamma distribution prior density, proportional to , gives the Poisson-gamma conjugacy with unequal exposures:For an action , the posterior squared-error loss decomposes asHence the Bayes estimator under squared error loss is the posterior mean, givingFuture counts are independent of the observed years conditional on , so the law of total expectation then gives the posterior predictive expected countThe Bayesian and credibility estimates coincide exactly. This exact Bühlmann–Straub credibility for Poisson-gamma counts occurs because the posterior mean is already affine in the exposure-weighted experience, and therefore belongs to the class over which the credibility estimate minimizes mean squared error.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 34 3 Solution Created 2026-10-03 Updated 2026-10-06
For fixed-design nonparametric regression, let and . The degree- local polynomial estimator takes the fitted intercept , whereUse a nonnegative regression kernel and an invertible local polynomial Gram matrix to obtain a unique fit. For , solving the single weighted least squares normal equation gives the local constant estimator:At the interior point , use the standard unit-integral regression kernel convention . Otherwise the leading variance below is ; unlike a kernel density estimator, the local constant estimator itself is unchanged by rescaling .
The local constant estimator is a linear estimator in nonparametric regression with weights . The independent unit-variance errors implyTo control the bias of an estimator, differentiability at this one point is enough. WriteSymmetry makes , and the supplied moment approximation gives . Therefore the linear contribution to the bias of an estimator is . The remaining contribution has absolute value at most , because only receive positive weight. This is the interior first-order bias cancellation for local constant regression, and gives squared bias of an estimator . Combining with the variance provesFor fixed , take . It satisfies both asymptotic smoothing bandwidth conditions, and the displayed remainder, multiplied by , tends to zero for this fixed . ThusLetting proves the optimized scaled pointwise error tends to zero. The order of these limits matters: no remainder uniform in has been assumed.
For the lower bound over the whole function class, the absence of a uniform bound on derivatives permits a particularly direct argument. It also avoids assuming a normal distribution for errors when the model only supplies their first two moments. Fix and . Choose a smooth bump function on the interval, with , whose support contains no design point except possibly . Such a bump exists because the design is finite; at an endpoint use the restriction of a smooth bump on the real line. Every , , belongs to the differentiability class.
If is not a design point, all observation means are zero for every . The Le Cam two-point lemma applied to has total variation distance zero and gives a lower bound tending to infinity with . In fact, the supremum of the mean squared error is infinite at every such .
If is a design point, only its response depends on . The resulting location family is the single observation ; all remaining observations are independent of and give no extra information. The single-observation location minimax bound isHere is a proof covering discrete as well as continuous errors. Give the prior distribution , independently of the noise. Put and . Consider an easier experiment in which an oracle also reveals whether , and reveals itself on the complementary event. On the event and , every possible truncated noise value places within . The flat prior distribution then makes the Bayesian posterior noise law exactly its truncated original law. The smallest conditional squared-error loss is its conditional variance , attained by the posterior mean.
The probability of that event is at least for , by restricting further to . Thus every rule's supremum risk function is at least the original Bayes risk, which is at least the easier experiment's Bayes risk, and therefore at least . Let and then . Finite second moment and zero mean give . The rule has constant mean squared error one, proving the equality.
Consequently, at every , the unrestricted differentiability class satisfies the stronger conclusionThus works for every . There is no conflict with the preceding fixed-function limit: the worst functions, including arbitrarily narrow bumps, can vary with . This is the pointwise versus uniform risk distinction. A smoothness ball with a common derivative bound would pose a different minimax risk problem.
Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 3 20H c Solution Created 2026-09-24 Updated 2026-10-06
The specified gamma distribution uses shape and rate . Multiplying its density by the Poisson likelihood gives a posterior density proportional to . Thus the conjugate prior calculation givesFor squared-error loss, the posterior expected loss isIt is minimized at the posterior mean, so the Bayes estimator isFor a fresh conditionally independent Poisson observation, the posterior predictive probability of zero is the posterior expectation of . Evaluating the gamma integral givesThe samples are independent conditional on ; integrating out the uncertain common parameter produces the predictive probability above.