Linear Regression in Excel: Generate Data and Recover the Coefficients
Build a simple linear regression example from simulated data in Excel. We choose an intercept and slope, calculate the target values, add random noise, and ask whether the regression can recover the coefficients we started with. The final example introduces the difference between predicting a number and assigning a class.
Screen times follow the original lesson. Edited YouTube versions may run shorter.
Set the known coefficients
Choose an intercept and a slope, then calculate the noiseless target for each input.

Add random error
Add simulated noise to make the target observations. Keep the clean target separate so you can see what the noise changes.

Check the regression result
Compare the fitted slope and intercept with the values that generated the data. Estimation error depends on sample size and noise.
