Skip to content
Enjoy complimentary data migration when switching from your existing bookkeeper or CPA to Institution.

Bookkeeping & finance

Use weighted cost regression only when the weights have an evidence basis

Understand why unequal cost variability can justify different observation weights, how inverse-variance weighting works, and which problems it cannot repair in a financial model.

By Institution5 minute readPublished View sources
In this guide

Cost observations may have different amounts of unexplained variation

A cost model can fit quiet operating months fairly closely while missing busy months by much larger dollar amounts. That pattern may indicate that the unexplained variation grows with activity. It does not automatically mean the cost relationship itself is wrong, although that possibility also needs investigation.

NIST describes weighted least squares as a method for fitting relationships when observations provide different precision. The fitting process assigns different nonnegative weights to squared errors. With suitable assumptions, weights inversely proportional to error variance can improve the precision of estimated parameters.

The weights need a defensible basis. Giving a month less influence because its cost is inconvenient, or because management dislikes its implication, is not a statistical treatment of unequal variance. First establish what the observations measure and why their variability differs.

References: NIST: Weighted least squares regression

Distinguish a larger variance from a larger standard deviation

Suppose an illustrative analysis estimates that comparable low-volume months have a cost-error standard deviation of $50, while comparable high-volume months have a standard deviation of $100. The high-volume variance is four times as large because variance is the square of standard deviation.

Inverse-variance weighting therefore gives a low-volume observation four times the weight of a high-volume observation. Relative weights of four and one produce the same coefficient estimates as weights of 1/2,500 and 1/10,000, because multiplying all weights by the same positive constant does not change the minimizing coefficients.

Weighting by inverse standard deviation would produce a two-to-one ratio and a different fitting criterion. Check the software's convention: some interfaces request variances, some standard deviations and some direct weights. A correctly estimated uncertainty measure can still be entered on the wrong scale.

See what the weights change in a small example

Use six invented observations with activity levels of 100, 200, 300, 400, 500 and 600 units and costs of $620, $680, $830, $970, $1,040 and $1,400. Fit a straight line with an intercept. The ordinary least-squares fit is approximately $411.33 plus $1.46286 per activity unit.

Now assume, solely for illustration, that independent prior evidence justifies relative weights of four for the first three observations and one for the last three. The weighted fit becomes approximately $438.08 plus $1.37405 per unit.

At 450 units, the two fitted cost values are approximately $1,069.62 and $1,056.40. Neither number is declared correct by this small dataset. The example shows that changing the error-precision assumptions changes the estimated relationship and therefore the budget input.

See what the weights change in a small example
Illustrative fitInterceptSlope per unitFitted cost at 450 units
Equal observation weights$411.33$1.46286$1,069.62
Relative weights 4, 4, 4, 1, 1, 1$438.08$1.37405$1,056.40

Estimate the variance pattern without using the desired answer

Look for repeated or otherwise comparable operating conditions that can reveal how error variation changes with activity. A longer historical record may support a variance model. Six illustrative points do not justify pretending that their group variances are known precisely.

NIST cautions that estimated weights can themselves be unreliable, particularly when based on very few repeated observations. A small estimated variance creates a large inverse weight and can give an unstable observation group too much influence.

Inspect the proposed weighting function over the full activity range. Check whether it assigns extreme influence to near-zero activity or to a group with little data. Document how uncertainty in the weights affects the conclusion instead of presenting the weighted result as automatically more sophisticated or trustworthy.

References: NIST: Weighted least squares regression

Do not use weights to hide a missing cost mechanism

A large busy-month residual might come from overtime, a new capacity block or a one-time supplier charge. If the expected cost genuinely changes at a threshold, downweighting those months leaves the mean relationship misspecified. Add the supported cost mechanism or use a model that represents the relevant ranges.

Similarly, a data-entry error should be corrected from source evidence rather than assigned a small weight. An unusual but valid expense may need its own explanatory variable or separate forecast treatment. Weighted regression does not decide which transactions belong in the cost population.

The method also does not resolve a causal identification problem. Activity can move alongside staffing, product complexity or prices. A fitted coefficient remains dependent on the model's included variables and evidence, even when its estimated standard error becomes smaller.

Review residuals on the scale relevant to the method

After fitting, examine residual behavior in relation to the proposed variance structure. Raw dollar residuals may still widen with activity because that is exactly the pattern the weights were designed to accommodate. Standardized or appropriately weighted residuals help assess the remaining error behavior.

Check time dependence separately. Successive monthly errors can be related because a missing cost rolls into the next close or because an unmodeled price change persists. Different observation weights alone do not remove that serial dependence.

Compare forecast performance on periods not used to fit the model. Use the business's decision horizon and loss measure, with the same cost definition across alternatives. A better in-sample weighted criterion is not evidence that the next operating budget will be more accurate.

Carry the variance model into uncertainty estimates

A forecast for a busy month may have wider uncertainty than one for a quiet month even if the fitted line is well estimated. Use a prediction method consistent with the error variance at the forecast activity level rather than attaching one constant dollar band everywhere.

Keep uncertainty in the activity forecast visible too. Weighted regression conditions on the driver values supplied to it. It does not make next month's orders, labor hours or transaction counts certain.

Explain the weight choice in the budget handoff

Provide the cost population, driver definition, fitted relationship, relative-weight rule and evidence behind that rule. Show whether the spending decision changes materially between plausible weighting choices.

If the evidence does not support precise weights, retain the simpler model or widen the decision analysis appropriately. The purpose of weighting is to represent known differences in information quality, while keeping the commercial cost mechanism and the forecast's uncertainty open to review.

Sources

Requirements and product details can change. Check the linked guidance for the facts that apply to your situation.

Related reading

Need help with this work?

General information, not personalized accounting, tax, legal, or investment advice. Have the appropriate qualified professional review decisions that depend on your circumstances.