Simple linear regression is a method used to model the relationship between a dependent variable \(Y\) and an independent variable \(X\).
The equation for simple linear regression is:
\[ Y = \beta_0 + \beta_1 X + \epsilon \] Where: - \(Y\) is the dependent variable. - \(\beta_0\) is the intercept. - \(\beta_1\) is the slope. - \(X\) is the independent variable. - \(\epsilon\) is the error term.
The mtcars dataset contains specifications and performance data for 32 car models from the 1970s. The dataset includes 11 variables related to car performance, dimensions, and fuel consumption.