In linear regression analysis using the Ordinary Least Square method,…