One Distribution, Several Sensible Targets
An estimate is not judged in isolation: it is judged by the loss assigned to its error. Squared loss penalizes large errors especially strongly, absolute loss grows at a constant rate with error size, and Huber loss combines a quadratic penalty near zero with a linear penalty in the tails. Consequently, minimizing expected loss need not select the same action under each choice.
We first study a general location problem. Let \(Y\) be a random variable representing the quantity to be summarized, and let \(a\in\mathbb{R}\) be an action. The expected loss of \(a\) is \(E[\rho(Y-a)]\), when this expectation is finite. In an estimation problem, the analogous risk at parameter value \(\theta\) is \(R(\theta,\delta)=E_\theta[\rho(\delta(X)-\theta)]\). The first problem selects a representative location of a distribution; the second evaluates an estimator’s sampling error. The same loss functions apply, but the random quantities and the decision problem must not be confused.
The Three Loss Functions
For an error \(u\), squared loss is \(\rho_2(u)=u^2\), and absolute loss is \(\rho_1(u)=|u|\). We use the following convention for Huber loss with tuning constant \(c>0\):
Huber loss is quadratic for errors no larger than \(c\) in magnitude and linear for larger errors. Its derivative, called the Huber score here, is the clipped function
The score remains bounded, so a very large residual contributes no more than \(c\) to the derivative of the objective. This limits the influence of extreme observations on the minimizing action.
Squared Loss Selects the Mean
Suppose \(E[Y^2]<\infty\), and write \(\mu=E[Y]\). Expanding the square gives an exact decomposition for every action:
The cross-product has expectation zero because \(E[Y-\mu]=0\). The variance term does not depend on \(a\), and the remaining term is minimized uniquely at \(a=\mu\).
The result is not just a convenient formula: it explains why using squared error makes the mean the target. If extreme values make large contributions to squared error, they can pull that target substantially.
Worked Example: Four Observations and Three Locations
Consider the empirical distribution that assigns probability \(1/4\) to each of \(0,0,1,20\). This is also the distribution of a uniformly selected value from the four observations.
Squared loss. The mean is \((0+0+1+20)/4=21/4=5.25\), so it is the squared-loss minimizer. Its minimum expected squared loss is the empirical variance:
Absolute loss. Any \(a\in[0,1]\) is a median of these four values and minimizes expected absolute loss. For example, at \(a=0.5\), the expected absolute loss is \((0.5+0.5+0.5+19.5)/4=5.25\). The distant value 20 pulls the mean far to the right, but it does not eliminate the interval of absolute-loss minimizers.
Huber loss with \(c=1\). The minimizing action solves \(\sum_{y\in\{0,0,1,20\}}\psi_1(a-y)=0\). For \(0\leq a\leq1\), this sum is \(2a+(a-1)-1=3a-2\), whose root is \(a=2/3\), within the interval assumed. Convexity of the objective ensures that this zero-score action is a minimizer. Thus the three choices are \(5.25\), any value from 0 to 1, and \(2/3\), respectively.
Absolute Loss Selects a Median
A median of \(Y\) is any value \(m\) satisfying \(P(Y\leq m)\geq 1/2\) and \(P(Y\geq m)\geq 1/2\). There may be more than one median, especially for a discrete distribution. The complete condition for minimizing expected absolute loss is:
To verify the condition, let \(G(a)=E[|Y-a|]\), a finite convex function. Its left and right derivatives are
These expressions follow by taking the left or right derivative of \(|y-a|\) for each fixed \(y\); the difference quotients are bounded in absolute value by 1, so dominated convergence justifies taking expectations. A point minimizes a convex function exactly when its left derivative is at most zero and its right derivative is at least zero. Applying that criterion gives \(P(Y<a)\leq1/2\leq P(Y\leq a)\), which is precisely the median condition. This also explains why the minimizer may be an interval rather than a single point.
Huber Loss Selects a Clipped-Score Location
Assume \(E[|Y|]<\infty\), and define \(H(a)=E[\rho_c(Y-a)]\). This expectation is finite: Huber loss is bounded above by a constant plus \(c|Y-a|\). Its derivative can be taken inside the expectation because \(\rho_c\) is differentiable and its derivative is bounded in magnitude by \(c\). The chain rule therefore gives
Since Huber loss is convex, any solution of this score equation minimizes the expected loss. A solution exists: \(H\) is continuous and tends to infinity as \(|a|\) tends to infinity, since \(\rho_c(u)\geq c|u|-c^2/2\). Hence it attains a minimum, and differentiability makes the derivative zero at a minimizer. The minimizer need not always be unique. A sufficient condition for uniqueness is that \(Y\) have a density positive everywhere: for any \(a_1<a_2\), there is positive probability that \(Y\) lies in an interval where \(\psi_c(a_2-Y)>\psi_c(a_1-Y)\); thus \(H'\) is strictly increasing.
Worked Example: A Bernoulli Distribution
Let \(Y\sim\operatorname{Bernoulli}(0.2)\), so \(P(Y=1)=0.2\) and \(P(Y=0)=0.8\). Under squared loss the minimizing action is \(E[Y]=0.2\). Under absolute loss, 0 is a median because at least half the probability lies at or below 0 and at or above 0; it is the unique median since \(P(Y=0)>1/2\).
Now use Huber loss with \(c=0.5\). For \(0\leq a\leq0.5\), the score equation is
so \(a=0.125\). This lies in the interval used to derive the equation, and the objective is convex, so it is a minimizer. The three minimizing actions differ: 0.2 for squared loss, 0 for absolute loss, and 0.125 for Huber loss. For a check on the Huber calculation, the expected loss at \(0.125\) is \(0.8(0.5(0.125)^2)+0.2(0.5(0.875)-0.125)=0.06875\).
Worked Example: Symmetry in a Normal Location Model
Let \(Y\sim N(\mu,\sigma^2)\) with \(\sigma>0\). The mean and median are both \(\mu\), so squared and absolute loss select the same action. For Huber loss, the distribution of \(Y-\mu\) is symmetric about zero and \(\psi_c\) is odd. Therefore \(E[\psi_c(\mu-Y)]=0\); the Huber score equation is satisfied at \(a=\mu\). The normal density is positive everywhere, so the uniqueness condition above shows that this is the unique Huber minimizer as well.
For a numerical risk comparison, take \(\mu=0\), \(\sigma=1\), and \(c=1\). The minimum squared risk is 1, and the minimum absolute risk is \(E[|Y|]=\sqrt{2/\pi}\), approximately 0.798. The minimum Huber risk is
where \(\phi\) and \(\Phi\) are the standard normal density and distribution function. All three risks are evaluated at the same action, zero, but under different loss functions. Their numerical values are not directly comparable as if they were measurements on one common scale.
What Changes in Risk Assessment?
In estimation, a rule \(\delta\) has risk \(R(\theta,\delta)=E_\theta[\rho(\delta(X)-\theta)]\). Changing \(\rho\) changes the penalty assigned to each possible estimation error, and hence changes the risk function used to assess the rule. It may also change which rule is optimal for a decision problem. A rule optimized for squared-error risk is not thereby optimal under absolute or Huber risk.
Keep two questions separate: which action minimizes expected loss? and how much expected loss does a specified estimator incur? The first identifies a target or an optimal action for a stated distribution. The second evaluates an estimator under a sampling model and a stated parameter. The mean, median, and Huber location answer the first question for their respective losses; they do not, by themselves, calculate the sampling risk of an estimator.
Common Mistakes
- Assuming every loss targets the mean. The mean minimizes squared loss, but absolute loss targets medians, and Huber loss uses a clipped-score equation.
- Assuming the median is always unique. Discrete distributions can have an interval of medians, as the four-value example shows.
- Calling Huber loss “the median loss.” Huber loss has bounded score in the tails, but its minimizer generally differs from the median.
- Comparing risk numbers across losses without qualification. Risk is an expectation of the chosen loss; changing the loss changes the quantity being averaged.
- Confusing a distributional location with an estimator’s sampling risk. A location minimizes expected loss over \(Y\); an estimator’s risk averages loss over the sampling distribution at a fixed parameter.
Check Your Understanding
Use the definitions and derivations above to answer these questions.
- What moment condition ensures that the squared-loss minimizer is finite, and what is that minimizer?
- State the probability condition that characterizes an absolute-loss minimizer when the distribution has atoms.
- For Huber loss, write the score equation and explain why its score is less sensitive to a very large residual than the squared-loss score.
- If a distribution is symmetric about \(\mu\) and has a positive density everywhere, what are the squared-, absolute-, and Huber-loss minimizing actions?
- Why should the numerical risks of one estimator under squared and absolute loss not be treated as directly comparable quantities?