Write a script that includes (at bottom) any functions you w…
Write a script that includes (at bottom) any functions you write (if any) and that uses Linear Regression to fit a line onto the given data fit a cubic (degree 3) polynomial onto the given data report results as discussed below plot results as discussed below Description of data: the x variable is displacement. The y variable is force for a “stiffening spring” that stiffens as it displaces. It is not exactly linear in the force vs. displacement. Let’s find out. Things to report. Sum of squares of residuals (from mean) Sum of squares of residuals (from line fit) Sum of squares of residuals (from cubic fit) coefficient of determination (line) coefficient of determination (cubic) Things to plot Raw data, use ‘o’ Show y average, use ‘r’ Show the linear fit line, use ‘g’ Show the cubic fit line, use ‘b’ Data (you should cut and paste this.) x data (independent) 56789101112131415161718192021222324252627282930 y data (dependent) 812.06967.661133.91305.71467.51650.91833.22002.62208.82369.92651.72772.12942.13380.93547.43842.93976.54238.94072.35017.75143.95551.45936.35855.76310.67343.5 Upload your script to the file upload below.