nextdefine function which will calculate the important values for slrdef coef_estimation(xy)the following script line will give number of observations nn np size(xthe mean of and vector can be calculated as followsm_xm_y np mean( )np mean(ywe can find cross-deviation and deviation about as followsss_xy np sum( *xn*m_y*m_x ss_xx np sum( *xn*m_x*m_x nextregression coefficients can be calculated as followsb_ ss_xy ss_xx b_ m_y b_ *m_x return(b_ b_ nextwe need to define function which will plot the regression line as well as will predict the response vectordef plot_regression_line(xyb)the following script line will plot the actual points as scatter plotplt scatter(xycolor " "marker " " the following script line will predict response vectory_pred [ [ ]* the following script lines will plot the regression line and will put the labels on themplt plot(xy_predcolor " "plt xlabel(' 'plt ylabel(' 'plt show(at lastwe need to define main(function for providing dataset and calling the function we defined above