Importance sampling for families of distributions