Linear regression is a statistical technique used to model and analyze the relationship between two continuous variables. It helps us understand how a change in one variable (the predictor) affects another (the outcome).
In this project, we use the built-in mtcars dataset in R. This dataset contains specifications and performance metrics of 32 car models, including their weight (wt) and fuel efficiency (mpg - miles per gallon).We aim to use simple linear regression to determine how a car’s weight affects its MPG.
In other words, can we predict a car’s fuel efficiency based on how heavy it is?