Correlation and Linear Regression
摘要
The first section focuses on Correlation, beginning with an introduction to the Pearson correlation coefficient and its role in measuring linear relationships between variables. It provides the mathematical formula for Pearson’s r and discusses the concept of covariance as a related measure. The section also includes a discussion about limitations of Pearson’s coefficient in non-linear relationships, illustrated through a practical example where non-linear data result in a misleadingly low Pearson correlation value. The second part discusses Linear Regression, starting with simple linear regression and its use in identifying trends by modelling the relationship between dependent and independent variables. This part outlines the mathematical representation of linear regression and introduces the concept of minimising the Mean Squared Error (MSE) to obtain the best fit. The section also covers the coefficient of determination, R2, as a measure of the goodness of the regression model. Furthermore, the chapter provides a conceptual understanding of R2, explaining its role in evaluating how well the model captures the data’s variance. I conclude this chapter with a section with suggestions for further readings.