How to construct a cumulative frequency distribution