A Detailed Introduction to Linear Regression