https://numbas.mathcentre.ac.uk/question/11927/calculate-expectation-and-a-probability-from-a-frequency-table/embed/