calculate sample position statistic