https://numbas.mathcentre.ac.uk/question/12175/calculate-probabilities-from-frequency-table.zip?