Lawfare Group → Knowledge Institute → Lawfare Academy

← Course syllabus · Related lesson

Interpret the contrast the equation actually encodes

Current complete on-site native edition3

All required original teaching, complete derivations and optional practice models are on LawfareGroup.com. External references are optional provenance or further reading. Florida is the state-law default; federal, historical and comparative contexts remain distinct. Independent human subject review and observed learner testing remain pending. Synthetic economic models establish no actual market response, legal clearance or professional competence.

Preserved and additional cumulative dossiers

Original extended teaching; see the linked current course-content review for its development status. Practice is optional; independent academic review and learner testing remain pending.

Learning objectives

Indicators and interactions describe conditional contrasts

A binary indicator's coefficient is not automatically a constant group difference once the model includes an interaction. For y=b0+b1x+b2D+b3xD,the D=0 slope is b1 and D=1 slope b1+b3. The group difference at x is b2+b3x. Calculate the contrast at the decision-relevant value and use the covariance of the combined coefficients when estimating uncertainty.

The constructed eight-row data fit exactly with y=8.5+3x+12D−2xD. Group 0 has slope 3 and intercept 8.5;group 1 slope1 and intercept 20.5. The additive model's slope 2 was a compromise across these patterns. The perfect interaction fit is by construction and supplies no independent proof that real business data follow two exact lines. Residual variance zero in this toy does not mean actual prediction or parameter uncertainty disappears.

To center at x=4,define z=x−4 and substitute x=z+4. The equation becomes y=20.5+3z+4D−2zD. Predictions and group-specific slopes are unchanged; the indicator now represents the fitted difference at x=4 rather than x=0. Centering can improve interpretability, but D=0 has no observed x=4 in the dataset. A more convenient reference does not create overlap or causal identification.

A useful model remains linear in parameters

A regression can contain x²,indicators,interactions or log(x)and still be linear in its unknown coefficients. The point is not whether the plotted curve is a straight line. Specify the transformed columns and their domains. A quadratic fitted curve has local slope b1+2b2x,not b1 at every x. An interaction changes the relevant slope according to another variable. A coefficient table should therefore be accompanied by predicted values or explicit contrasts at meaningful inputs.

Changing the reference category or centering an included regressor re-expresses the same fitted function when the corresponding design is transformed consistently. It should not change predictions. If a report's predictions change after a supposedly equivalent recoding, inspect the construction, omitted terms or data rows. A coding mistake can look like a substantive modeling result if these invariance checks are omitted.

Avoid arbitrary transformations solely to obtain a desired significance result. Logarithms require positive inputs; adding 1 to every outcome changes the relationship and units, rather than being a universally harmless fix for zeros. Define why a transformation fits the mechanism and target. Counts, limits and censored observations can require a different model or narrower interpretation. State which choice is exploratory and validate consequential decisions on new evidence.

Logs change both percentage interpretation and mean prediction

In log(Q)=a−1.5log(P),the slope is the model's log-log elasticity. A small 1%price increase is approximately associated with 1.5%lower Q,holding the specified conditions fixed. For a finite 10%increase,the exact modeled ratio is 1.1^(−1.5)≈.866784,or about 13.3216%lower,not exactly 15%. This relationship remains a conditional fitted model unless a causal design supports intervention interpretation.

For a log outcome, exponentiating the fitted log mean does not generally give the conditional arithmetic mean in levels. A simple constructed example has log outcomes centered at log(100),with equally likely residuals+log(2)and−log(2). Level outcomes are 200 and50;their arithmetic mean 125 differs from exp(log 100)=100. The corresponding mean exp(residual)factor is1.25. A retransformation adjustment requires an appropriate residual distribution and conditioning assumptions, not a universal multiplier borrowed from another group.

Prediction targets should distinguish a log-scale center, a median-like level quantity under suitable error conditions and an expected level. Heterogeneous residual variation can make a single adjustment inappropriate. Evaluate transformed predictions in the units and loss function the business actually uses, and preserve any domain restrictions. A coefficient interpreted correctly on the log scale can still fail to answer the expected-revenue or capacity question in levels.

