updated analysis and plotting for variance and rank