Added randomization to the mutual information analysis code