Worked example: An interaction is more than an indicator shift

In the exact constructed fit, at x=2 the D=0 prediction is 14.5 and the D=1 prediction 22.5;the fitted difference is 8. At x=6 the predictions are 26.5 and 26.5, difference 0. These are fitted contrasts; the cross-group comparison extrapolates because the observed x ranges do not overlap. Centering at 4 changes the indicator to 4 without changing either calculation. A claim that the group effect is always 12 would ignore the interaction.

Worked example: Contrast uncertainty is not one coefficient’s SE

In a separate covariance example, suppose Var(b2)=4,Var(b3)=.25 and Cov(b2,b3)=−.5. At x=4, the variance of b2+4b3 is 4+16×.25+8(−.5)=4,so SE 2. Ignoring covariance would give variance 8 and SE sqrt(8). These stipulated values are not estimated from the perfect-fit dataset. The example isolates a linear-combination calculation and does not supply a causal interpretation or a real confidence level by itself.

Progressive optional practice

Attempt each problem before opening its model. Then revise the reasoning under the changed conditions.

Recode

Center the model 8.5+3x+12D−2xD at x=4. What changes and what does not?

Compare the model reasoning

It becomes 20.5+3z+4D−2zD with z=x−4. Predictions and slopes remain unchanged; the indicator’s reference changes.

Changed conditions

A data-processing step accidentally drops the zD interaction.

Compare the revised analysis

The new model is no longer an equivalent recoding. Compare actual design columns and fit rather than attribute changed predictions to centering alone.

Calculate

For log Q=a−1.5log P,calculate the exact response to a 10% price increase.

Compare the model reasoning

Q ratio is 1.1^(−1.5)≈.866784,about −13.3216%. The −15% calculation is a local approximation, not the exact finite change.

Changed conditions

The estimated elasticity itself changes with price in a richer model.

Compare the revised analysis

Recompute the actual fitted contrast from that model or integrate its varying elasticity. Do not retain the constant-elasticity formula without its assumptions.

Transfer

Why is exp(fitted log outcome)=100 not the expected level when equally likely levels are 50 and 200?

Compare the model reasoning

The level mean is 125; exponentiation and averaging do not commute. The residual-factor mean is 1.25 under this constructed distribution.

Changed conditions

Residual variation differs sharply by group.

Compare the revised analysis

A common correction may be wrong. Define the conditional mean target and use justified group/conditional information or a model suited to the level outcome.

Current development backlog and remaining course work · Course content review

Source readings and scope

Introductory Business Statistics 2e — 13.5 Interpretation of Regression Coefficients: Elasticity and Logarithmic Transformation — Optional preserved methodological provenance. Complete current on-site studios and preserved full original applications supply all required teaching. Data and estimates are synthetic; they do not describe actual customers or learner records. Statistical relationships do not establish causal, legal or professional approval. Florida is the state-law default; federal rules remain federal and historical other-state examples are comparative. No source affiliation or independent review of this course is claimed.

NIST/SEMATECH — Linear Least Squares Regression — Optional preserved methodological provenance. Complete current on-site studios and preserved full original applications supply all required teaching. Data and estimates are synthetic; they do not describe actual customers or learner records. Statistical relationships do not establish causal, legal or professional approval. Florida is the state-law default; federal rules remain federal and historical other-state examples are comparative. No source affiliation or independent review of this course is claimed.

Hyndman and Athanasopoulos — Forecasting: Principles and Practice, chapter 5 — Optional chapter5sections5.6/5.8/5.10 provenance; the complete on-site studios supply transformation, evaluation and time-validation preparation. Apply the relevant section to the named lesson; historical source examples are methodological illustrations.

Reproduce the worked examples in Python 3. Standard library only; synthetic data; no production records or network access.