how to calculate mode of distribution