test_stat2: fixed map iterator issue, + chi2 & dchi2 statistics