Construct cumulative frequency distribution