Ecological bias is sometimes attributed to confounding by the group variable (ie the variable used to define the ecological groups), or to risk factors associated with the group variable. We show that the group variable need not be a confounder (in the strict epidemiological sense) for ecological bias to occur: effect modification can lead to profound ecological bias, whether or not the group variable or the effect modifier are independent risk factors. Furthermore, an extraneous risk factor need not be associated with the study variable at the individual level in order to produce ecological bias. Thus the conditions for the production of ecological bias by a covariate are much broader than the conditions for the production of individual-level confounding by a covariate. We also show that standardization or ecological control of variables responsible for ecological bias are generally insufficient to remove such bias.