Misc scripts for statistical analysis