Multiple Linear Regression (MLR) is a statistical technique used to model the linear relationship between a single dependent variable (often called the response) and two or more independent variables (the predictors). While simple linear regression deals with only one predictor, MLR expands the scope, allowing analysts to capture the joint effect of several factors on the outcome. The method is widely applied in economics, engineering, medicine, social sciences, and any field where understanding or predicting a quantitative outcome based on a set of explanatory variables is essential. In matrix notation the MLR model is written as: The estimated coefficients Provided Violations of these assumptions can lead to biased estimates, inflated standard errors, or misleading significance tests. OLS is the most common estimation technique. Using the formula above, most statistical packages compute Below is a concise example in Python using The Each coefficient represents the expected change in the response variable for a oneunit increase in predictor X, holding all other predictors constant. For example, if = 4.5, then a oneunit rise in X leads to an expected increase of 4.5 units in Y, assuming the values of X, X, remain unchanged. Significance of a coefficient is tested with the null hypothesis H: = 0. The tstatistic is Plotting residuals versus fitted values helps detect nonlinearity, heteroscedasticity, or outliers. A QQ plot compares the distribution of residuals to a normal distribution. Deviations from the straight line suggest nonnormal errors. VIF quantifies multicollinearity. VIF for predictor X is Statistics such as Cooks distance, leverage, and DFFITS identify observations that disproportionately affect the fitted model. Large values merit a closer look; they may be data entry errors or genuine extreme cases. When many predictors are available, selecting a parsimonious subset improves interpretability and predictive performance. Common strategies include: Model comparison metrics such as AIC (Akaike Information Criterion), BIC (Bayesian Information Criterion), and adjusted R guide the choice of the best-fitting yet simplest model. Consider a dataset containing the following variables: The MLR model: After fitting, suppose we obtain: Interpretation: each additional square foot adds roughly $112 to the price, holding other features constant. Older houses and those farther from the city centre have lower values, with the impact quantified by the negative coefficients for Age and Distance. While MLR is powerful, it has constraints: Extensions such as Generalized Linear Models (GLM), MixedEffects Models, and MachineLearning algorithms (e.g., random forests, gradient boosting) broaden the toolbox for situations where traditional MLR assumptions do not hold. Mastering MLR equips analysts with a versatile technique that forms the basis for many advanced statistical and machinelearning methods, making it an indispensable skill across scientific and business domains. Multiple Linear Regression Analysis
1. Introduction
2. The Mathematical Model
Y = X +
are obtained by minimizing the sum of squared residuals: = (XX) XYXX is nonsingular (i.e., the predictors are not perfectly collinear), the solution is unique. 3. Assumptions Behind the Model
4. Estimating the Model
4.1. Ordinary Least Squares (OLS)
, the residuals e = Y X, and the residual sum of squares (RSS). From these quantities, the coefficient of determination (R) and adjusted R are derived. 4.2. Software Implementation
statsmodels: import pandas as pdimport statsmodels.api as sm# Load data (example.csv must contain columns: y, x1, x2, x3)df = pd.read_csv('example.csv')X = df[['x1', 'x2', 'x3']]X = sm.add_constant(X) # adds intercept termy = df['y']model = sm.OLS(y, X).fit()print(model.summary())summary() method prints coefficient estimates, standard errors, tvalues, pvalues, confidence intervals, R, adjusted R, and diagnostic statistics. 5. Interpreting Coefficients
t = / SE(). A small pvalue (typically < 0.05) indicates that the predictor contributes meaningfully to the model. 6. Model Diagnostics
6.1. Residual Plots
6.2. Normal Probability Plot (QQ Plot)
6.3. Variance Inflation Factor (VIF)
1 / (1 - R), where R is the R from regressing X on all other predictors. Values > 5 (or 10) often signal problematic collinearity. 6.4. Influence Measures
7. Model Selection
8. Practical Example: Predicting House Prices
Price = + Size + Bedrooms + Age + Distance +
Coefficient Estimate Std. Error tvalue pvalue Intercept 15,200 5,430 2.80 0.006 Size 112 8 14.0 <0.001 Bedrooms 7,300 2,200 3.32 0.001 Age -420 150 -2.80 0.006 Distance -1,050 300 -3.50 0.001 9. Limitations and Extensions
10. Key Takeaways
