Question: Compute regression parameters using closed form method (code in Python). The data: Consider the following 5 point synthetic data set: 3 1 3 5 3

Compute regression parameters using closed form method (code in Python). The data: Consider the following 5 point synthetic data set: 3 1 3 5 3 13 21 Which is plotted below: What you need: you want the line that "best fits" this data set as measured by residual sum of squares the simple linear regression cost. You have a closed form solution that involves the following terms: The number of data points (N) The sum of the Ys The sum of the Xs . The sum of the product of the Xs and the Ys The sum of the Xs squared . Then once you have calculated all of these terms, use the formulas to compute the slope and intercept and plot the best fit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
