Скачать книгу

COVARIANCE AND CORRELATION

      The covariance of a random variable is given by:

equation

      where E[(xiμx)(yiμy)] is equal to E(xiyi) − μxμy since

equation

      The sample covariance is a measure of relationship between two variables and is defined as:

      The numerator of the covariance, images, is the sum of products of respective deviations of observations from their respective means. If there is no linear relationship between two variables in a sample, covariance will equal 0. If there is a negative linear relationship, covariance will be a negative number, and if there is a positive linear relationship covariance will be positive. Notice that to measure covariance between two variables requires there to be variability on each variable. If there is no variability in xi, then images will equal 0 for all observations. Likewise, if there is no variability in yi, then images will equal 0 for all observations on yi. This is to emphasize the essential fact that when measuring the extent of relationship between two variables, one requires variability on each variable to motivate a measure of relationship in the first place.

equation

      It is easy to understand more of what the covariance actually measures if we consider the trivial case of computing the covariance of a variable with itself. In such a case for variable xi, we would have

equation

      But what is this covariance? If we rewrite the numerator as images instead of images, it becomes clear that the covariance of a variable with itself is nothing more than the usual variance for that variable. Hence, to better understand the covariance, it is helpful to start with the variance, and then realize that instead of computing the cross‐product of a variable with itself, the covariance computes the cross‐product of a variable with a second variable.

      We compute the covariance between parent height and child height in Galton's data:

      > attach(Galton) > cov(parent, child) [1] 2.064614

      The reason for this is that the size of covariance will also be impacted by the degree to which there is variability in xi and the degree to which there is variability in yi. If either or both variables contain sizeable deviations of the sort images or images, then the corresponding cross‐products images will also be quite sizeable, along with their sum, images. However, we do not want our measure of relationship to be small or large as a consequence of variability on xi or variability on yi. We want our measure of relationship to be small or large as an exclusive result of covariability, that is, the extent to which there is actually a relationship between xi and yi. To incorporate the influences of variability in xi and yi (one may think of it as “purifying”), we divide the average cross‐product (i.e., the covariance) by the product of standard deviations of each variable. The standardized sample covariance is thus:

equation

      The standardized covariance is known as the Pearson product‐moment correlation coefficient, or simply r, which is a biased estimator of its population counterpart, ρxy, except when ρxy is exactly equal to 0. The bias of the estimator r can be minimized by computing an adjustment found in Rencher (1998, p. 6), originally proposed by Olkin and Pratt (1958):

equation

      Because the correlation coefficient is standardized, we can place lower and upper bounds on it. The minimum the correlation can be for any set of data is −1.0, representing a perfect negative relationship. The maximum the correlation can be is +1.0, representing a perfect positive relationship. A correlation of 0 represents the absence of a linear relationship. For further discussion on how the Pearson correlation can be a biased estimate under conditions of nonnormality (and potential solutions), see Bishara and Hittner (2015).

      One can gain an appreciation for the upper and lower bound of r by considering the fact that the numerator, which is an average cross‐product, is being divided by another product, that of the standard deviations of each variable. The denominator thus can be conceptualized to represent the total amount of cross‐product variation possible, that is, the “base,” whereas the numerator represents the total amount of cross‐product variation actually existing between the variables because of a linear relationship. The extent to which covxy accounts for all of the possible “cross‐variation” in images is the extent to which r will approximate a value of |1| (either positive or negative, depending on the direction of the relationship). It thus stands that covxy cannot be greater than the “base” to which it is being compared (i.e., Скачать книгу