Prior Click here
Next  Click here
In the construction of programming languages contravariance is
converting from "narrower" (float, for example) to wider (double).
In contrast, covariance is converting from "wider" (double) to
narrower (float). In statistics there are several flavors of
covariance but the most commonly used one refers to the general
case of variance: instead of using two instances of the same
measure, two different measures are used in the calculation so one
is determining how two variables change relative to each other.
For our purposes one can imagine the data as occupying a cube
whose axes are time, country and measure. We would typically
like to first calculate averages by measure and year (so exports,
unemployment, cell phones in use ... for 2010) as well as measures
by country (internet users, infant mortality, external debts ... for
Andorra, Argentina ... Zambia and Zimbabwe for 2000 through
2009). With some adroit error handling one might easily gloss
over Mozambique not reporting how many doctors were working in
2007 and still produce an average. Likewise, one can still calculate
a variance when a modest amount of data is missing. Covariance is
not so forgiving. Measure data has to occur in matched pairs. No
figure for doctors working in Mozambique in 2007 can force one to
discard or distort the country of Mozambique, the year of 2007 or
the measure of doctors working. Typically, when we first start
calculating averages and data is determined to be missing or
invalid, it sets off  a bit of a scramble to check our sources.