A conditional distribution function-based measure for independence and K-sample tests in multivariate data