Linear regression aims to fit a linear equation to the observed data such that the line summarizes the relationship between X and Y. The equation of this best- fit line is:
\[Y = \beta_0 + \beta_1X + \epsilon\]
- \(\beta_0\) is the y-intercept.
- \(\beta_1\) is the slope of the line.
- X is the independent variable.
- \(\epsilon\) is the error term which helps account for variations in Y, that are not explained by values x.
- Y is the predicted value of the dependent variable.