Question: Create a vector Stress in the form Stress, = i + random number less than 15 where i= [1, 10]. Find the linear regression

Create a vector Stress in the form Stress, = i + random number less than 15 where i= [1, 10]. Find the linear regression of the given data T= [11, 12, 13, 14, 15, 16, 17, 18, 19, 20] Stress Plot the graph with experimental points and regression line.
Step by Step Solution
3.45 Rating (161 Votes )
There are 3 Steps involved in it
Python Code import math import numpy import matplotlibpyplot as plt def LinearRegressionxy Intercept0 Slope 0 iflenxleny u nparrayx v nparrayy MeanX npmeanu MeanY npmeanv SumSqX0 SumSqY0 SumSqXY0 for k in range 0lenx SumSqX SumSqX ukMeanXuk MeanX SumSqY SumSqY vkMeanYvkMeanY SumSqXY SumSqXY ukMeanXvkMeanY Intercept ... View full answer
Get step-by-step solutions from verified subject matter experts
