Regression analysis is a technique used to analyze a series of data that consists of a dependent variable and one or more independent variables. The purpose is to estimate a possible functional relationship between the dependent variable and the independent variables. Using this technique, we can build a model in which a continuous response variable is a function of one or more predictors.
In the Statistics and Machine Learning Toolbox, there are a variety of regression algorithms, including:
Linear regression
Nonlinear regression
Generalized linear models
Mixed-effects models
A scatter plot of the linear regression model is shown in the following figure.
Figure 1.17: Scatter plot of linear regression model
To study the relationship between two variables, a scatter plot is useful,in which we show the values of the independent variableXon the horizontal axis and the values of the dependent variableYon the vertical axis. Using a regression model, we can express the relationship between two variables with functions that are more or less complex. Simple linear regression is suitable when the values ofXandY are distributed along a straight line in the scatter plot (Figure 1.17).