compute statistic lazy