This article examines the limitations of Pearson's correlation in selecting predictor variables for linear models. Using mtcars and iris datasets from R, this paper demonstrates the limitation of this correlation measure when selecting a proper independent variable to model miles per gallon (mpg) from mtcars data and the petal length from the iris data. This paper exhibits the findings by reporting Pearson's correlation values for two potential predictor variables for each response variable, then builds a linear model to predict the response variable using each predictor variable. The error metrics for each model are then reported to evaluate how reliable Pearson's correlation is in selecting the best predictor variable. The results show that Pearson's correlation can be deceiving if used to select the predictor variable to build a linear model for a dependent variable.
翻译:暂无翻译