📘 Title & Purpose
This interactive tool helps you understand how Ordinary Least Squares (OLS) estimation works by visualizing how different parameter guesses affect the Sum of Squared Residuals (SSR).
🎯 Goal of this Tool
The aim is to help you grasp that the OLS estimator is the one that minimizes the SSR, i.e., the difference between the observed data and the values predicted by your guessed regression line.
🧪 How It Works
First, you generate synthetic data by specifying values for the intercept (β₀), slope (β₁), and error variance (σ²). The app then displays:
- The scatterplot of generated data with your guessed regression line
- Graphs showing how SSR changes as you vary intercept and slope
- A 3D surface plot of the SSR as a function of both β₀ and β₁
🛠️ Controls
- Model Parameters: Use sliders to set the intercept (β₀), slope (β₁), and variance (σ²) of the data-generating process. Click "Generate Data" to simulate new observations.
- Guessed Parameters: Use the bottom sliders to guess the values of β₀ and β₁. The graphs will update automatically to reflect the SSR associated with your guesses.
🧠 What to Observe
- Notice how the SSR changes as your guessed values get closer to the true parameters used to generate the data.
- The minimum of the SSR curves (and surface) corresponds to the OLS estimates.
- Try different variance levels to see how noise affects the estimation accuracy.
🏁 Challenge
Can you find the combination of guessed intercept and slope that minimizes the SSR without knowing the true parameters?