Covariance is a measure of how two random variables change together, taking any value from -∞ to +∞. Covariance can be affected by changing the units of the variables. Correlation is a scaled version of covariance that indicates the strength of the relationship between two variables on a scale of -1 to 1. Unlike covariance, correlation is not affected by changes in the location or scale of the variables and provides a standardized measure of their relationship. Correlation is therefore preferred over covariance as a measure of the relationship between two variables.