Calculating ratio, frequency, mean, median and mode