Monday, May 16, 2011

How to Use Excel's Covar Function


1. Learn the syntax for Covar. It is Covar (array_1,array_2) where array_1 is the first range of integers and array_2 is the second range of integers. The covariance of these two arrays will be returned.
2. Study the restrictions on the arguments. They must be arrays, references, names or numbers. If the arguments contain empty cells, logical values or text, those values will be ignored. However, the value zero is included.
3. Compare the number of values between array_1 and array_2. If they are not equal, Covar will return the #N/A error value. If either array is empty, Covar will return the #DIV/0! error value.
4. Calculate the covariance. Covar(X,Y) = The sum of (x - Average (array_1))(y - Average (array_2))/n where x and y are individual values in array_1 and array_2 respectively and n is the sample size.
5. Look at the following example: Data_1 = (3, 2, 4, 5, 6) and Data_2 = (9, 7, 12, 15, 17). Average (array_1) = 4 and Average(array_2) = 10. The sum of (x-4)(y-10) for all values of data_1 and data_2 is (3-4)(9-10) (2-4)(7-10) (4-4)(1-10) (5-4)(15-10) (6-4)(17-10) = 1 6 0 5 14 = 26. 26/5 = 5.2 so Covar (Data_1,Data_2) = 5.2.

Blogger news