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

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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!