STAT202 · COURSE STUDY COMPANION
Regression and Business Forecasting
Work through the mechanisms, connect all six units, then change the facts. Read alongside the original lessons, worked clinics and assigned textbook chapters.
Depth audit → · Study sequences → · Company simulation → · Independent review package →
Course overview → · Original six clinics →
- Regression as a conditional model
- Least squares and residuals
- Multiple predictors and confounding
- Categorical variables and interactions
- Diagnostics and validation
- Time series and forecast uncertainty
DEVELOP THE MECHANISM
Regression as a conditional model — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
A regression is a conditional model: predicted outcome changes with a predictor while included covariates are held fixed in the fitted relationship. Define the target population, outcome units and intended use. Description, prediction and causal estimation require different evidence. Including additional variables does not automatically remove confounding and can introduce bias if they are consequences of treatment or selected through a common effect.
Develop the reasoning
A conditional regression asks how the fitted outcome varies with a predictor while included variables are held fixed in the model. Define outcome units, predictor availability, population and intended use first. A model useful for predicting workload can be inappropriate for estimating what a staffing intervention would cause. The predictor may be a response to demand rather than its driver. Model interpretation requires a clear estimand and knowledge of how observations were generated.
Use the method and test its limits
Do not equate a coefficient with an intervention effect without identification. Random assignment can support a causal design under its conditions; observational analysis needs a defensible strategy and explicit assumptions about selection and confounding. Adding variables can change the question and can introduce bias if they are consequences of treatment or selection. A high R² measures one aspect of fitted variation, not causality or future accuracy. A decision report should state which claim the model supports and what new evidence would be needed for a different claim.
A further distinction that changes the decision
A model's target population includes the range and conditions under which it will be used. Predicting a different region, product mix or workload can require transportability assumptions not tested by in-sample fit. State those boundaries and seek relevant validation rather than treat the word regression as a universal license to generalize.
Work a new multistep problem — optional
A fitted model predicts job hours as 2+0.5R, where R is rooms serviced. The observed sample ranges from two to eight rooms. Neither rooms nor staffing was randomly assigned.
Predict a six-room job and distinguish that calculation from estimating the effect of hiring another worker.
Study the worked reasoning
The fitted six-room prediction is five hours. The model contains no staffing intervention effect and does not by itself establish that changing rooms causes the fitted difference. It also cannot infer how an extra worker changes total labor, elapsed time or quality without further design and evidence.
Change a condition
A manager predicts a forty-room job as twenty-two hours and treats it as a firm promise.
Study the changed-condition answer
The arithmetic follows the line but extrapolates far beyond the two-to-eight-room support. Obtain relevant data and operating constraints before using it as a delivery commitment; include uncertainty and potential nonlinear setup or capacity effects.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
DEVELOP THE MECHANISM
Least squares and residuals — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
Ordinary least squares chooses coefficients minimizing the sum of squared residuals. In simple regression with an intercept, slope is Σ(x−xbar)(y−ybar)/Σ(x−xbar)² and intercept ybar−b1×xbar. Residuals measure deviations from fitted values, not necessarily causal errors. Inspect whether the design has enough variation and whether a line is appropriate; a mathematically defined best fit can still be a poor model of the process.
Develop the reasoning
OLS selects coefficients minimizing the sum of squared residuals, where a residual is observed y minus fitted y. For a line with intercept, derive slope as Sxy/Sxx using deviations from sample means and intercept as ybar−b1 xbar. The criterion gives greater influence to large squared deviations and depends on variation in x. If every x is identical, the separate slope and intercept are not uniquely determined by these data.
Use the method and test its limits
Residual checks reveal properties of the fit, not proof the underlying relationship is true. With an intercept, fitted residuals sum to zero up to numerical precision and are orthogonal to the fitted design columns, but a nonlinear pattern or influential observation can still make the model unsuitable. A line is statistically linear in its unknown coefficients even when specified predictors include transformations such as x². Distinguish computing an estimate from assumptions needed for unbiasedness, consistency, inference and causal interpretation. Normality of the outcome is not a general prerequisite for calculating an OLS coefficient.
A further distinction that changes the decision
Residual sum-of-squares can improve when predictors are added even if future performance worsens. The estimation objective rewards fitting available data; it does not penalize every form of overfitting or leakage. Separate estimation from model choice and validation, and compare simpler alternatives where they answer the intended question adequately.
Work a new multistep problem — optional
Use x=(0,1,2), y=(1,2,5), with an intercept. Treat these as a small numerical illustration rather than a representative causal sample.
Compute slope, intercept, predictions and residuals, and verify the residual sum.
Study the worked reasoning
xbar=1 and ybar=8/3. Sxy=4 and Sxx=2, so slope is two and intercept 2/3. Predictions are 2/3, 8/3 and 14/3; residuals are 1/3, −2/3 and 1/3 and sum to zero. The fitted line does not pass through every point because it minimizes total squared residual, not each residual separately.
Change a condition
Replace all x values with one while keeping y unchanged.
Study the changed-condition answer
Sxx=0, so a separate slope is not identified. Any intercept-slope combination giving fitted value 8/3 at x=1 can produce the same fit. Do not divide by zero or report a unique slope fabricated by a fallback rule.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
DEVELOP THE MECHANISM
Multiple predictors and confounding — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
Multiple regression estimates partial associations conditional on included predictors. Predictors may be correlated; absence of perfect collinearity is the identification requirement for unique OLS coefficients, not mutual independence of every predictor. Multicollinearity can inflate uncertainty and destabilize estimates without by itself biasing OLS under the other assumptions. Causal interpretation additionally requires a credible identification design and appropriate treatment of omitted variables and selection.
Develop the reasoning
Multiple regression estimates partial conditional relationships across included predictors. Predictors need not be mutually independent. Full column rank, equivalently absence of perfect linear dependence in the design, is required for unique unconstrained OLS coefficients. Imperfect multicollinearity can make coefficients imprecise and sensitive; by itself it does not create bias under an appropriate exogeneity assumption and the other relevant model conditions. Separate the numerical identification problem from the causal omitted-variable problem.
Use the method and test its limits
A coefficient can change when covariates are added because the estimand, omitted association or sample changes. That change is a prompt to examine design, not an automatic sign that the newer model is true. A control must have a defensible role; conditioning on a consequence of treatment or a selected common effect can distort causal interpretation. For prediction, judge out-of-sample performance using information available at decision time. For a policy effect, explain identification and remaining unobserved determinants. More columns and smaller residuals do not establish a better intervention recommendation.
A further distinction that changes the decision
Perfect collinearity can arise by construction, such as including an intercept and indicators for every mutually exclusive exhaustive category. Choose a reference category or another identified parameterization. Removing a redundant column fixes numerical identification, not causal confounding; these are different problems requiring different reasoning and evidence.
Work a new multistep problem — optional
A model is yhat=20+4A−3P, where A is ad spend in thousands and P is price in dollars. A plan raises A by two and P by one. Data are observational.
Calculate the fitted joint change and explain the condition held fixed by each coefficient.
Study the worked reasoning
The fitted joint change is 4×2−3×1=+5 outcome units. The ad coefficient describes the fitted A relation holding P and other included predictors fixed; the price coefficient holds A fixed. These conditional associations are not automatically causal effects of changing both controls. Check joint support and uncertainty.
Change a condition
The dataset has P exactly equal to 2A for every record.
Study the changed-condition answer
Perfect collinearity prevents separately identifying A and P coefficients in this specification. The fitted relationship along the observed combination may be estimable, but independent intervention effects cannot be recovered from that exact dependence alone.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
DEVELOP THE MECHANISM
Categorical variables and interactions — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
An indicator changes a reference-group level, while an interaction changes how one variable's relationship depends on another. For y=b0+b1x+b2D+b3xD, slope is b1 for D=0 and b1+b3 for D=1; group difference is b2+b3x. Report the relevant contrast at meaningful x values. A transformation changes units and interpretation; back-transformation can require care because the mean of an exponentiated prediction is not simply the exponent of a fitted mean.
Develop the reasoning
An indicator establishes a reference-group contrast, while an interaction makes a slope or contrast depend on another variable. 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. A main effect is conditional on the interaction's reference value, not a universal group difference. Choose meaningful reference points and report contrasts relevant to the decision.
Use the method and test its limits
Transformations change interpretation. A model linear in log x describes a different relationship from one linear in x, and a log outcome requires care when converting fitted means back into original units. A polynomial can remain linear in parameters while allowing curvature. Always state units, domain and the contrast calculated. Including a categorical variable does not turn an observational comparison into a randomized experiment, and a numerically correct group prediction may still be unsupported where groups have no overlapping predictor values.
A further distinction that changes the decision
Centering a predictor can make an interaction reference more meaningful without changing fitted predictions when the model is reparameterized correctly. The group main effect then describes the contrast at the chosen reference, not a newly discovered universal difference. Explain the reference value so readers can interpret coefficients without reconstructing algebra.
Work a new multistep problem — optional
A fitted model is yhat=8+1.5x+6D−0.5xD, with D zero or one. Evaluate x=4 and x=12.
Compute both group predictions and differences at each x and identify slopes.
Study the worked reasoning
For D=0 slope is 1.5; D=1 slope is one and intercept fourteen. At x=4 predictions are fourteen and eighteen, difference four. At x=12 both predict twenty-six, difference zero. The coefficient six is the group difference only at x=0; it is not the difference everywhere.
Change a condition
Group one is observed only at x above ten and group zero only below six.
Study the changed-condition answer
The model's cross-group comparison at the same x relies on extrapolation and functional-form assumptions because support does not overlap. Report that limit and seek relevant data before treating the computed contrasts as reliable evidence of a real group effect.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
DEVELOP THE MECHANISM
Diagnostics and validation — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
Diagnostics examine functional form, influential records, variance and dependence. Robust standard errors can address some inference problems but do not fix an omitted causal variable or a bad outcome definition. Separate model selection from holdout evaluation, compare simple benchmarks and prevent future information from entering predictors. Removing an inconvenient valid observation changes the population or estimand and must be justified rather than used to improve significance.
Develop the reasoning
Diagnostics assess whether the model's form and uncertainty treatment fit the intended use. Inspect residuals against fitted values and predictors, influential observations, variance patterns and dependence. A fan-shaped spread can challenge constant-variance uncertainty formulas; curvature can challenge the mean function. Robust standard errors can address particular variance estimation issues under assumptions, but do not fix omitted causal variables, measurement error or an incorrect functional form.
Use the method and test its limits
Validation must remain separate from model development to estimate new-case performance honestly. If the same holdout is repeatedly used to select models, it becomes part of training. Compare simple benchmarks and decision-relevant errors, not only an in-sample fit score. Do not delete a valid unusual customer solely because it weakens significance; explain how the target population or model changes. A single average error can hide severe underprediction in the high-demand cases that determine capacity and cash. Specify monitoring and a revision threshold after deployment.
A further distinction that changes the decision
Uncertainty methods depend on the design. Heteroskedasticity-robust, cluster-robust and time-dependence methods address different structures under assumptions. A generic robust option is not proof every dependence problem has been solved. Identify the observational unit and sources of shared variation and obtain appropriate technical review for a consequential actual analysis.
Work a new multistep problem — optional
Model A has mean absolute error ten units on a new holdout and underpredicts the ten busiest days by thirty each. Model B has mean absolute error twelve but underpredicts those days by ten each. Shortage costs $20 per unit; other errors cost $1 per unit.
Explain why average absolute error alone cannot select the better operating model and compute busy-day shortage-cost difference.
Study the worked reasoning
For those ten days, A shortage cost is 10×30×20=$6,000; B is $2,000, a $4,000 difference. Need the remaining error totals and a complete decision rule to choose overall. Lower average error does not automatically minimize asymmetric business loss.
Change a condition
The busiest days were used to tune B after inspecting the holdout.
Study the changed-condition answer
The claimed holdout comparison is no longer independent of that selection. Evaluate on fresh relevant data or use a suitable nested design, and disclose the exploratory step rather than keep the original validation label.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
DEVELOP THE MECHANISM
Time series and forecast uncertainty — deeper explanation
DEVELOPED LESSON CHAPTER
The governing relationship
Time-series forecasting uses information available at the forecast date. Validate in temporal order and account for trend, seasonality, serial dependence and structural changes. A random split can leak future regimes into training. Forecast intervals include uncertainty beyond fitted coefficient means; a point prediction does not establish enough capacity or cash under adverse outcomes. Monitor error patterns and decision consequences after deployment.
Develop the reasoning
A forecast uses only information available when it is made. A predictor such as final settled invoice amount may look useful for predicting an earlier month while leaking future information. Validate chronologically with suitable training and later test windows, and compare simple seasonal or last-period baselines. Random mixing of future and past records can overstate performance when trend, seasonality or regimes change.
Use the method and test its limits
Distinguish uncertainty in the conditional mean from future outcome variation and from uncertainty that the model remains valid. Serial dependence affects inference and interval methods; structural change can undermine extrapolation even when the old residuals looked well behaved. A point forecast should be translated into capacity, inventory and cash decisions with an adverse scenario or appropriate loss function. Monitor error by horizon and relevant segment. A high R² or accurate retrospective fit is not proof a future payment can be funded or that an intervention based on a predictor will work.
A further distinction that changes the decision
Forecast evaluation should match the horizon of use. A one-step-ahead model refitted each month and a twelve-month forecast made today have different information and uncertainty. Report the intended horizon and avoid presenting an easy short-horizon validation score as evidence that a long capital or staffing commitment is equally well predicted.
Work a new multistep problem — optional
Monthly demand over the latest three months is ninety, 100 and 170, with the last month a known seasonal peak. The corresponding next-month demand in the prior year was ninety-five. No additional history is available.
Compare a three-month moving-average prediction with a seasonal-reference baseline and explain what cannot yet be inferred.
Study the worked reasoning
Moving average is 120 units; the one-year seasonal reference is ninety-five. Neither sparse baseline is established as best. The peak can distort a naive average, while one prior seasonal observation is uncertain. Evaluate future errors when more comparable data become available and state the limited evidence rather than select whichever estimate supports the desired capacity plan.
Change a condition
A model uses invoices finalized after the forecast month to improve the historical prediction.
Study the changed-condition answer
That predictor is unavailable at the decision date and creates leakage. Rebuild the feature set using a real information cutoff, then revalidate in temporal order. Improved retrospective fit is not an executable forecasting gain.
Read the full connected study route and specialist method studios →
Read this explanation in the complete course companion →
Apply the six units to a cumulative problem →
CUMULATIVE PROBLEM · ALL WORK OPTIONAL
Connect the units: Regression and Business Forecasting
Work from these facts
For x=(1,2,3) and y=(2,4,5), compute a simple OLS line. Then interpret a second model yhat=10+2x+5D+3xD at x=4. Neither dataset is a randomized experiment.
Before opening the answer, identify the decision and feasible baseline, show each relevant calculation or evidence link, compare a strong alternative and state the condition that could reverse your recommendation. Do not assume a missing quantity, permission or future payment has been verified.
Compare the worked analysis
First xbar=2 and ybar=11/3. Cross-product sum is 3 and x-deviation-square sum 2, so slope 1.5 and intercept 2/3. Predictions are 13/6, 11/3 and 31/6; residuals −1/6, 1/3 and −1/6 sum to zero. In the interaction model, prediction at x=4 is eighteen for D=0 and thirty-five for D=1, a seventeen-unit conditional difference. The D coefficient five is the group difference only at x=0. Neither fitted contrast automatically identifies a treatment effect.
Change the facts and test transfer
Predict x=100 with the three-point line and explain why an exact arithmetic result is weak evidence outside the observed range. Identify what data and design would be needed for a credible intervention claim.
Compare the changed-fact reasoning
The line predicts 150+2/3 at x=100, but observed x ranges only from one to three. That extrapolation is unsupported by this tiny dataset. For an intervention claim, define treatment and outcome and obtain a credible randomized or other defensible causal design, including assumptions about selection and confounding.
Self-review: distinguish facts from assumptions; use correct units and dates; reconcile the calculation; explain the mechanism; compare a feasible alternative; identify the limits of the conclusion. If a changed condition defeats the original method, revise the method as well as the number.
Targeted further study
These resources address the named methods. The original syllabus and chapter assignments remain available; a broad assigned chapter is not necessarily sufficient for a specialized application. Links do not imply affiliation, source approval or independent review of this course.
Scope of this revision
These are AI-assisted editorial corrections to on-site teaching and analytical practice. They do not establish university equivalence, accreditation, independent faculty approval or demonstrated learner proficiency. The assigned readings remain part of the curriculum. Independent subject review and learner testing are pending; all practice and capstones remain voluntary.