The Lawfare Academy

Lawfare Group → Knowledge Institute → Lawfare Academy

← Back to program

← Regression and Business Forecasting

Unit 3

Multiple predictors and confounding

Learning objectives

  • Explain multiple predictors and confounding in your own words.
  • Apply the principle to the worked business case.
  • Evaluate the answer and identify an assumption that could change it.

Multiple predictors and confounding

A multiple-regression coefficient compares observations holding included predictors fixed within the model. Omitted factors and reverse causation can still bias causal interpretation. Adding variables is not automatically an improvement.

Worked example

Advertising and sales rise in busy seasons. Including season can alter the advertising coefficient.

Current on-site learning

Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative accounting frameworks are distinguished. Independent subject review and observed human learner testing remain pending.

Work through the reasoning

Define the population, sampling or assignment process, variables, estimator, and intended inference. For this unit, connect the explanation of multiple predictors and confounding to the worked example before answering the practice question.

Check the limits

Check dependence, selection, uncertainty, and whether the evidence supports description, prediction, or causation. If the source model and the practical example use different assumptions, state the difference rather than applying the formula or rule mechanically.

Apply it independently

Why can the coefficient change? Write an answer before opening the model response. Show the calculation or explain the causal or logical steps. Change one material assumption and say whether your conclusion changes. This practice is optional; you can read every part of the course without submitting work.

Original Academy expansion: multiple regression and causal reasoning

Multiple regression models an outcome using several predictors: Y = beta0 + beta1 X1 + beta2 X2 + error. The phrase holding other variables fixed describes a comparison within the specified model. It does not mean real businesses can independently manipulate every predictor. The interpretation also depends on whether the data contain comparable observations. If large jobs are always emergencies and small jobs never are, separating size from urgency requires extrapolation or additional information. Software output cannot manufacture overlap.

The omitted-variable problem can be stated precisely in a simple setting. Suppose the appropriate population mean is Y = beta0 + beta1 X + beta2 Z, with a zero-conditional-mean error. If Z is omitted and Y is regressed on X alone, the population simple-regression slope is beta1 + beta2 Cov(X,Z)/Var(X). The second term is the omitted contribution. Its sign depends on both the effect associated with Z and the association between X and Z. A coefficient change after adjustment is evidence of sensitivity to model specification; deciding which model answers the causal question requires a substantive account of Z.

Worked investigation: seasonal confounding

Imagine two seasons. In the quiet season, advertising spending levels 1 and 2 produce sales 12 and 14. In the busy season, advertising spending levels 3 and 4 produce sales 36 and 38. All amounts are fictional units. Within either season, a one-unit advertising difference corresponds to two sales units. Across all four records, however, xbar = 2.5 and ybar = 25, Sxx = 5 and Sxy = 50. A simple regression reports a slope of 10. The pooled association mixes the within-season relationship with a twenty-unit seasonal shift.

With an indicator S equal to 1 in the busy season, all four observations fit Y = 10 + 2X + 20S exactly. This constructed example illustrates how adjusting for a common factor can change a coefficient from 10 to 2. It does not establish that 2 is the causal advertising effect in actual business data. Spending may also respond to expected sales, competitors, or management judgment. The exact fit here is a teaching device, not a realistic claim that business outcomes have no noise.

Adding every recorded variable can create other problems. A mediator lies on a pathway from an intervention to an outcome. If advertising increases inquiries and inquiries increase sales, controlling for inquiries may remove part of the total pathway the manager wants to measure. A collider is influenced by two other variables. Conditioning on it can induce associations that were absent before conditioning. For example, restricting analysis to accepted jobs can distort comparisons if both quoted price and customer urgency affect acceptance. Start with the timing and causal role of each variable rather than letting automated selection define the question.

Multicollinearity is a different issue. Closely related predictors can make individual coefficient estimates unstable. Suppose revenue and billable hours are both included when revenue is nearly a constant rate times hours. Many combinations of coefficients may produce similar predictions over observed data. Standard errors can be large even when overall predictions are useful. Perfect collinearity makes the usual coefficient solution unidentified. Centering may improve numerical interpretation in interaction models, but it does not create information that distinguishes two nearly redundant predictors.

In matrix notation, least squares solves a projection of Y onto the columns of X. If the columns are linearly independent, the formal solution is b = (X transpose X) inverse X transpose Y. Numerical software usually uses more stable decompositions rather than explicitly inverting the cross-product matrix. A substantive model can include squared terms, indicators, and interactions while remaining linear in its coefficients. Calling it linear regression does not require every predictor to enter as a straight-line effect of its original measurement.

Progressive practice

  1. Foundation: verify the pooled slope of 10 using the four observations above.
  2. Application: predict sales at X = 2 in the busy season under the adjusted equation. State whether that predictor combination appears in the dataset.
  3. Transfer: distinguish the role of pre-campaign season, post-campaign inquiries, and job acceptance when estimating the total advertising effect.
  4. Critique: a coefficient becomes insignificant after a highly correlated predictor is added. Explain why this does not prove that the original predictor has no business relevance.

