Simple linear regression uses a straight line to describe the relationship between two numerical variables.
Example: Does car weight help predict the fuel economy?
Must use R’s built-in mtcars dataset, which contains 32 cars.
- x: Weight in thousands of pounds (
wt). - y: Miles per gallon (
mpg).