FIX function I(x,y|c) to consider the joint probability of the elements of c