[latexpage] In the realm of data science and machine learning, linear regression stands as a foundational technique for analyzing and…