Updated randomized MI analysis code