Linear regression is a statistical technique that attempts to analyze the potential relationship between two variables. This is accomplished by fitting a line that estimates the correlation between your variables and attempts to predict the value of the dependent variable based on the value of your independent variable. For more the two variables multiple linear regression could be used.
A typical SLR model equation is written as: \(y=\beta_0 + \beta_1 x +\varepsilon\) where the \(y\) is the dependent variable \(x\) is the independent variable, \(\beta_0\) is the y-intercept, \(\beta_1\) is the slope coeffcient, and \(\varepsilon\) is the random error.
\(\beta_1\) and \(\beta_0\) are determined by: \[\frac{\beta_1=\Sigma^{m}_{i=1}(X_i-\bar{X})(Y_i-\bar{Y})}{\Sigma^{n}_{i=1}(X_i-\bar{X})^2}\] \[\beta_0= \bar{Y}-\hat{\beta_1}*X\]