Constructing frequency distribution table