The ordinary least squares (OLS) method is commonly employed in…