Worked reasoning for the practice

The Y deviations are -13, -11, 11, and 13. Their products with X deviations sum to 19.5 + 5.5 + 5.5 + 19.5 = 50. Divide by Sxx = 5 to obtain 10. The adjusted prediction at X = 2 and S = 1 is 34, but this exact combination was not observed. It relies on the additive model extending the same slope across seasons. Season can be a pre-treatment confounder, inquiries a mediator, and acceptance a selection variable; their inclusion depends on the estimand. A significance change can reflect increased uncertainty from redundancy, altered interpretation, or a different association. Examine estimates, intervals, support, and the intended prediction or causal task.

Reading alignment for this expansion

The earlier introductory links remain background reading. Use the complete current on-site studios; publisher links are optional provenance. The original Academy worked records above are not quotations from those sources.

Open the runnable laboratory

Complete current conceptual preparation

Multiple regression: identify the partial comparison and its uncertainty

Make the design matrix concrete

With n observations and p coefficients, each row of X contains an intercept and the chosen predictors. Least squares minimizes (y-Xb)'(y-Xb). Differentiation gives X'X b=X'y. Full column rank means no column can be exactly reconstructed from the others, so a unique coefficient vector exists. Software should solve with a stable decomposition rather than explicitly invert X'X. Rank deficiency is missing identification in the observed design, not a rounding error cured by renaming columns.

For a transparent new fixture, use centered predictors u=(-1,-1,1,1,0,0), v=(-1,1,-1,1,-1,1) and outcomes y=(7,9,9,15,7,13). The predictor means are zero; sum(u²)=4, sum(v²)=6 and sum(uv)=0. Their cross-products with y are sum(uy)=8 and sum(vy)=14; mean(y)=10. The orthogonal design gives intercept 10, u coefficient 2 and v coefficient 7/3. Fitted values are (17/3,31/3,29/3,43/3,23/3,37/3), and residuals (4/3,-4/3,-2/3,2/3,-2/3,2/3). The residual sum and each predictor-residual cross-product are zero. SSE=16/3 and n-p=3, so s²=16/9. Do not confuse this noisy fixture with the preserved Academy exact-fit season or branch constructions.

Partial out the other predictors

A partial coefficient compares the component of a predictor that is not linearly explained by the other included columns. Regress u on the intercept and v, and keep residual ru. Regress y on those same columns, and keep residual ry. The slope sum(ru*ry)/sum(ru²) is the u coefficient in the full model. This residualization identity explains 'holding included predictors fixed' without claiming that an actual intervention can independently vary them. Here u is orthogonal to both columns, so ru=u and the coefficient is 8/4=2.

If u were exactly twice v, its residual after adjustment would be zero and that denominator would vanish. Near collinearity instead leaves a small denominator and large coefficient uncertainty. VIF_j=1/(1-R_j²), where R_j² comes from regressing predictor j on the other predictors with an intercept. A VIF of 5 multiplies that coefficient's variance by 5 relative to an otherwise matched orthogonal design, or its standard error by sqrt(5). It is not a universal deletion threshold or evidence of confounding. Deleting a substantively essential variable can change the estimand while making a table appear tidier.

Inference is for a specified model

