B06 · Intermediate
B06 · Intermediate · 10 lessons in four modules · about 12.5 hours
Regression Analysis
Fit, read and check linear and logistic regressions, and know what they can and can’t tell you.
What you will learn
- Fit a least-squares line, interpret its slope and intercept in context, and judge the fit with residuals, the residual standard error and R², knowing what each can’t show.
- Test coefficients and the whole model, give confidence intervals, and tell a confidence interval for the mean from a prediction interval for one new case.
- Build and interpret multiple regressions with numeric, categorical and interaction terms, reading each coefficient with the others held fixed.
- Compare models with adjusted R², nested F tests and information criteria, recognise multicollinearity, and choose predictors for a purpose rather than by p-value.
- Check a model with residual plots and tests, and respond to curvature, unequal variance, dependence and influential points with transformations and robust standard errors.
- Fit and interpret logistic regression for a yes/no outcome: log-odds, odds ratios, predicted probabilities, the likelihood-ratio test and classification at a threshold.
Prerequisites
- B05 Correlation Analysis — required
- B03 Excel for Business Analytics — recommended
How it works
Each lesson teaches the idea from first principles, works examples step by step, lets you explore it in an interactive, then has you practise with feedback. A lesson is complete when you have worked its guided problems and scored 80% on its knowledge check. Mastery is tracked separately and comes back for review before you are likely to forget. Each module ends with a test; the course ends with a project and a final assessment.
Fictional case
Lantern Coffee Co. A fictional coffee business founded by Ana Lim. It starts as a catering and barista-training service, opens its own cafés and an online shop for beans, and plans a canned cold brew. Every name and figure in it is invented for teaching.
Not sure where to start?
The diagnostic has 12 questions across the course. It doesn’t count toward anything; it suggests the module to start from. Take the diagnostic.
Modules and lessons
Module 1 Fitting a line
- The least-squares lineTurn a scatterplot into a line you can read: the least-squares criterion, the slope b₁ = r·s_y ÷ s_x and the intercept b₀ = ȳ − b₁x̄. Find what an extra transaction is worth at each café, see why Harbourside’s line crosses zero at −$76.58 and why that number means nothing, and meet the two facts that surprise everyone: the line of y on x is not the line of x on y, and extreme days are followed by ordinary ones.
- Residuals and R²Judge how well a line fits: residuals, the split of the total variation into SST = SSR + SSE, R² as the share of variation the line accounts for, and the residual standard error in y’s own units. Read a first residual plot, see a line with R² = 0.88 that is the wrong shape, and learn three things R² can’t tell you.
- Module 1 test11 questions on this module. 70% passes.
Module 2 Inference and prediction
- Inference for coefficientsDecide whether a fitted slope is evidence of a real relationship and how precisely it is known: the population model and its conditions, the standard error of a slope, t tests and confidence intervals for slope and intercept, the F test, and the ToolPak’s output. Then the two judgements software can’t make for you: whether a significant slope matters, and whether the rows were independent enough to trust its standard error.
- Prediction and intervalsUse a fitted line to predict, and say how far to trust the prediction: the confidence interval for the average at a given x against the prediction interval for one new case, why both widen away from the mean of x, why the prediction interval never shrinks below the residual spread, and why extrapolation escapes them both. Then roster a Saturday’s peak from a weather forecast, by hand and in Excel.
- Module 2 test11 questions on this module. 70% passes.
Module 3 Multiple regression
- Multiple regressionFit one equation with several predictors, read each slope as a comparison with the others held fixed, and see why a slope changes when a predictor joins the model. Then judge the whole model with adjusted R² and the overall F test, and read the output in Excel.
- Categorical predictors and interactionsPut categories such as the café or the day of the week into a regression with dummy variables, read each coefficient against a reference level, and let one predictor’s effect depend on another with an interaction. Then see a café dummy resolve B05’s Simpson’s paradox.
- Multicollinearity and model choiceSee what happens when two predictors carry nearly the same information, measure it with the variance inflation factor, and decide what to do about it. Then choose between models with adjusted R², the nested F test, AIC and BIC, and check a model on data it hasn’t seen.
- Module 3 test11 questions on this module. 70% passes.
Module 4 Checking and extending a model
- Assumptions and diagnosticsA regression’s coefficients, p-values and intervals are only as good as the assumptions behind them. Read residual plots and two standard tests to check each assumption, and learn which failures bias the coefficients and which only distort the standard errors.
- Transformations and influenceWhen the diagnostics fail, change the model, not the data. Fit footfall in logs and read its slopes as percentages, bend a line with polynomial and hinge terms, and find the few rows that move a regression, then decide what to do with them honestly.
- Logistic regressionWhen the outcome is yes or no, a straight line predicts impossible probabilities. Model the log-odds instead: fit and read a logistic regression, turn its coefficients into odds ratios and probabilities, test them, and judge a classification against the base rate.
- Module 4 test10 questions on this module. 70% passes.
Project and final assessment
- Project: Pricing Lantern’s cateringAna tested a higher price per guest on her catering quotes from June 2027. Model what an event’s invoice will be, what wins a quote, and what the price test shows, with honest intervals; then advise her on the 2028 price.
- Final assessment24 questions across the whole course. 70% passes.
The course is complete when every lesson is complete, every module test is passed, the project is finished and the final assessment is passed.
Resources
- Glossary: every term this course defines.
- Formulas: every formula with its symbols and units.
- Review: flashcards and the questions you missed, when they are due.
Elsewhere on this site
- Plate: Regression: what the coefficients and R² say
- Plate: Classification: odds, thresholds and the confusion matrix
- Regress (tool)
Sources used in this course
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, section 12.3, “The Regression Equation”. OpenStax. openstax.org/books/introductory-statistics/pages/12-3-the-re…
- Microsoft Support. “SLOPE function”. support.microsoft.com/en-us/excel/functions/slope-function
- Wikipedia. “Regression toward the mean” (on Galton’s 1886 paper and the standardised regression line). en.wikipedia.org/wiki/Regression_toward_the_mean
- Penn State Eberly College of Science. STAT 501 Regression Methods, section 1.8, “R² Cautions”. online.stat.psu.edu/stat501/book/export/html/893
- Microsoft Support. “STEYX function”. support.microsoft.com/en-us/excel/functions/steyx-function
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, lesson 3.1, “Inference for the Population Intercept and Slope”. online.stat.psu.edu/stat462/node/102
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, section 12.4, “Testing the Significance of the Correlation Coefficient” (the regression assumptions). OpenStax. openstax.org/books/introductory-statistics-2e/pages/12-4-tes…
- NIST/SEMATECH. e-Handbook of Statistical Methods, section 4.1.4.1, “Linear Least Squares Regression”. itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm
- Microsoft Support. “LINEST function”. support.microsoft.com/en-US/excel/functions/linest-function
- Holmes, A., Illowsky, B. & Dean, S. (2023). Introductory Business Statistics 2e, section 13.6, “Predicting with a Regression Equation”. OpenStax. openstax.org/books/introductory-business-statistics/pages/13…
- Illowsky, B. & Dean, S. (2023). Introductory Statistics 2e, section 12.5, “Prediction”. OpenStax. openstax.org/books/introductory-statistics-2e/pages/12-5-pre…
- Microsoft Support. “FORECAST and FORECAST.LINEAR functions”. support.microsoft.com/en-us/excel/forecast-and-forecast-line…
- Holmes, A., Illowsky, B. & Dean, S. Introductory Business Statistics 2e, section 13.4, “The Regression Equation” (multiple regression, adjusted R², the F test). OpenStax. openstax.org/books/introductory-business-statistics-2e/pages…
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, Lesson 5, “Multiple Linear Regression (MLR) Model & Evaluation”. online.stat.psu.edu/stat462/node/83
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, “The general linear F-test”. online.stat.psu.edu/stat462/node/135
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, section 10.7, “Detecting Multicollinearity Using Variance Inflation Factors”. online.stat.psu.edu/stat462/node/180
- Taboga, M. “Linear regression — Model selection criteria”. Lectures on probability theory and mathematical statistics, StatLect. statlect.com/fundamentals-of-statistics/linear-regression-mo…
- Sribney, W. “Problems with stepwise regression” (quoting F. Harrell and R. Conroy). Stata FAQ, StataCorp. stata.com/support/faqs/statistics/stepwise-regression-proble…
- NIST/SEMATECH. e-Handbook of Statistical Methods, section 4.4.4, “How can I tell if a model fits my data?”. itl.nist.gov/div898/handbook/pmd/section4/pmd44.htm
- NIST/SEMATECH. e-Handbook of Statistical Methods, section 4.4.4.2, “How can I detect non-constant variation across the data?”. itl.nist.gov/div898/handbook/pmd/section4/pmd442.htm
- Holmes, A., Illowsky, B. & Dean, S. (2017). Introductory Business Statistics, section 13.4, “The Regression Equation” (the assumptions of the ordinary least squares model). OpenStax. openstax.org/books/introductory-business-statistics/pages/13…
- Penn State Eberly College of Science. STAT 501: Regression Methods, Lesson 4, “SLR Model Assumptions”. online.stat.psu.edu/stat501/lesson/4
- Penn State Eberly College of Science. STAT 501: Regression Methods, T.2.3, “Testing and Remedial Measures for Autocorrelation”. online.stat.psu.edu/stat501/book/export/html/998
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, 7.2, “Log-transforming Only the Response for SLR”. online.stat.psu.edu/stat462/node/153
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, 9.3, “Identifying Outliers (Unusual Y Values)”. online.stat.psu.edu/stat462/node/172
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, 9.4, “Studentized Residuals”. online.stat.psu.edu/stat462/node/247
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, 9.5, “Identifying Influential Data Points”. online.stat.psu.edu/stat462/node/173
- Microsoft Support. “LN function”. support.microsoft.com/en-us/Excel/functions/ln-function
- Penn State Eberly College of Science. STAT 462: Applied Regression Analysis, notes on binary logistic regression (the model, likelihood, Wald and likelihood-ratio tests, odds ratios). online.stat.psu.edu/stat462/node/207
- Penn State Eberly College of Science. STAT 501: Regression Methods, 15.3, “Further Logistic Regression Examples”. online.stat.psu.edu/stat501/book/export/html/1015
