Added loop for statistical tests