Under independent common-variance zero-mean errors, the coefficient covariance estimate is s²(X'X)^-1. For this orthogonal design, diagonal entries are s²/6 for the intercept, s²/4=4/9 for u, and s²/6=8/27 for v, with cross-covariances zero. Thus SE(u)=2/3 and SE(v)=sqrt(8/27). Normal errors give t statistics with three residual df for individual linear hypotheses. The u=0 statistic is 3. The v=0 statistic is (7/3)/sqrt(8/27), approximately 4.28661. A more complete fitted mean and a significant-looking coefficient are not automatic evidence of a causal mechanism.

For any contrast c'b, variance is c'Cov(b)c. At u=1,v=1 the fitted mean is 43/3. Its variance is s²(1/6+1/4+1/6)=28/27. A new individual's prediction variance adds s², yielding 76/27. Using separate coefficient intervals and adding their endpoints does not generally produce an interval with the intended coverage for a contrast. Compute the covariance-weighted contrast directly and state pointwise or simultaneous scope.

Compare nested models with the right denominator

The intercept-only SSE is sum((y-10)^2)=54. Adding both predictors reduces SSE to 16/3. The overall F is [(54-16/3)/2]/[(16/3)/3]=219/16=13.6875 on 2 and 3 df. To test u after v, the reduced intercept-plus-v SSE is 64/3. The one-parameter partial F is [(64/3-16/3)/1]/[(16/3)/3]=9, equal to the u t-squared. This test answers whether u adds explanatory mean structure under the specified model after v; it does not rank u's causal importance or establish future forecasting value.

Adjusted R-squared=1-[SSE/(n-p)]/[SST/(n-1)]. Here R-squared=1-(16/3)/54=73/81, whereas adjusted R-squared=1-(16/9)/(54/5)=203/243. Ordinary R-squared cannot fall when unrestricted predictors are added to the same rows; adjusted R-squared can. Neither substitutes for a locked later evaluation. Comparing models on different missing-data subsets confounds a specification change with a sample change. Retain the exact eligible rows and compare on a common design or explain why the targets differ.

Confounding, mediation and selection require a question

The preserved seasonal example has a pooled slope 10 and adjusted slope 2 because spending composition and a 20-unit season shift are mixed. That decomposition is strong teaching and stays intact. More generally omitted-variable bias in the simple population projection is beta_z*Cov(x,z)/Var(x), given the stipulated correctly specified full mean. Its sign needs both terms. Adding a pre-intervention confounder may help under adequate measurement and overlap. Adding a post-intervention mediator changes the target from a total relation; conditioning on a selection collider can introduce an association. Use temporal and causal reasoning before selecting columns by p-value. Reverse causation remains possible when management spends in response to anticipated sales.

Optional practice and changed facts

Guided model: residualization and rank

The fixture's centered cross-product sum(u*v)=0, so residualizing u on the intercept and v leaves u. Its coefficient is 8/4=2. Changed fact: replace u with 2 v. The design loses rank; separate u and v effects are not identified. Report that restriction and recover appropriate variation rather than interpreting whichever coefficient the software retains.

Independent model: nested fit versus prediction

Full SSE=16/3, reduced-v SSE=64/3 and residual variance 16/9 give partialF=9=t_u². The overall two-predictorF=13.6875 uses a different comparison. Changed fact: the larger model was selected from 100 candidate combinations after inspecting these same outcomes. The nominal preplanned F comparison no longer describes the whole selection procedure. Disclose the search, keep model building inside training and use a genuinely later or properly nested evaluation before claiming predictive improvement.

Transfer model: an unsupported operating point

The fitted mean at u=v=1 is 43/3 and estimated mean variance 28/27; individual variance 76/27. Changed fact: the proposed action sets u=10 outside observed -1 through 1. The formulas can produce a number, but neither covariance nor a wider interval validates the extrapolated mean or an intervention effect. Collect relevant operating-range evidence or narrow the recommendation.

Unit rubric: 20 points

Award four points each for constructing full-rank X and normal equations; residualized conditional interpretation; coefficient/contrast covariance and df; matched nested comparisons with sample preservation; and causal/validation limits with changed facts. Complete model: retain intercept 10,u 2,v 7/3,SSE 16/3,df 3,s²16/9,partialF 9,overallF 5.25,R²7/9,adjustedR²17/27. Report exact synthetic-design limits and a future-data validation plan, not a causal spending authorization.

Optional source summary: NIST linear least squares describes linearity in coefficients and fit limitations. The orthogonal design, residualization explanation and complete numerical models above are original.

Developed study chapters

Original explanation, worked analysis and progressive optional practice.

Apply the idea

Advertising and sales rise in busy seasons. Including season can alter the advertising coefficient.

Why can the coefficient change? Explain your reasoning, then identify one changed fact that could alter the conclusion.

Expanded transfer investigation: To estimate the total effect of a campaign, an analyst controls for inquiries caused by the campaign. What concern arises?

Show the calculation or argument, identify the information available at the decision time, and state which assumption supports your conclusion. The four progressive tasks in the Learn stage provide additional practice.

Read the worked reasoning

Season was related to both advertising and sales. Controlling a common factor can change a conditional association. In an independent response, state the given facts, identify the governing relationship, work through the calculation or comparison, and distinguish the conclusion from assumptions that still need evidence.

Expanded transfer reasoning: Whether to condition depends on the effect being estimated and the causal structure.

Progressive practice reasoning: The Y deviations are -13, -11, 11, and 13. Their products with X deviations sum to 19.5 + 5.5 + 5.5 + 19.5 = 50. Divide by Sxx = 5 to obtain 10. The adjusted prediction at X = 2 and S = 1 is 34, but this exact combination was not observed. It relies on the additive model extending the same slope across seasons. Season can be a pre-treatment confounder, inquiries a mediator, and acceptance a selection variable; their inclusion depends on the estimand. A significance change can reflect increased uncertainty from redundancy, altered interpretation, or a different association. Examine estimates, intervals, support, and the intended prediction or causal task.

Check understanding

Quiet-season records are (X,Y)=(1,12),(2,14); busy-season records are (3,36),(4,38). What does the pooled slope of 10 conceal?

  1. A rule that all adjustment variables always belong in every causal model
    Feedback

    Incorrect. Mediators and selection variables can change the estimand or introduce bias.

  2. A within-season slope of 2 combined with a seasonal level difference
    Feedback

    Correct. The adjusted equation Y=10+2X+20S separates the constructed seasonal shift.

  3. Proof that each extra advertising unit causes 10 additional sales
    Feedback

    Incorrect. The pooled association alone does not identify an intervention effect.

Further reading

Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative accounting frameworks are distinguished. Independent subject review and observed human learner testing remain pending.

My learning →