A-statistic script and reults