Siilats Robots
Regression and perceptron lessons

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.

Watch on Siilats RobotsRegression and perceptron workbook

Screen times follow the original lesson. Edited YouTube versions may run shorter.

At 1:00 in the original

Set the known coefficients

Choose an intercept and a slope, then calculate the noiseless target for each input.

Screen recording at 1:00
Screen at 1:00
At 5:00 in the original

Add random error

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

Screen recording at 5:00
Screen at 5:00
At 8:55 in the original

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.

Screen recording at 8:55
Screen at 8:55