- Simple linear regression is a statistical method that uses a linear equation to predict the value of one dependent variable based on another independent variable.
- It helps us understand how one variable (predictor) affects another (outcome)
- Let’s explore this with an example.
- Example: How does House area (sq ft) influence house price ($k)?
- We will:
- Simulate a small housing data
- Fit a linear model
- Visualize results with ggplot2 and Plotly