Can you direct me to or provide an example that shows how to do a multiple linear regression analysis manually ?

I am very familiar with simple linear regression, and can perform a simple linear regression without the use of a statistics package. However I cannot do the same thing for multiple linear regression, and it is not for lack of Google searching. Most sources I have encountered end up with "And then do the multiple regression analysis in Minitab" (although it's definitely possible that some of them actually provided the method and I just didn't understand it)

In case I have the terminology wrong, when I say multiple linear regression, what I mean is 2 or more independent variables, with a single dependent variable. For instance, do a regression analysis to predict a person's heart attack risk based off their age and weight

Thank you!

  • 2
    $\begingroup$ It is actually the same method for simple and multiple linear regression, the difference being that beta and X are vector & scalar (simple) or matrice and vector (multiple). So you have $\beta = (X'X)^{-1}X'Y$, $\hat Y = X\beta$, $\varepsilon = Y - \hat Y$ and $H = X(X'X)^{-1}X'$ the "hat matrix". Reference can be found here: stat.purdue.edu/~jennings/stat514/stat512notes/topic3.pdf $\endgroup$
    – Riff
    Commented Feb 20, 2017 at 7:39
  • 1
    $\begingroup$ Because multiple regression can be carried out as a sequence of univariate regressions, you already have a way to do this. To be sure, such a sequence is not the most numerically stable method for large datasets--but you wouldn't be processing large amounts of data manually, anyway. $\endgroup$
    – whuber
    Commented Feb 20, 2017 at 16:04
  • $\begingroup$ @Riff the pdf can now be found at stat.purdue.edu/~snandy/stat512/topic3.pdf $\endgroup$ Commented Mar 29, 2023 at 10:54

1 Answer 1


Introduction to Linear Regression Analysis has an example in Example 3.1. Borrow yourself a copy from library.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.