Describe mathematical relationships and make predictions from experimental data

Linear regression is a statistical modeling technique used to describe a continuous response variable as a function of one or more predictor variables. It can help you understand and predict the behavior of complex systems or analyze experimental, financial, and biological data.

Linear regression techniques are used to create a linear model. The model describes the relationship between a dependent variable \(y\) (also called the response) as a function of one or more independent variables \(X_i\) (called the predictors). The general equation for a linear regression model is:

\[y = \beta_0 + \sum \ \beta_i X_i + \epsilon_i\]

where \(\beta\) represents linear parameter estimates to be computed and \(\epsilon\) represents the error terms.

There are several types of linear regression models:

  • Simple: model with only one predictor

  • Multiple: model with multiple predictors

  • Multivariate: model for multiple response variables

Simple linear regression is commonly done in MATLAB®. For multiple and multivariate linear regression, see Statistics and Machine Learning Toolbox™. It enables multiple, stepwise, robust, and multivariate regression to:

  • Generate predictions
  • Compare linear model fits
  • Plot residuals
  • Evaluate goodness-of-fit
  • Detect outliers

To create a linear model that fits curves and surfaces to your data, see Curve Fitting Toolbox™.

See also: Statistics and Machine Learning Toolbox, Curve Fitting Toolbox, machine learning, data fitting, data analysis, mathematical modeling, time series regression

Mastering Machine Learning: A Step-by-Step Guide with MATLAB